1 # stuff to include in every test Makefile
5 # set default to be host
8 # set default to be all
9 VALID_ARCHS ?= "ppc ppc64 i386 x86_64"
11 MYDIR=$(shell cd ../../bin;pwd)
13 # if run within Xcode, add the just built tools to the command path
14 ifdef BUILT_PRODUCTS_DIR
15 PATH := ${BUILT_PRODUCTS_DIR}:${MYDIR}:${PATH}
16 COMPILER_PATH := ${BUILT_PRODUCTS_DIR}:${MYDIR}:${COMPILER_PATH}
18 PATH := ${MYDIR}:${PATH}:
19 COMPILER_PATH := ${MYDIR}:${COMPILER_PATH}:
25 OBJECTDUMP = ObjectDump
26 MACHOCHECK = machocheck
29 CC = gcc-4.0 -arch ${ARCH}
30 CCFLAGS = -Wall -std=c99
33 CXX = g++-4.0 -arch ${ARCH}
39 # utilites for Makefiles
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