]> git.saurik.com Git - apple/libresolv.git/blob - Makefile
libresolv-46.1.tar.gz
[apple/libresolv.git] / Makefile
1 Project = resolv
2 ProductType = dylib
3 ifeq ($(RC_ProjectName),$(RC_ProjectName:%_Sim=%))
4 Install_Dir = /usr/lib
5 else
6 Install_Dir = $(SDKROOT)/usr/lib
7 endif
8
9 HFILES = dns.h dns_private.h dns_util.h dst.h dst_internal.h\
10 nameser.h res_debug.h res_private.h res_update.h resolv.h
11
12 CFILES = base64.c dns.c dns_async.c dns_util.c dst_api.c\
13 dst_hmac_link.c dst_support.c ns_date.c ns_name.c ns_netint.c\
14 ns_parse.c ns_print.c ns_samedomain.c ns_sign.c ns_ttl.c\
15 ns_verify.c res_comp.c res_data.c res_debug.c\
16 res_findzonecut.c res_init.c res_mkquery.c res_mkupdate.c\
17 res_query.c res_send.c res_sendsigned.c res_update.c
18
19 # NOTE dns_plugin.c is not included in CFILES since it isn't part of the dylib
20
21 ifeq ($(RC_ProjectName),$(RC_ProjectName:%_Sim=%))
22 MANPAGES = resolver.3 resolver.5
23 endif
24
25 ifneq ($(RC_ProjectName),$(RC_ProjectName:%_Sim=%))
26 Install_Headers_Directory = $(SDKROOT)/usr/include
27 Install_Private_Headers_Directory = $(SDKROOT)/usr/local/include
28 endif
29
30 Install_Headers = dns.h dns_util.h nameser.h resolv.h
31 Install_Private_Headers = dns_private.h
32
33 Library_Version = 9
34
35 Extra_CC_Flags = -Wall -Werror -fno-common -I.
36
37 ifeq ($(RC_TARGET_CONFIG),)
38 export PRODUCT := $(shell xcodebuild -sdk "$(SDKROOT)" -version PlatformPath | head -1 | sed 's,^.*/\([^/]*\)\.platform$$,\1,')
39 ifeq ($(PRODUCT),)
40 export PRODUCT := MacOSX
41 endif
42 else
43 export PRODUCT := $(RC_TARGET_CONFIG)
44 endif
45
46 ifeq "$(PRODUCT)" "iPhone"
47 Extra_CC_Flags += -DUSE_DNS_PSELECT
48 endif
49
50 include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
51
52 ifeq ($(RC_ProjectName),$(RC_ProjectName:%_Sim=%))
53 INSTALL_PREFIX =
54 else
55 INSTALL_PREFIX = $(SDKROOT)
56 endif
57
58 _installhdrs:: _symlink_hdrs
59
60 _symlink_hdrs:
61 $(INSTALL_DIRECTORY) $(DSTROOT)$(Install_Headers_Directory)/arpa
62 $(LN) -sf ../nameser.h $(DSTROOT)$(Install_Headers_Directory)/arpa
63
64 ifeq ($(RC_ProjectName),$(RC_ProjectName:%_Sim=%))
65 after_install: install_man
66 else
67 after_install:
68 endif
69 $(INSTALL_DIRECTORY) $(DSTROOT)$(Install_Headers_Directory)/arpa
70 $(LN) -sf ../nameser.h $(DSTROOT)$(Install_Headers_Directory)/arpa
71
72 ifeq ($(RC_ProjectName),$(RC_ProjectName:%_Sim=%))
73 install_man:
74 @for FILE in \
75 dn_comp.3 dn_expand.3 dn_skipname.3 \
76 ns_get16.3 ns_get32.3 ns_put16.3 ns_put32.3 \
77 res_init.3 res_mkquery.3 res_query.3 res_search.3 res_send.3 ; do \
78 $(INSTALL_FILE) resolver_so.3 $(DSTROOT)/usr/share/man/man3/$${FILE} ; \
79 done
80 endif