]> git.saurik.com Git - apple/configd.git/blob - IPMonitorControl/Makefile
configd-963.50.8.tar.gz
[apple/configd.git] / IPMonitorControl / Makefile
1 # Default platform uses the native SDK.
2 # To build for Mac OS X using internal SDK, use 'make PLATFORM=macosx <target>'
3 # To build for iOS, use 'make PLATFORM=iphoneos <target>'
4
5 ifeq ($(PLATFORM),iphoneos)
6 # iOS internal SDK
7 CORETELEPHONY=-framework CoreTelephony
8 ARCHS=armv7
9 endif
10
11 ifeq ($(PLATFORM),macosx)
12 # Mac OS X internal SDK
13 ARCHS=i386 x86_64
14 CORETELEPHONY=
15 endif
16
17 ifeq ($(PLATFORM),)
18 # Mac OS X native SDK
19 ARCHS=x86_64
20 CORETELEPHONY=
21 CC = cc
22 SYSROOT = /
23 PF_INC = -F/System/Library/PrivateFrameworks
24 else
25 # Mac OS X or iOS internal SDK
26 SDK=$(PLATFORM).internal
27 SYSROOT=$(shell xcodebuild -version -sdk $(SDK) Path)
28 CC = xcrun -sdk $(SDK) cc
29 PF_INC = -F$(SYSROOT)/System/Library/PrivateFrameworks
30 endif
31
32 SC_PRIV=-DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS
33 ARCH_FLAGS=$(foreach a,$(ARCHS),-arch $(a))
34
35 if_rank_assert: IPMonitorControlServer.c IPMonitorControl.c main.c
36 $(CC) $(SC_PRIV) -DTEST_IPMONITOR_CONTROL -I$(SYSROOT)/System/Library/Frameworks/System.framework/PrivateHeaders $(ARCH_FLAGS) -isysroot $(SYSROOT) $(PF_INC) -framework CoreFoundation -framework SystemConfiguration -Wall -g -o $@ $^
37
38 clean:
39 rm -rf *.dSYM *~ *.o if_rank_assert