]>
Commit | Line | Data |
---|---|---|
d696c285 A |
1 | # stuff to include in every test Makefile |
2 | ||
3 | SHELL = /bin/sh | |
4 | ||
5 | # set default to be host | |
6 | ARCH ?= $(shell arch) | |
7 | ||
8 | # set default to be all | |
a61fdf0a A |
9 | VALID_ARCHS ?= "ppc ppc64 i386 x86_64" |
10 | ||
11 | MYDIR=$(shell cd ../../bin;pwd) | |
d696c285 A |
12 | |
13 | # if run within Xcode, add the just built tools to the command path | |
14 | ifdef BUILT_PRODUCTS_DIR | |
a61fdf0a A |
15 | PATH := ${BUILT_PRODUCTS_DIR}:${MYDIR}:${PATH} |
16 | COMPILER_PATH := ${BUILT_PRODUCTS_DIR}:${MYDIR}:${COMPILER_PATH} | |
17 | else | |
18 | PATH := ${MYDIR}:${PATH}: | |
19 | COMPILER_PATH := ${MYDIR}:${COMPILER_PATH}: | |
d696c285 | 20 | endif |
a61fdf0a A |
21 | export PATH |
22 | export COMPILER_PATH | |
d696c285 A |
23 | |
24 | LD = ld | |
25 | OBJECTDUMP = ObjectDump | |
26 | MACHOCHECK = machocheck | |
d696c285 | 27 | OTOOL = otool |
d696c285 A |
28 | |
29 | CC = gcc-4.0 -arch ${ARCH} | |
69a49097 | 30 | CCFLAGS = -Wall -std=c99 |
d696c285 A |
31 | ASMFLAGS = |
32 | ||
33 | CXX = g++-4.0 -arch ${ARCH} | |
69a49097 | 34 | CXXFLAGS = -Wall |
d696c285 A |
35 | |
36 | RM = rm | |
37 | RMFLAGS = -rf | |
38 | ||
39 | # utilites for Makefiles | |
a61fdf0a A |
40 | PASS_IFF = pass-iff-exit-zero.pl |
41 | PASS_IFF_SUCCESS = ${PASS_IFF} | |
42 | PASS_IFF_EMPTY = pass-iff-no-stdin.pl | |
43 | PASS_IFF_STDIN = pass-iff-stdin.pl | |
44 | FAIL_IFF = fail-iff-exit-zero.pl | |
45 | FAIL_IFF_SUCCESS = ${FAIL_IFF} | |
46 | PASS_IFF_ERROR = pass-iff-exit-non-zero.pl | |
47 | FAIL_IF_ERROR = fail-if-exit-non-zero.pl | |
48 | FAIL_IF_SUCCESS = fail-if-exit-zero.pl | |
49 | FAIL_IF_EMPTY = fail-if-no-stdin.pl | |
50 | FAIL_IF_STDIN = fail-if-stdin.pl | |
51 | PASS_IFF_GOOD_MACHO = ${PASS_IFF} ${MACHOCHECK} | |
52 | FAIL_IF_BAD_MACHO = ${FAIL_IF_ERROR} ${MACHOCHECK} | |
53 | FAIL_IF_BAD_OBJ = ${FAIL_IF_ERROR} ${OBJECTDUMP} >/dev/null |