Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / dns / Makefile.in
blobbbc5e9884b3074208197fb644d50458bc426aff6
1 SHELL = /bin/sh
2 SRCS = dns_lookup.c dns_rr.c dns_strerror.c dns_strtype.c dns_rr_to_pa.c \
3 dns_sa_to_rr.c dns_rr_eq_sa.c dns_rr_to_sa.c
4 OBJS = dns_lookup.o dns_rr.o dns_strerror.o dns_strtype.o dns_rr_to_pa.o \
5 dns_sa_to_rr.o dns_rr_eq_sa.o dns_rr_to_sa.o
6 HDRS = dns.h
7 TESTSRC = test_dns_lookup.c test_alias_token.c
8 DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE)
9 CFLAGS = $(DEBUG) $(OPT) $(DEFS)
10 INCL =
11 LIB = libdns.a
12 TESTPROG= test_dns_lookup dns_rr_to_pa dns_rr_to_sa dns_sa_to_rr dns_rr_eq_sa
13 LIBS = ../../lib/libutil.a
14 LIB_DIR = ../../lib
15 INC_DIR = ../../include
17 .c.o:; $(CC) $(CFLAGS) -c $*.c
19 all: $(LIB)
21 $(OBJS): ../../conf/makedefs.out
23 Makefile: Makefile.in
24 cat ../../conf/makedefs.out $? >$@
26 test: $(TESTPROG)
28 tests: test dns_rr_to_pa_test dns_rr_to_sa_test dns_sa_to_rr_test \
29 dns_rr_eq_sa_test
31 root_tests:
33 $(LIB): $(OBJS)
34 $(AR) $(ARFL) $(LIB) $?
35 $(RANLIB) $(LIB)
37 $(LIB_DIR)/$(LIB): $(LIB)
38 cp $(LIB) $(LIB_DIR)
39 $(RANLIB) $(LIB_DIR)/$(LIB)
41 update: $(LIB_DIR)/$(LIB) $(HDRS)
42 -for i in $(HDRS); \
43 do \
44 cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
45 done
46 cd $(INC_DIR); chmod 644 $(HDRS)
48 test_dns_lookup: test_dns_lookup.c $(LIB) $(LIBS)
49 $(CC) $(CFLAGS) -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
51 dns_rr_to_pa: $(LIB) $(LIBS)
52 mv $@.o junk
53 $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
54 mv junk $@.o
56 dns_rr_to_sa: $(LIB) $(LIBS)
57 mv $@.o junk
58 $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
59 mv junk $@.o
61 dns_sa_to_rr: $(LIB) $(LIBS)
62 mv $@.o junk
63 $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
64 mv junk $@.o
66 dns_rr_eq_sa: $(LIB) $(LIBS)
67 mv $@.o junk
68 $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
69 mv junk $@.o
71 dns_rr_to_pa_test: dns_rr_to_pa dns_rr_to_pa.in dns_rr_to_pa.ref
72 ./dns_rr_to_pa `cat dns_rr_to_pa.in` >dns_rr_to_pa.tmp
73 diff dns_rr_to_pa.ref dns_rr_to_pa.tmp
74 rm -f dns_rr_to_pa.tmp
76 dns_rr_to_sa_test: dns_rr_to_sa dns_rr_to_sa.in dns_rr_to_sa.ref
77 ./dns_rr_to_sa `cat dns_rr_to_sa.in` >dns_rr_to_sa.tmp
78 diff dns_rr_to_sa.ref dns_rr_to_sa.tmp
79 rm -f dns_rr_to_sa.tmp
81 dns_sa_to_rr_test: dns_sa_to_rr dns_sa_to_rr.in dns_sa_to_rr.ref
82 ./dns_sa_to_rr `cat dns_sa_to_rr.in` >dns_sa_to_rr.tmp
83 diff dns_sa_to_rr.ref dns_sa_to_rr.tmp
84 rm -f dns_sa_to_rr.tmp
86 dns_rr_eq_sa_test: dns_rr_eq_sa dns_rr_eq_sa.in dns_rr_eq_sa.ref
87 ./dns_rr_eq_sa `cat dns_rr_eq_sa.in` >dns_rr_eq_sa.tmp
88 diff dns_rr_eq_sa.ref dns_rr_eq_sa.tmp
89 rm -f dns_rr_eq_sa.tmp
91 printfck: $(OBJS) $(PROG)
92 rm -rf printfck
93 mkdir printfck
94 cp *.h printfck
95 sed '1,/^# do not edit/!d' Makefile >printfck/Makefile
96 set -e; for i in *.c; do printfck -f .printfck $$i >printfck/$$i; done
97 cd printfck; make "INC_DIR=../../../include" `cd ..; ls *.o`
99 lint:
100 lint $(DEFS) $(SRCS) $(LINTFIX)
102 clean:
103 rm -f *.o $(LIB) *core $(TESTPROG) junk
104 rm -rf printfck
106 tidy: clean
108 depend: $(MAKES)
109 (sed '1,/^# do not edit/!d' Makefile.in; \
110 set -e; for i in [a-z][a-z0-9]*.c; do \
111 $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
112 -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
113 -e 's/o: \.\//o: /' -e p -e '}' ; \
114 done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
115 @$(EXPORT) make -f Makefile.in Makefile 1>&2
117 # do not edit below this line - it is generated by 'make depend'
118 dns_lookup.o: ../../include/msg.h
119 dns_lookup.o: ../../include/myaddrinfo.h
120 dns_lookup.o: ../../include/mymalloc.h
121 dns_lookup.o: ../../include/sock_addr.h
122 dns_lookup.o: ../../include/stringops.h
123 dns_lookup.o: ../../include/sys_defs.h
124 dns_lookup.o: ../../include/valid_hostname.h
125 dns_lookup.o: ../../include/vbuf.h
126 dns_lookup.o: ../../include/vstring.h
127 dns_lookup.o: dns.h
128 dns_lookup.o: dns_lookup.c
129 dns_rr.o: ../../include/msg.h
130 dns_rr.o: ../../include/myaddrinfo.h
131 dns_rr.o: ../../include/mymalloc.h
132 dns_rr.o: ../../include/myrand.h
133 dns_rr.o: ../../include/sock_addr.h
134 dns_rr.o: ../../include/sys_defs.h
135 dns_rr.o: ../../include/vbuf.h
136 dns_rr.o: ../../include/vstring.h
137 dns_rr.o: dns.h
138 dns_rr.o: dns_rr.c
139 dns_rr_eq_sa.o: ../../include/msg.h
140 dns_rr_eq_sa.o: ../../include/myaddrinfo.h
141 dns_rr_eq_sa.o: ../../include/sock_addr.h
142 dns_rr_eq_sa.o: ../../include/sys_defs.h
143 dns_rr_eq_sa.o: ../../include/vbuf.h
144 dns_rr_eq_sa.o: ../../include/vstring.h
145 dns_rr_eq_sa.o: dns.h
146 dns_rr_eq_sa.o: dns_rr_eq_sa.c
147 dns_rr_to_pa.o: ../../include/msg.h
148 dns_rr_to_pa.o: ../../include/myaddrinfo.h
149 dns_rr_to_pa.o: ../../include/sock_addr.h
150 dns_rr_to_pa.o: ../../include/sys_defs.h
151 dns_rr_to_pa.o: ../../include/vbuf.h
152 dns_rr_to_pa.o: ../../include/vstring.h
153 dns_rr_to_pa.o: dns.h
154 dns_rr_to_pa.o: dns_rr_to_pa.c
155 dns_rr_to_sa.o: ../../include/msg.h
156 dns_rr_to_sa.o: ../../include/myaddrinfo.h
157 dns_rr_to_sa.o: ../../include/sock_addr.h
158 dns_rr_to_sa.o: ../../include/sys_defs.h
159 dns_rr_to_sa.o: ../../include/vbuf.h
160 dns_rr_to_sa.o: ../../include/vstring.h
161 dns_rr_to_sa.o: dns.h
162 dns_rr_to_sa.o: dns_rr_to_sa.c
163 dns_sa_to_rr.o: ../../include/msg.h
164 dns_sa_to_rr.o: ../../include/myaddrinfo.h
165 dns_sa_to_rr.o: ../../include/sock_addr.h
166 dns_sa_to_rr.o: ../../include/sys_defs.h
167 dns_sa_to_rr.o: ../../include/vbuf.h
168 dns_sa_to_rr.o: ../../include/vstring.h
169 dns_sa_to_rr.o: dns.h
170 dns_sa_to_rr.o: dns_sa_to_rr.c
171 dns_strerror.o: ../../include/myaddrinfo.h
172 dns_strerror.o: ../../include/sock_addr.h
173 dns_strerror.o: ../../include/sys_defs.h
174 dns_strerror.o: ../../include/vbuf.h
175 dns_strerror.o: ../../include/vstring.h
176 dns_strerror.o: dns.h
177 dns_strerror.o: dns_strerror.c
178 dns_strtype.o: ../../include/myaddrinfo.h
179 dns_strtype.o: ../../include/sock_addr.h
180 dns_strtype.o: ../../include/sys_defs.h
181 dns_strtype.o: ../../include/vbuf.h
182 dns_strtype.o: ../../include/vstring.h
183 dns_strtype.o: dns.h
184 dns_strtype.o: dns_strtype.c
185 test_dns_lookup.o: ../../include/argv.h
186 test_dns_lookup.o: ../../include/msg.h
187 test_dns_lookup.o: ../../include/msg_vstream.h
188 test_dns_lookup.o: ../../include/myaddrinfo.h
189 test_dns_lookup.o: ../../include/mymalloc.h
190 test_dns_lookup.o: ../../include/sock_addr.h
191 test_dns_lookup.o: ../../include/sys_defs.h
192 test_dns_lookup.o: ../../include/vbuf.h
193 test_dns_lookup.o: ../../include/vstream.h
194 test_dns_lookup.o: ../../include/vstring.h
195 test_dns_lookup.o: dns.h
196 test_dns_lookup.o: test_dns_lookup.c