]> git.saurik.com Git - apple/libresolv.git/blob - Makefile
libresolv-38.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 build:: dns.so
34
35 PLUGIN_LD_Flags = -L$(SYMROOT) -lresolv.9
36 PLUGIN_CC_Flags = -bundle
37
38 PLUGIN_DEST = $(DSTROOT)/$(DESTDIR)usr/lib/info
39
40 dns.so: dns_plugin.c
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
44 $(INSTALL_DIRECTORY) $(PLUGIN_DEST)
45 $(INSTALL_LIBRARY) $(SYMROOT)/dns.so $(PLUGIN_DEST)
46 strip -S $(PLUGIN_DEST)/dns.so
47
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