CFLAGS= $(DBG) $(INCLUDES) $(DEFINES)
DBG=-O
INCLUDES=-I.
# use these lines if you have zephyr
#DEFINES=-YPOSIX -DNO_KLOG -DCOMPAT42 -DZEPHYR
#ZLIBS=-lzephyr -lcom_err -lkrb

#use these if you don't
# you can nuke ZLIBS if you don't turn on ZEPHYR
DEFINES=-YPOSIX -DNO_KLOG -DCOMPAT42
ZLIBS=

all: syslogd libsyslog.a

clean:
	-rm -f *.o *.a *.CKP *.BAK *~ #*#
	-rm -f syslogd

OFILES=syslogd.o herror.o daemon.o strerror.o ttymsg.o

syslogd: $(OFILES)
	$(CC) $(CFLAGS) -o syslogd $(OFILES) $(ZLIBS)

libsyslog.a: syslog.o
	ar rv libsyslog.a syslog.o && ranlib libsyslog.a

#
# -YPOSIX (on ultrix means) set -DPOSIX
# -DPOSIX means you have <unistd.h>
# -DNO_KLOG means you don't have /dev/klog (kernel syslogging)
# -DCOMPAT42 means you want to be compatible with programs using
#	4.2 syslog() calls
# -DZEPHYR means you want to enable forwarding of syslog stuff via Zephyr
#	[if you turn this on, target entries like "!user" go via wall/write
#	style, and entries like "user" go via Zephyr]
# -DTAHOE_SOCKETS means you have the type and length fields in your socket
#	structures.
