#
# bootpd   - BOOTP server daemon
#
# @(#) $Header: Makefile,v 1.8 90/07/18 13:34:25 leres Exp $ (LBL)
#

# The next few lines may be uncommented and changed to alter the default
# filenames bootpd uses for its configuration and dump files.
#CONFFILE=-DCONFIG_FILE=\"/usr/etc/bootptab\"
#DUMPFILE=-DDUMP_FILE=\"/usr/etc/bootpd.dump\"
#FILESPECS=${CONFFILE} ${DUMPFILE}
SYSLOG=-DFAKESYSLOG\"/dev/console\" -DFCNTL

# Users of SunOS 4.0 may have to add -DSUNOS40 to BOOTPDOPT below.
# Remove the -DVEND_CMU if you don't wish to support the "CMU vendor format"
# in addition to the RFC1048 format.

BOOTPDOPT=-DSYSLOG -DDEBUG -DPRIVATE=static ${FILESPECS} ${SYSLOG}

DESTDIR=
ETCDIR=/usr/etc
HDRS= bootp.h bootpd.h hash.h fakesyslog.h
SRCS=bootpd.c readfile.c hash.c fakesyslog.c
OBJS=bootpd.o readfile.o hash.o fakesyslog.o
EVERYTHING= README Makefile ${SRCS} Version.c ${HDRS} \
    bootpd.8 bootptab newvers.sh announce* gmods
CFLAGS=${BOOTPDOPT}
LFLAGS=-lnet -lnsl_s
CC= cc -g 
#CC=cc -fsoft

all: bootpd

bootpd:	${OBJS}
	sh newvers.sh Version.c
	${CC} ${CFLAGS} -o bootpd version.c ${OBJS} ${LFLAGS}

bootpd.o: bootpd.c bootpd.h bootp.h
readfile.o: readfile.c bootpd.h bootp.h
hash.o: hash.c hash.h

system: install

tags:
	ctags -wt *.c *.h

install: all
	/etc/install -c bootpd ${DESTDIR}${ETCDIR}/bootpd

shar:
	shar -v -c -p X ${EVERYTHING} >bootp.shar

tar:
	tar cf - ${EVERYTHING} | compress >bootp.tar.Z

clean:
	rm -f core bootpd *~ .emacs* *.o version.c bootp.shar bootp.tar.Z
