3 # Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (c) 1996-2003 by Internet Software Consortium
6 # Permission to use, copy, modify, and distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 # Internet Systems Consortium, Inc.
20 # Redwood City, CA 94063
25 CATMANPAGES = dhcrelay.cat8
26 SEDMANPAGES = dhcrelay.man8
32 INCLUDES = -I$(TOP) $(BINDINC) -I$(TOP)/includes
33 DHCPLIB = ../common/libdhcp.a $(BINDLIB) ../omapip/libomapi.a ../dst/libdst.a
34 CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
36 all: $(PROG) $(CATMANPAGES)
39 for dir in $(BINDIR) $(ADMMANDIR); do \
41 for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
43 if [ ! -d $$foo ]; then \
49 $(INSTALL) dhcrelay $(DESTDIR)$(BINDIR)
50 $(CHMOD) 755 $(DESTDIR)$(BINDIR)/dhcrelay
51 $(MANINSTALL) $(MANFROM) dhcrelay.$(MANCAT)8 $(MANTO) \
52 $(DESTDIR)$(ADMMANDIR)/dhcrelay$(ADMMANEXT)
55 $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
58 -rm -f $(OBJS) dhclient.o
61 -rm -f $(PROG) $(CATMANPAGES) $(SEDMANPAGES) *~ #*
67 @for foo in $(SRCS) $(MAN); do \
68 if [ ! -b $$foo ]; then \
71 ln -s $(TOP)/relay/$$foo $$foo; \
74 # These should only be done on 4.4 BSD-based systems, since the mandoc
75 # macros aren't available on older unices. Catted man pages are
76 # provided in the distribution so that this doesn't become a problem.
78 dhcrelay.cat8: dhcrelay.man8
79 nroff -man dhcrelay.man8 >dhcrelay.cat8
81 dhcrelay.man8: dhcrelay.8
82 sed -e "s#ETCDIR#$(ETC)#" -e "s#DBDIR#$(VARDB)#" \
83 -e "s#RUNDIR#$(VARRUN)#" < dhcrelay.8 >dhcrelay.man8
85 dhcrelay: dhcrelay.o $(DHCPLIB)
86 $(CC) $(LFLAGS) -o $(PROG) dhcrelay.o $(DHCPLIB) $(LIBS)
88 # Dependencies (semi-automatically-generated)