]>
Commit | Line | Data |
---|---|---|
9571391b A |
1 | Project = resolv |
2 | ProductType = dylib | |
3 | Install_Dir = /usr/lib | |
8a97ab44 A |
4 | |
5 | HFILES = dns.h dns_private.h dns_util.h dst.h dst_internal.h\ | |
6 | nameser.h res_debug.h res_private.h res_update.h resolv.h | |
7 | ||
8 | CFILES = base64.c dns.c dns_async.c dns_util.c dst_api.c\ | |
9 | dst_hmac_link.c dst_support.c ns_date.c ns_name.c ns_netint.c\ | |
10 | ns_parse.c ns_print.c ns_samedomain.c ns_sign.c ns_ttl.c\ | |
11 | ns_verify.c res_comp.c res_data.c res_debug.c\ | |
12 | res_findzonecut.c res_init.c res_mkquery.c res_mkupdate.c\ | |
13 | res_query.c res_send.c res_sendsigned.c res_update.c | |
14 | ||
9571391b | 15 | # NOTE dns_plugin.c is not included in CFILES since it isn't part of the dylib |
8a97ab44 | 16 | |
9571391b | 17 | MANPAGES = resolver.3 resolver.5 |
8a97ab44 | 18 | |
9571391b A |
19 | Install_Headers = dns.h dns_util.h nameser.h resolv.h |
20 | Install_Private_Headers = dns_private.h | |
8a97ab44 | 21 | |
9571391b | 22 | Library_Version = 9 |
8a97ab44 | 23 | |
9571391b | 24 | Extra_CC_Flags = -Wall -Werror -fno-common -I. |
8a97ab44 | 25 | |
9571391b A |
26 | PRODUCT = $(shell tconf --product) |
27 | ifeq "$(PRODUCT)" "iPhone" | |
28 | Extra_CC_Flags += -DUSE_DNS_PSELECT | |
29 | endif | |
8a97ab44 | 30 | |
9571391b | 31 | include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make |
8a97ab44 | 32 | |
9571391b A |
33 | PLUGIN_LD_Flags = -L$(SYMROOT) -lresolv.9 |
34 | PLUGIN_CC_Flags = -bundle | |
8a97ab44 | 35 | |
9571391b | 36 | PLUGIN_DEST = $(DSTROOT)/$(DESTDIR)usr/lib/info |
8a97ab44 | 37 | |
32f36864 A |
38 | build:: dns.so |
39 | ||
9571391b | 40 | dns.so: dns_plugin.c |
32f36864 A |
41 | $(CC) -c $(CFLAGS) dns_plugin.c |
42 | $(CC) $(PLUGIN_CC_Flags) $(LDFLAGS) $(PLUGIN_LD_Flags) -o $(SYMROOT)/dns.so dns_plugin.o | |
43 | $(DSYMUTIL) --out=$(SYMROOT)/dns.so.dSYM $(SYMROOT)/dns.so || exit 0 | |
9571391b A |
44 | $(INSTALL_DIRECTORY) $(PLUGIN_DEST) |
45 | $(INSTALL_LIBRARY) $(SYMROOT)/dns.so $(PLUGIN_DEST) | |
32f36864 | 46 | $(STRIP) -S $(PLUGIN_DEST)/dns.so |
8a97ab44 | 47 | |
9571391b A |
48 | after_install: |
49 | $(INSTALL_DIRECTORY) $(DSTROOT)/usr/include/arpa | |
50 | $(LN) -sf ../nameser.h $(DSTROOT)/usr/include/arpa | |
51 | @for FILE in \ | |
52 | dn_comp.3 dn_expand.3 dn_skipname.3 \ | |
53 | ns_get16.3 ns_get32.3 ns_put16.3 ns_put32.3 \ | |
54 | res_init.3 res_mkquery.3 res_query.3 res_search.3 res_send.3 ; do \ | |
55 | $(INSTALL_FILE) resolver_so.3 $(DSTROOT)/usr/share/man/man3/$${FILE} ; \ | |
56 | done |