]> git.saurik.com Git - apple/libresolv.git/blob - Makefile
libresolv-41.tar.gz
[apple/libresolv.git] / Makefile
1 Project = resolv
2 ProductType = dylib
3 Install_Dir = /usr/lib
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
15 # NOTE dns_plugin.c is not included in CFILES since it isn't part of the dylib
16
17 MANPAGES = resolver.3 resolver.5
18
19 Install_Headers = dns.h dns_util.h nameser.h resolv.h
20 Install_Private_Headers = dns_private.h
21
22 Library_Version = 9
23
24 Extra_CC_Flags = -Wall -Werror -fno-common -I.
25
26 PRODUCT = $(shell tconf --product)
27 ifeq "$(PRODUCT)" "iPhone"
28 Extra_CC_Flags += -DUSE_DNS_PSELECT
29 endif
30
31 include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
32
33 PLUGIN_LD_Flags = -L$(SYMROOT) -lresolv.9
34 PLUGIN_CC_Flags = -bundle
35
36 PLUGIN_DEST = $(DSTROOT)/$(DESTDIR)usr/lib/info
37
38 build:: dns.so
39
40 _installhdrs:: _symlink_hdrs
41
42 dns.so: dns_plugin.c
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
49
50 _symlink_hdrs:
51 $(INSTALL_DIRECTORY) $(DSTROOT)/usr/include/arpa
52 $(LN) -sf ../nameser.h $(DSTROOT)/usr/include/arpa
53
54 after_install:
55 $(INSTALL_DIRECTORY) $(DSTROOT)/usr/include/arpa
56 $(LN) -sf ../nameser.h $(DSTROOT)/usr/include/arpa
57 @for FILE in \
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} ; \
62 done