]> git.saurik.com Git - apple/configd.git/blob - tests/Makefile
configd-963.250.1.tar.gz
[apple/configd.git] / tests / Makefile
1 PLATFORM=iphoneos
2
3 ifeq ($(PLATFORM),iphoneos)
4 ARCHS=armv7
5 endif
6
7 ifeq ($(PLATFORM),macosx)
8 ARCHS=i386 x86_64
9 endif
10
11 FRAMEWORKS=CoreFoundation SystemConfiguration CFNetwork
12 SDK=$(PLATFORM).internal
13 SYSROOT=$(shell xcodebuild -version -sdk $(SDK) Path)
14 PF_INC=-F$(SYSROOT)/System/Library/PrivateFrameworks
15 ARCH_FLAGS=$(foreach a,$(ARCHS),-arch $(a))
16 FW_FLAGS=$(foreach f,$(FRAMEWORKS),-framework $(f))
17 CC=xcrun -sdk $(SDK) cc
18
19 ReachabilityTester : ReachabilityTester.c
20 $(CC) $(ARCH_FLAGS) -isysroot $(SYSROOT) $(PF_INC) $(FW_FLAGS) -g -o $@ $<
21 tar -czf $@.tgz $@ $@.dSYM $<
22
23 clean :
24 rm -rf ReachabilityTester ReachabilityTester.dSYM ReachabilityTester.tgz