1 ifeq ($(PLATFORM),iphoneos)
10 ifeq ($(PLATFORM),macosx)
11 # Mac OS X internal SDK
15 # Mac OS X or iOS internal SDK
16 SDK=$(PLATFORM).internal
17 SYSROOT=$(shell xcodebuild -version -sdk $(SDK) Path)
18 CC = xcrun -sdk $(SDK) cc
19 PF_INC = -F$(SYSROOT)/System/Library/PrivateFrameworks
21 ARCH_FLAGS=$(foreach a,$(ARCHS),-arch $(a))
23 TEST_INCLUDE=-I. -I../dnsinfo -I../libSystemConfiguration -I../SystemConfiguration.fproj -I$(SYSROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
25 REFERENCE_OUTPUT=../common/reference_output.sh
28 rm -rf test_nwi *.o *.dSYM
30 test_nwi:network_information.c network_information_priv.c ../libSystemConfiguration/libSystemConfiguration_client.c
31 $(CC) -DTEST_NWI $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) $(TEST_INCLUDE) $(EXTRA_CFLAGS) -Wall -O0 -g -o $@ $^
33 test_nwi_reference.txt: test_nwi
34 sh $(REFERENCE_OUTPUT) create test_nwi test_nwi_reference.txt /bin/cat
36 test_nwi_test: test_nwi
37 sh $(REFERENCE_OUTPUT) test test_nwi test_nwi_reference.txt /bin/cat
39 nwi:network_information.c network_information_priv.c ../libSystemConfiguration/libSystemConfiguration_client.c
40 $(CC) -DTEST_NWI_STATE $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) $(TEST_INCLUDE) $(EXTRA_CFLAGS) -Wall -O0 -g -o $@ $^