
# Makefile coming with WWW-page Access Counter package.
# This package incorporates the GD Image library in 
# the gd directory.

# -------------------------------------------------------------------
#        User configurable part
# -------------------------------------------------------------------

# Your cgi-bin directory

#CGIBIN_DIR = ../../cgi-bin/
# on Amiga use below
CGIBIN_DIR = /aws/cgi-bin/


# Your favorite C-compiler. 
# Check the FAQ for which successful compilations where achieved.

CC = gcc

# Compiler flags.
# For most systems (SunOS, Solaris, IRIX, Linux, HP-UX with gcc):
#CFLAGS		= -O 
# on Amiga better use below
CFLAGS  = -noixemul -O2 -fomit-frame-pointer
# -fomit-frame-pointer makes compact code on Amiga
# For HP-UX with cc
# CFLAGS	= -O -Aa -D_INCLUDE_POSIX_SOURCE


# -------------------------------------------------------------------
#        You shouldn't need to edit anything below this line
# -------------------------------------------------------------------

LIBS		= -L./gd -lgd -lm

HEADERS		= conf.h  cgi-util.h misc.h image.h

SRCS		= count.c cgi-util.c misc.c image.c

OBJECTS		= count.o cgi-util.o misc.o image.o

TARGETS		= nph-count

all		: $(TARGETS)

$(OBJECTS)	: $(HEADERS)
cgi-util.o	: cgi-util.c
count.o		: count.c
image.o		: image.c
misc.o		: misc.c

nph-count: $(OBJECTS) gd-lib
	$(CC) cgi-util.o count.o image.o misc.o -o nph-count $(LIBS)

gd-lib:
	cd gd; make CC=$(CC) libgd.a

clean:
	rm -f $(OBJECTS) $(TARGETS)
	cd gd; make clean

install:
	cp nph-count $(CGIBIN_DIR)
