PREFIX=/usr/local
OBJS=accept_and_parse.o util.o cache.o requestobject.o log.o timeout.o
LIBS=
MODULE=HTTPAccept

## Probably no need to change below...
CC=gcc -g
IFLAGS=-I$(PREFIX)/include/pike/

DEST=$(PREFIX)/lib/pike/modules/

# Additional C preprocessor flags
CPPFLAGS=

# The flags to generate a shared library
CFLAGS=-DDEBUG -Wall -Wno-unused -shared $(IFLAGS) $(CPPFLAGS)

LDFLAGS=-G
LD=/usr/ccs/bin/ld

$(MODULE).so: $(OBJS)
	$(LD) $(LDFLAGS) $^ -o $(MODULE).so $(LIBS)

clean:
	rm *.o *.so

install: $(MODULE).so
	/bin/cp -f $(MODULE).so $(DEST)

depend:
	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c

accept_and_parse.o: accept_and_parse.c accept_and_parse.h log.h \
 cache.h requestobject.h util.h static_strings.h
cache.o: cache.c accept_and_parse.h cache.h util.h
log.o: log.c accept_and_parse.h log.h requestobject.h util.h
requestobject.o: requestobject.c accept_and_parse.h log.h util.h \
 cache.h requestobject.h static_strings.h
timeout.o: timeout.c accept_and_parse.h
util.o: util.c accept_and_parse.h util.h
