aboutsummaryrefslogtreecommitdiff
path: root/contrib/isc-dhcp/common/Makefile.dist
blob: 8d4e043bdfb05b505af0d9e128c53787d423946e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Makefile.dist
#
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
#   Internet Systems Consortium, Inc.
#   950 Charter Street
#   Redwood City, CA 94063
#   <info@isc.org>
#   http://www.isc.org/

CATMANPAGES = dhcp-options.cat5 dhcp-eval.cat5
SEDMANPAGES = dhcp-options.man5 dhcp-eval.man5
SRC    = raw.c parse.c nit.c icmp.c dispatch.c conflex.c upf.c bpf.c socket.c \
	 lpf.c dlpi.c packet.c tr.c ethernet.c iscprint.c memory.c print.c \
	 options.c inet.c tree.c tables.c alloc.c fddi.c ctrace.c dns.c \
	 resolv.c execute.c discover.c comapi.c
OBJ    = raw.o parse.o nit.o icmp.o dispatch.o conflex.o upf.o bpf.o socket.o \
	 lpf.o dlpi.o packet.o tr.o ethernet.o iscprint.o memory.o print.o \
	 options.o inet.o tree.o tables.o alloc.o fddi.o ctrace.o dns.o \
	 resolv.o execute.o discover.o comapi.o
MAN    = dhcp-options.5 dhcp-eval.5

INCLUDES = -I$(TOP) $(BINDINC) -I$(TOP)/includes
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)

all:	libdhcp.a $(CATMANPAGES)

libdhcp.a:	$(OBJ)
	rm -f libdhcp.a
	ar cruv libdhcp.a $(OBJ)
	$(RANLIB) libdhcp.a

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; \
	    fi; \
	  done; \
	done
	$(MANINSTALL) $(MANFROM) dhcp-options.$(MANCAT)5 $(MANTO) \
				$(DESTDIR)$(FFMANDIR)/dhcp-options$(FFMANEXT)
	$(MANINSTALL) $(MANFROM) dhcp-eval.$(MANCAT)5 $(MANTO) \
				$(DESTDIR)$(FFMANDIR)/dhcp-eval$(FFMANEXT)

depend:
	$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)

clean:
	-rm -f $(OBJ)

realclean: clean
	-rm -f libdhcp.a $(CATMANPAGES) $(SEDMANPAGES) *~ #*

distclean: realclean
	-rm -f Makefile

links:
	@for foo in $(SRC) $(MAN); do \
	  if [ ! -b $$foo ]; then \
	    rm -f $$foo; \
	  fi; \
	  ln -s $(TOP)/common/$$foo $$foo; \
	done

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

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

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

# Dependencies (semi-automatically-generated)