home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
bootpd-2.zip
/
MAKEFILE
< prev
next >
Wrap
Text File
|
1995-09-04
|
6KB
|
221 lines
#
# Makefile for the BOOTP programs:
# bootpd - BOOTP server daemon
# bootpef - BOOTP extension file builder
# bootpgw - BOOTP gateway daemon
# bootptest - BOOTP tester (client)
#
# OPTion DEFinitions:
# Remove the -DVEND_CMU if you don't wish to support the "CMU vendor format"
# in addition to the RFC1048 format. Leaving out DEBUG saves little.
# Remove the -DDHCP if you don't need DHCP support.
OPTDEFS= -DSYSLOG -DVEND_CMU -DDHCP -DDEBUG
# Uncomment and edit this to choose the facility code used for syslog.
# LOG_FACILITY= "-DLOG_BOOTP=LOG_LOCAL2"
# SYStem DEFinitions:
# Either uncomment some of the following, or do:
# "make sunos4" (or "make sunos5", etc.)
# SYSDEFS= -DSUNOS -DETC_ETHERS
# SYSDEFS= -DSVR4
# SYSLIBS= -lsocket -lnsl
# Uncomment this if your system does not provide streror(3)
# STRERROR=strerror$O
# FILE DEFinitions:
# 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= -DDUMPTAB_FILE=\"/usr/etc/bootpd.dump\"
#FILEDEFS= $(CONFFILE) $(DUMPFILE)
# MORE DEFinitions (whatever you might want to add)
# One might define NDEBUG (to remove "assert()" checks).
MOREDEFS=
INSTALL=/usr/bin/install
DESTDIR=
BINDIR=/usr/sbin
MANDIR=/usr/local/man
CFLAGS= $(OPTDEFS) $(SYSDEFS) $(FILEDEFS) $(MOREDEFS)
PROGS= bootpd$X bootpef$X bootpgw$X bootptest$X
TESTS= trylook$X trygetif$X trygetea$X
X=
O=.o
all: $(PROGS) $(TESTS)
system: install
install: $(PROGS)
-for f in $(PROGS) ;\
do \
$(INSTALL) -c -s $$f $(DESTDIR)$(BINDIR) ;\
done
MAN5= bootptab.5
MAN8= bootpd.8 bootpef.8 bootptest.8
install.man: $(MAN5) $(MAN8)
-for f in $(MAN5) ;\
do \
$(INSTALL) -c -m 644 $$f $(DESTDIR)$(MANDIR)/man5 ;\
done
-for f in $(MAN8) ;\
do \
$(INSTALL) -c -m 644 $$f $(DESTDIR)$(MANDIR)/man8 ;\
done
clean:
-rm -f core *$O
-rm -f $(PROGS) $(TESTS)
distclean:
-rm -f *.BAK *.CKP *~ .emacs*
#
# Handy targets for systems needing special treatment:
# (Most POSIX systems should work with just "make all")
#
# DEC/OSF1 on the Alpha
alpha:
$(MAKE) SYSDEFS="-DETC_ETHERS -Dint32=int -D_SOCKADDR_LEN" \
STRERROR=strerror$O
# Control Data EP/IX 1.4.3 system, BSD 4.3 mode
epix143:
$(MAKE) CC="cc -systype bsd43" \
SYSDEFS="-Dconst= -D_SIZE_T -DNO_UNISTD -DUSE_BFUNCS" \
STRERROR=strerror$O
# Control Data EP/IX 2.1.1 system, SVR4 mode
epix211:
$(MAKE) CC="cc -systype svr4" \
SYSDEFS="-DSVR4" \
SYSLIBS="-lsocket -lnsl"
# IRIX 5.X (Silicon Graphics)
irix:
$(MAKE) SYSDEFS= SYSLIBS=
# Linux 1.1.80+
linux:
$(MAKE) SYSDEFS="-O6 -Wall -fomit-frame-pointer" \
SYSLIBS="" \
FILEDEFS='-DCONFIG_FILE=\"/etc/bootptab\" \
-DDUMPTAB_FILE=\"/tmp/bootpd.dump\"'
# SCO (pah!) SYSV rel 3.2
sco:
$(MAKE) CC="cc" SYSLIBS="-lsocket"
# SunOS 4.X
sunos4:
$(MAKE) SYSDEFS="-DSUNOS -DETC_ETHERS" \
STRERROR=strerror$O
# Solaris 2.X (i.e. SunOS 5.X)
sunos5:
$(MAKE) SYSDEFS="-DSVR4 -DETC_ETHERS" \
SYSLIBS="-lsocket -lnsl"
# Solaris 2.X (i.e. SunOS 5.X) with GCC. Note that GCC normally
# defines __STDC__=1 which breaks many Solaris header files...
sunos5gcc:
$(MAKE) SYSDEFS="-DSVR4 -DETC_ETHERS -D__STDC__=0" \
SYSLIBS="-lsocket -lnsl" CC="gcc -Wall"
# UNIX System V Rel. 3
svr3:
$(MAKE) SYSDEFS="-DSYSV"
# UNIX System V Rel. 4
svr4:
$(MAKE) SYSDEFS="-DSVR4" \
SYSLIBS="-lsocket -lnsl"
# AT&T/GIS - Both AT&T StarServer and NCR 3000
# may work for others using Wollongong's WIN-TCP
wollongong gis :
$(MAKE) SYSDEFS="-DSVR4 -DWIN_TCP" \
SYSLIBS="-lsocket -lnsl"
# emx
emx:
$(MAKE) CC="gcc -Zomf -O" X=".exe" O=".obj" MOREDEFS="-I." \
SYSLIBS="-lsocket -Zcrtdll -Zstack 512" STRERROR=syslog.obj
#
# How to build each program:
#
OBJ_D= bootpd$O dovend$O readfile$O hash$O dumptab$O \
lookup$O getif$O hwaddr$O tzone$O report$O $(STRERROR)
bootpd$X: $(OBJ_D)
$(CC) -o $@ $(OBJ_D) $(SYSLIBS)
OBJ_EF= bootpef$O dovend$O readfile$O hash$O dumptab$O \
lookup$O hwaddr$O tzone$O report$O $(STRERROR)
bootpef$X: $(OBJ_EF)
$(CC) -o $@ $(OBJ_EF) $(SYSLIBS)
OBJ_GW= bootpgw$O getif$O hwaddr$O report$O $(STRERROR)
bootpgw$X: $(OBJ_GW)
$(CC) -o $@ $(OBJ_GW) $(SYSLIBS)
OBJ_TEST= bootptest$O print-bootp$O getif$O getether$O \
report$O $(STRERROR)
bootptest$X: $(OBJ_TEST)
$(CC) -o $@ $(OBJ_TEST) $(SYSLIBS)
# This is just for testing the lookup functions.
TRYLOOK= trylook$O lookup$O report$O $(STRERROR)
trylook$X : $(TRYLOOK)
$(CC) -o $@ $(TRYLOOK) $(SYSLIBS)
# This is just for testing getif.
TRYGETIF= trygetif$O getif$O report$O $(STRERROR)
trygetif$X : $(TRYGETIF)
$(CC) -o $@ $(TRYGETIF) $(SYSLIBS)
# This is just for testing getether.
TRYGETEA= trygetea$O getether$O report$O $(STRERROR)
trygetea$X : $(TRYGETEA)
$(CC) -o $@ $(TRYGETEA) $(SYSLIBS)
# This rule just keeps the LOG_BOOTP define localized.
report$O : report.c
$(CC) $(CFLAGS) $(LOG_FACILITY) -c $<
# Punt SunOS -target noise
.SUFFIXES: .c $O
.c$O:
$(CC) $(CFLAGS) -c $<
#
# Header file dependencies:
#
bootpd$O : bootp.h bptypes.h hash.h hwaddr.h bootpd.h dovend.h
bootpd$O : readfile.h report.h tzone.h patchlevel.h getif.h
bootpef$O : bootp.h bptypes.h hash.h hwaddr.h bootpd.h dovend.h
bootpef$O : readfile.h report.h tzone.h patchlevel.h
bootpgw$O : bootp.h bptypes.h getif.h hwaddr.h report.h patchlevel.h
bootptest$O : bootp.h bptypes.h bootptest.h getif.h patchlevel.h
dovend$O : bootp.h bptypes.h bootpd.h hash.h hwaddr.h report.h dovend.h
dumptab$O : bootp.h bptypes.h hash.h hwaddr.h report.h patchlevel.h bootpd.h
getif$O : getif.h report.h
hash$O : hash.h
hwaddr$O : bptypes.h hwaddr.h report.h
lookup$O : bootp.h bptypes.h lookup.h report.h
print-bootp$O : bootp.h bptypes.h bootptest.h
readfile$O : bootp.h bptypes.h hash.h hwaddr.h lookup.h readfile.h
readfile$O : report.h tzone.h bootpd.h
report$O : report.h
tzone$O : bptypes.h report.h tzone.h