#
# Makefile for logrefer.so module.
#
# To compile the logrefer.so loadable NaviServer module, set the NSHOME
# variable to the directory where the NaviServer files are located and
# uncomment the CC, COPT, and LD variables for you platform and
# compiler.  Then type "make install" to compile and install the module
# in the NaviServer bin directory.  To have the NaviServer load the
# sqlreport.so module at runtime, you will need to add the following
# entry in the [Modules] section of your nsd.ini file:
#
#	Load=hello.so(HelloWorldInit)
#
#
# NOTE:  This code is unsupported and for example purposes only.
#

# Location of the NaviServer files (normally the ~nsadmin directory):
NSHOME=/usr/local/nsadmin

# Your compiler:
# CC=cc
CC=gcc

# Options for Alpha OSF using the GCC or DEC C compiler:
# COPTS=
# LD=ld -shared -expect_unresolved '*'

# Options for HP-UX using the HP C compiler:
# COPTS=+z -Aa
# LD=ld -b

# Options for SGI IRIX 5.3 using the SGI C or GCC compilers:
# COPTS=
# LD=ld -shared

# Options for Solaris 2.4 using the SparcWorks C compiler:
# COPTS=-K PIC
# Solaris 2.4 using the GCC compiler:
# COPTS=-g -Wall -fpic
# LD=ld -dy -G 

# Options for SunOS 4.1.x using the SparcWorks C compiler:
# COPTS=-K PIC
# Options for SunOS 4.1.x using the GCC compiler:
COPTS=-g -Wall -fpic
LD=ld


# You should not need to edit these variables.
OBJS=hello.o
MODULE=hello.so
CFLAGS=-I$(NSHOME)/include $(COPTS)

all: $(MODULE)

$(MODULE): $(OBJS)
	$(LD) -o $(MODULE) $(OBJS)

install: $(MODULE)
	cp $(MODULE) $(NSHOME)/bin/
	chmod +x $(NSHOME)/bin/$(MODULE)

clean:
	rm -f *.o *.so
