]> git.saurik.com Git - apple/dyld.git/blob - unit-tests/include/common.makefile
dyld-210.2.3.tar.gz
[apple/dyld.git] / unit-tests / include / common.makefile
1 # stuff to include in every test Makefile
2
3 SHELL = /bin/sh
4
5 # set default OS to be current Mac OS X
6 OS_NAME ?= MacOSX
7 ifeq "$(OS_NAME)" "iPhoneOS"
8 OS_VERSION ?= 3.1
9 ifeq "$(findstring -$(OS_VERSION)-,-3.0-3.1-3.2-4.0-4.1-4.2-4.3-)" ""
10 OS_LION_FEATURES = 1
11 endif
12 ARCH ?= armv7
13 VALID_ARCHS ?= armv7
14 else
15 OS_VERSION ?= 10.7
16 ifeq "$(findstring -$(OS_VERSION)-,-10.4-10.5-10.6-)" ""
17 OS_LION_FEATURES = 1
18 endif
19 ARCH ?= x86_64
20 VALID_ARCHS ?= "i386 x86_64"
21 endif
22
23 IOSROOT =
24
25 ifeq "$(OS_NAME)" "iPhoneOS"
26 IOSROOT = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.Internal.sdk
27 CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cc -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) -isysroot $(IOSROOT)
28 CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/c++ -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) -isysroot $(IOSROOT)
29 else
30 CC = cc -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION)
31 CXX = c++ -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION)
32 endif
33
34 CCFLAGS = -Wall -std=c99
35 CXXFLAGS = -Wall
36
37 RM = rm
38 RMFLAGS = -rf
39
40 SAFE_RUN = ${TESTROOT}/bin/fail-if-non-zero.pl
41 PASS_IFF = ${TESTROOT}/bin/pass-iff-exit-zero.pl
42 PASS_IFF_FAILURE = $(TESTROOT)/bin/exit-non-zero-pass.pl
43
44 ifeq ($(ARCH),armv7)
45 CCFLAGS += -mno-thumb
46 CXXFLAGS += -mno-thumb
47 override FILEARCH = arm
48 else
49 FILEARCH = $(ARCH)
50 endif
51
52 ifeq ($(ARCH),thumb)
53 CCFLAGS += -mthumb
54 CXXFLAGS += -mthumb
55 override ARCH = armv6
56 override FILEARCH = arm
57 else
58 FILEARCH = $(ARCH)
59 endif
60
61 ifeq ($(ARCH),thumb2)
62 CCFLAGS += -mthumb
63 CXXFLAGS += -mthumb
64 override ARCH = armv7
65 override FILEARCH = arm
66 else
67 FILEARCH = $(ARCH)
68 endif