# DEBUG for runtime debug code to be compiled in (for -d flag)
# SYSLOG for syslog style logging

# additional libraries:

# Build options for BSDI BSD/OS 2.0 -ByB
CC = gcc
CFLAGS =  -g -DDEBUG -I/usr/local/include

# Build options for SunOS 4.1.x gcc (Sun3 and Sun4)
#CC = gcc
#CFLAGS =  -g -DDEBUG -I/usr/local/include
#LIBS = -ldb

# Build options for HP/UX
#CC = cc
#CFLAGS =  -g -DDEBUG -I/usr/local/include
#LIBS = -L/usr/local/lib -ldb 

# Build options for IRIX
#CC = cc
#CFLAGS =  -g -DDEBUG -I/usr/local/include
#LIBS = -ldb 

# Build options for AIX
#CC = gcc
#CFLAGS =  -g -DDEBUG -I/usr/local/include
#LIBS = -L/usr/local/lib -ldb 

# Build options for Solaris with /opt/SUNWspro/bin/cc
#CC = cc
#CFLAGS =  -g -DDEBUG -I/usr/local/include 
#LIBS = -L/usr/local/lib -ldb

# Build options for Linux (untested)
#CC = gcc
#CFLAGS =  -O2 -m486 -I/usr/local/include
#LIBS = -ldb -lbsd


EXES = sendpage testpet

OBJS = sendpage.o report.o strerror.o io.o config.o misc.o client.o queue.o \
		verify.o deliver.o daemon.o signal.o compat.o

TOBJS = testpet.o report.o strerror.o io.o compat.o

all: $(EXES) 

clean:
	/bin/rm -f *.o ${EXES}

dist:
	tar -cf sendpage.tar *.c *.h INSTALL README Makefile \
		sendpage.cf todo changes

sendpage:	$(OBJS)
	$(CC) $(CFLAGS) -o sendpage $(OBJS) $(LIBS)

testpet:	$(TOBJS)
	$(CC) $(CFLAGS) -o testpet $(TOBJS) $(TLIBS)

sendpage.c:	sendpage.h report.h
report.c:	sendpage.h report.h
strerror.c:	sendpage.h report.h
io.c:		sendpage.h report.h
config.c:	sendpage.h report.h
misc.c:		sendpage.h report.h
client.c:	sendpage.h report.h
queue.c:	sendpage.h report.h
verify.c:	sendpage.h report.h
deliver.c:	sendpage.h report.h
daemon.c:	sendpage.h report.h
signal.c:	sendpage.h report.h
testpet.c:	sendpage.h report.h

