X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/74cfe461234fcf76aadb30ed686f281f06b555cd..a61fdf0a731e23ff7eb0cc86ba748fd9af5de879:/unit-tests/include/common.makefile diff --git a/unit-tests/include/common.makefile b/unit-tests/include/common.makefile index 266eb85..8462385 100644 --- a/unit-tests/include/common.makefile +++ b/unit-tests/include/common.makefile @@ -6,25 +6,25 @@ SHELL = /bin/sh ARCH ?= $(shell arch) # set default to be all -VALID_ARCHS ?= "ppc ppc64 i386" +VALID_ARCHS ?= "ppc ppc64 i386 x86_64" + +MYDIR=$(shell cd ../../bin;pwd) # if run within Xcode, add the just built tools to the command path ifdef BUILT_PRODUCTS_DIR - PATH := ${BUILT_PRODUCTS_DIR}:${PATH} + PATH := ${BUILT_PRODUCTS_DIR}:${MYDIR}:${PATH} + COMPILER_PATH := ${BUILT_PRODUCTS_DIR}:${MYDIR}:${COMPILER_PATH} +else + PATH := ${MYDIR}:${PATH}: + COMPILER_PATH := ${MYDIR}:${COMPILER_PATH}: endif +export PATH +export COMPILER_PATH LD = ld OBJECTDUMP = ObjectDump MACHOCHECK = machocheck - OTOOL = otool -ifeq (${ARCH},ppc64) -OTOOL = otool64 -endif -ifeq (${ARCH},x86_64) -OTOOL = otool64 -endif - CC = gcc-4.0 -arch ${ARCH} CCFLAGS = -Wall -std=c99 @@ -37,12 +37,17 @@ RM = rm RMFLAGS = -rf # utilites for Makefiles -PASS_IFF = ${TESTROOT}/bin/pass-iff-exit-zero.pl -PASS_IFF_EMPTY = ${TESTROOT}/bin/pass-iff-no-stdin.pl -PASS_IFF_STDIN = ${TESTROOT}/bin/pass-iff-stdin.pl -PASS_IFF_GOOD_MACHO = ${TESTROOT}/bin/pass-iff-exit-zero.pl ${MACHOCHECK} -FAIL_IFF = ${TESTROOT}/bin/fail-iff-exit-zero.pl -FAIL_IF_BAD_MACHO = ${TESTROOT}/bin/fail-if-exit-non-zero.pl ${MACHOCHECK} -FAIL_IF_SUCCESS = ${TESTROOT}/bin/fail-if-exit-zero.pl -FAIL_IF_EMPTY = ${TESTROOT}/bin/fail-if-no-stdin.pl -FAIL_IF_STDIN = ${TESTROOT}/bin/fail-if-stdin.pl +PASS_IFF = pass-iff-exit-zero.pl +PASS_IFF_SUCCESS = ${PASS_IFF} +PASS_IFF_EMPTY = pass-iff-no-stdin.pl +PASS_IFF_STDIN = pass-iff-stdin.pl +FAIL_IFF = fail-iff-exit-zero.pl +FAIL_IFF_SUCCESS = ${FAIL_IFF} +PASS_IFF_ERROR = pass-iff-exit-non-zero.pl +FAIL_IF_ERROR = fail-if-exit-non-zero.pl +FAIL_IF_SUCCESS = fail-if-exit-zero.pl +FAIL_IF_EMPTY = fail-if-no-stdin.pl +FAIL_IF_STDIN = fail-if-stdin.pl +PASS_IFF_GOOD_MACHO = ${PASS_IFF} ${MACHOCHECK} +FAIL_IF_BAD_MACHO = ${FAIL_IF_ERROR} ${MACHOCHECK} +FAIL_IF_BAD_OBJ = ${FAIL_IF_ERROR} ${OBJECTDUMP} >/dev/null