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
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
15 # NOTE dns_plugin.c is not included in CFILES since it isn't part of the dylib
17 MANPAGES = resolver.3 resolver.5
19 Install_Headers = dns.h dns_util.h nameser.h resolv.h
20 Install_Private_Headers = dns_private.h
24 Extra_CC_Flags = -Wall -Werror -fno-common -I.
26 PRODUCT = $(shell tconf --product)
27 ifeq "$(PRODUCT)" "iPhone"
28 Extra_CC_Flags += -DUSE_DNS_PSELECT
31 include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
33 PLUGIN_LD_Flags = -L$(SYMROOT) -lresolv.9
34 PLUGIN_CC_Flags = -bundle
36 PLUGIN_DEST = $(DSTROOT)/$(DESTDIR)usr/lib/info
40 _installhdrs:: _symlink_hdrs
43 $(CC) -c $(CFLAGS) dns_plugin.c
44 $(CC) $(PLUGIN_CC_Flags) $(LDFLAGS) $(PLUGIN_LD_Flags) -o $(SYMROOT)/dns.so dns_plugin.o
45 $(DSYMUTIL) --out=$(SYMROOT)/dns.so.dSYM $(SYMROOT)/dns.so || exit 0
46 $(INSTALL_DIRECTORY) $(PLUGIN_DEST)
47 $(INSTALL_LIBRARY) $(SYMROOT)/dns.so $(PLUGIN_DEST)
48 $(STRIP) -S $(PLUGIN_DEST)/dns.so
51 $(INSTALL_DIRECTORY) $(DSTROOT)/usr/include/arpa
52 $(LN) -sf ../nameser.h $(DSTROOT)/usr/include/arpa
55 $(INSTALL_DIRECTORY) $(DSTROOT)/usr/include/arpa
56 $(LN) -sf ../nameser.h $(DSTROOT)/usr/include/arpa
58 dn_comp.3 dn_expand.3 dn_skipname.3 \
59 ns_get16.3 ns_get32.3 ns_put16.3 ns_put32.3 \
60 res_init.3 res_mkquery.3 res_query.3 res_search.3 res_send.3 ; do \
61 $(INSTALL_FILE) resolver_so.3 $(DSTROOT)/usr/share/man/man3/$${FILE} ; \