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 ARCH_FLAGS=$(foreach a,$(ARCHS),-arch $(a))
34 if_rank_assert: IPMonitorControlServer.c IPMonitorControl.c main.c
35 $(CC) -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 IPMonitorAWDReportTest: IPMonitorAWDReport.m
38 $(CC) -isysroot $(SYSROOT) $(ARCH_FLAGS) -g -Wall -DTEST_IPMONITOR_AWD_REPORT -framework Foundation -weak_framework WirelessDiagnostics -framework CoreFoundation -framework SystemConfiguration -framework ProtocolBuffer $(PF_INC) -I AWD AWD/AWDIPMonitorInterfaceAdvisoryReport.m -o $@ $^
41 rm -rf *.dSYM *~ *.o if_rank_assert