#
# bootpd   - BOOTP server daemon
#
# $Header: Makefile,v 1.15 89/01/10 14:58:43 ww0n Exp $
#

# 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}

# 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.
# wp added following lines
#wp: For SCO UNIX/XENIX TCP/IP, add -DSYSV and -DLAI_TCP.
# in CONFFILE and DUMPFILE changed "./config" to what is
#there
CONFFILE  = -DCONFIG_FILE=\"/etc/local/config\"
DUMPFILE  = -DDUMP_FILE=\"/etc/local/bootpd.dump\"
FILESPECS = ${CONFFILE} ${DUMPFILE}
# wp: commented out line that follows and added new BOOTPDOPT
#BOOTPDOPT = -DSYSLOG -DSUNOS40 -DDEBUG -DPRIVATE=static ${FILESPECS}

BOOTPDOPT=-O -DSYSV -DLAI_TCP -DSYSLOG -DDEBUG -DPRIVATE=static ${FILESPECS}

INSTALL=/usr/bin/install
DESTDIR=
ETCDIR=/etc
OBJS=bootpd.o readfile.o hash.o
#wp patch file does not use -g option
CFLAGS= -g -I /usr/include -I /usr/include/sys ${BOOTPDOPT} 
# wp added libs
LIBS=-lsocket

all: bootpd

bootpd:	${OBJS}
	sh newvers.sh
# wp added ${LIBS}
	${CC} ${CFLAGS} -o bootpd version.c ${OBJS} ${LIBS}

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

system: install
# WP commented out old install
#install: all
#	${INSTALL} -c -s bootpd ${DESTDIR}${ETCDIR}/bootpd
#
#clean:
#	@rm -f core bootpd *.BAK *.CKP *~ .emacs* *.o version.c
install: all
	inst -D bootpd /etc/local/bootpd
	inst -D bootpd.8 @M8

clean:
	rm -f core bootpd *.o version.c
