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>'
5 ifeq ($(PLATFORM),iphoneos)
7 CORETELEPHONY=-framework CoreTelephony
11 ifeq ($(PLATFORM),macosx)
12 # Mac OS X internal SDK
23 PF_INC = -F/System/Library/PrivateFrameworks
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
32 SC_PRIV=-DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS
33 ARCH_FLAGS=$(foreach a,$(ARCHS),-arch $(a))
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 $@ $^
39 rm -rf *.dSYM *~ *.o if_rank_assert