revert between 56095 -> 55830 in arch
[AROS.git] / workbench / network / stacks / AROSTCP / dhcp / client / Makefile.dist
blobc123963295116bcb60ca3fb70a2ab2e198232ef5
1 # Makefile.dist
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.
19 #   950 Charter Street
20 #   Redwood City, CA 94063
21 #   <info@isc.org>
22 #   http://www.isc.org/
24 CATMANPAGES = dhclient.cat8 dhclient.conf.cat5 dhclient-script.cat8 \
25               dhclient.leases.cat5
26 SEDMANPAGES = dhclient.man8 dhclient.conf.man5 dhclient-script.man8 \
27               dhclient.leases.man5
28 SRCS   = dhclient.c clparse.c
29 OBJS   = dhclient.o clparse.o
30 PROG   = dhclient
31 MAN    = dhclient.8 dhclient.conf.5 dhclient-script.8 dhclient.leases.5
33 INCLUDES = -I$(TOP) $(BINDINC) -I$(TOP)/includes
34 DHCPLIB = ../common/libdhcp.a $(BINDLIB) ../omapip/libomapi.a ../dst/libdst.a
35 CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) \
36                 -DCLIENT_PATH=${CLIENT_PATH}
38 all:    $(PROG) $(CATMANPAGES)
40 install: all
41         for dir in $(CLIENTBINDIR) $(ETC) $(FFMANDIR) $(ADMMANDIR) $(VARDB); \
42         do \
43           foo=""; \
44           for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
45             foo=$${foo}/$$bar; \
46             if [ ! -d $$foo ]; then \
47               mkdir $$foo; \
48               chmod 755 $$foo; \
49             fi; \
50           done; \
51         done
52         $(INSTALL) dhclient $(DESTDIR)$(CLIENTBINDIR)
53         $(CHMOD) 755 $(DESTDIR)$(CLIENTBINDIR)/dhclient
54         if [ x$(SCRIPT) = xnone ]; then \
55           echo "No client script available."; \
56         else \
57           $(INSTALL) $(TOP)/client/scripts/$(SCRIPT)\
58                                 $(DESTDIR)$(CLIENTBINDIR)/dhclient-script; \
59           $(CHMOD) 700 $(DESTDIR)$(CLIENTBINDIR)/dhclient-script; \
60         fi
61         $(MANINSTALL) $(MANFROM) dhclient.$(MANCAT)8 $(MANTO) \
62                         $(DESTDIR)$(ADMMANDIR)/dhclient$(ADMMANEXT)
63         $(MANINSTALL) $(MANFROM) dhclient-script.$(MANCAT)8 $(MANTO) \
64                         $(DESTDIR)$(ADMMANDIR)/dhclient-script$(ADMMANEXT)
65         $(MANINSTALL) $(MANFROM) dhclient.conf.$(MANCAT)5 $(MANTO) \
66                         $(DESTDIR)$(FFMANDIR)/dhclient.conf$(FFMANEXT)
67         $(MANINSTALL) $(MANFROM) dhclient.leases.$(MANCAT)5 $(MANTO) \
68                         $(DESTDIR)$(FFMANDIR)/dhclient.leases$(FFMANEXT)
70 depend:
71         $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
73 clean:
74         -rm -f $(OBJS)
76 realclean: clean
77         -rm -f $(PROG) $(CATMANPAGES) $(SEDMANPAGES) *~ #*
79 distclean: realclean
80         -rm -f Makefile
82 links:
83         @for foo in $(SRCS) $(MAN); do \
84           if [ ! -b $$foo ]; then \
85             rm -f $$foo; \
86           fi; \
87           ln -s $(TOP)/client/$$foo $$foo; \
88         done
90 # These should only be done on 4.4 BSD-based systems, since the mandoc
91 # macros aren't available on older unices.   Catted man pages are
92 # provided in the distribution so that this doesn't become a problem.
94 dhclient.cat8:  dhclient.man8
95         nroff -man dhclient.man8 >dhclient.cat8
97 dhclient.man8: dhclient.8
98         sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
99                 -e "s#CLIENTBINDIR#$(CLIENTBINDIR)#g" \
100                 -e "s#RUNDIR#$(VARRUN)#g" < dhclient.8 >dhclient.man8
102 dhclient-script.cat8:   dhclient-script.man8
103         nroff -man dhclient-script.man8 >dhclient-script.cat8
105 dhclient-script.man8:   dhclient-script.8
106         sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
107                 -e "s#CLIENTBINDIR#$(CLIENTBINDIR)#g" \
108                 -e "s#RUNDIR#$(VARRUN)#g" < dhclient-script.8 \
109                                                 >dhclient-script.man8
111 dhclient.conf.man5:     dhclient.conf.5
112         sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
113                 -e "s#CLIENTBINDIR#$(CLIENTBINDIR)#g" \
114                 -e "s#RUNDIR#$(VARRUN)#g" < dhclient.conf.5 \
115                                                 >dhclient.conf.man5
117 dhclient.conf.cat5:     dhclient.conf.man5
118         nroff -man dhclient.conf.man5 >dhclient.conf.cat5
120 dhclient.leases.man5:   dhclient.leases.5
121         sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
122                 -e "s#CLIENTBINDIR#$(CLIENTBINDIR)#g" \
123                 -e "s#RUNDIR#$(VARRUN)#g" < dhclient.leases.5 \
124                                                 >dhclient.leases.man5
126 dhclient.leases.cat5:   dhclient.leases.man5
127         nroff -man dhclient.leases.man5 >dhclient.leases.cat5
130 dhclient:       $(OBJS) $(DHCPLIB)
131         $(CC) $(LFLAGS) -o $(PROG) $(OBJS) $(DHCPLIB) $(LIBS)
133 # Dependencies (semi-automatically-generated)