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