]>
Commit | Line | Data |
---|---|---|
0959b6d4 A |
1 | # stuff to include in every test Makefile |
2 | ||
3 | SHELL = /bin/sh | |
4 | ||
412ebb8e A |
5 | # set default OS to be current Mac OS X |
6 | OS_NAME ?= MacOSX | |
7 | ifeq "$(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 |
14 | else |
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" |
21 | endif | |
0959b6d4 | 22 | |
832b6fce A |
23 | IOSROOT = |
24 | ||
412ebb8e | 25 | ifeq "$(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 | 29 | else |
832b6fce A |
30 | CC = cc -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) |
31 | CXX = c++ -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) | |
412ebb8e | 32 | endif |
bac542e6 | 33 | |
412ebb8e A |
34 | CCFLAGS = -Wall -std=c99 |
35 | CXXFLAGS = -Wall | |
0959b6d4 A |
36 | |
37 | RM = rm | |
38 | RMFLAGS = -rf | |
9e225d03 A |
39 | |
40 | SAFE_RUN = ${TESTROOT}/bin/fail-if-non-zero.pl | |
39a8cd10 | 41 | PASS_IFF = ${TESTROOT}/bin/pass-iff-exit-zero.pl |
412ebb8e A |
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 | |
39a8cd10 | 60 | |
412ebb8e A |
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 |