Makefile.dist 3.09 KB
Newer Older
Ted Lemon's avatar
Ted Lemon committed
1 2
# Makefile.dist
#
Ted Lemon's avatar
Ted Lemon committed
3 4 5 6 7 8
# Copyright (c) 1996-1999 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it.   If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
Ted Lemon's avatar
Ted Lemon committed
9
#
Ted Lemon's avatar
Ted Lemon committed
10
#             http://www.isc.org/isc-license-1.0.html. 
Ted Lemon's avatar
Ted Lemon committed
11
#
Ted Lemon's avatar
Ted Lemon committed
12 13 14
# This file is part of the ISC DHCP distribution.   The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
Ted Lemon's avatar
Ted Lemon committed
15
#
Ted Lemon's avatar
Ted Lemon committed
16 17
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
Ted Lemon's avatar
Ted Lemon committed
18 19
#

Ted Lemon's avatar
Ted Lemon committed
20
CATMANPAGES = dhcp-options.cat5 dhcp-contrib.cat5 dhcp-eval.cat5
21
SEDMANPAGES = dhcp-options.man5 dhcp-contrib.man5 dhcp-eval.man5
Ted Lemon's avatar
Ted Lemon committed
22
SRC    = raw.c parse.c nit.c icmp.c dispatch.c conflex.c upf.c bpf.c socket.c \
Ted Lemon's avatar
Ted Lemon committed
23
	 lpf.c dlpi.c packet.c tr.c ethernet.c memory.c print.c options.c \
24
	 inet.c convert.c tree.c tables.c hash.c alloc.c \
Ted Lemon's avatar
Ted Lemon committed
25
	 inet_addr.c dns.c resolv.c execute.c discover.c auth.c
Ted Lemon's avatar
Ted Lemon committed
26
OBJ    = raw.o parse.o nit.o icmp.o dispatch.o conflex.o upf.o bpf.o socket.o \
Ted Lemon's avatar
Ted Lemon committed
27
	 lpf.o dlpi.o packet.o tr.o ethernet.o memory.o print.o options.o \
28
	 inet.o convert.o tree.o tables.o hash.o alloc.o \
Ted Lemon's avatar
Ted Lemon committed
29
	 inet_addr.o dns.o resolv.o execute.o discover.o auth.o
Ted Lemon's avatar
Ted Lemon committed
30
MAN    = dhcp-options.5 dhcp-contrib.5 dhcp-eval.5
Ted Lemon's avatar
Ted Lemon committed
31 32

DEBUG  = -g
33
INCLUDES = -I.. $(BINDINC) -I../includes
Ted Lemon's avatar
Ted Lemon committed
34 35
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)

Ted Lemon's avatar
Ted Lemon committed
36
all:	libdhcp.a $(CATMANPAGES)
Ted Lemon's avatar
Ted Lemon committed
37 38 39 40

libdhcp.a:	$(OBJ)
	rm -f libdhcp.a
	ar cruv libdhcp.a $(OBJ)
Ted Lemon's avatar
Ted Lemon committed
41
	$(RANLIB) libdhcp.a
Ted Lemon's avatar
Ted Lemon committed
42

43 44 45 46 47 48 49 50
install: all
	for dir in $(FFMANDIR); do \
	  foo=""; \
	  for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
	    foo=$${foo}/$$bar; \
	    if [ ! -d $$foo ]; then \
	      mkdir $$foo; \
	      chmod 755 $$foo; \
51 52 53
	    fi; \
	  done; \
	done
54
	$(MANINSTALL) $(MANFROM) dhcp-options.$(MANCAT)5 $(MANTO) \
55
				$(DESTDIR)$(FFMANDIR)/dhcp-options$(FFMANEXT)
56 57 58 59
	$(MANINSTALL) $(MANFROM) dhcp-eval.$(MANCAT)5 $(MANTO) \
				$(DESTDIR)$(FFMANDIR)/dhcp-eval$(FFMANEXT)
	$(MANINSTALL) $(MANFROM) dhcp-contrib.$(MANCAT)5 $(MANTO) \
				$(DESTDIR)$(FFMANDIR)/dhcp-contrib$(FFMANEXT)
Ted Lemon's avatar
Ted Lemon committed
60

Ted Lemon's avatar
Ted Lemon committed
61 62 63
depend:
	makedepend $(INCLUDES) $(PREDEFINES) $(SRCS)

Ted Lemon's avatar
Ted Lemon committed
64 65
clean:
	-rm -f $(OBJ)
66

Ted Lemon's avatar
Ted Lemon committed
67
realclean: clean
68
	-rm -f libdhcp.a *~ $(CATMANPAGES) $(SEDMANPAGES)
Ted Lemon's avatar
Ted Lemon committed
69 70 71 72

distclean: realclean
	-rm -f Makefile

73 74
dhcp-options.cat5:	dhcp-options.man5
	nroff -man dhcp-options.man5 >dhcp-options.cat5
Ted Lemon's avatar
Ted Lemon committed
75

76 77 78
dhcp-options.man5:	dhcp-options.5
	sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
		-e "s#RUNDIR#$(VARRUN)#g" < dhcp-options.5 >dhcp-options.man5
Ted Lemon's avatar
Ted Lemon committed
79

80 81 82 83 84 85 86 87 88 89 90 91 92
dhcp-eval.cat5:	dhcp-eval.man5
	nroff -man dhcp-eval.man5 >dhcp-eval.cat5

dhcp-eval.man5:	dhcp-eval.5
	sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
		-e "s#RUNDIR#$(VARRUN)#g" < dhcp-eval.5 >dhcp-eval.man5

dhcp-contrib.cat5:	dhcp-contrib.man5
	nroff -man dhcp-contrib.man5 >dhcp-contrib.cat5

dhcp-contrib.man5:	dhcp-contrib.5
	sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
		-e "s#RUNDIR#$(VARRUN)#g" < dhcp-contrib.5 >dhcp-contrib.man5
Ted Lemon's avatar
Ted Lemon committed
93

Ted Lemon's avatar
Ted Lemon committed
94
# Dependencies (semi-automatically-generated)