]> git.saurik.com Git - apple/ld64.git/blame - unit-tests/include/common.makefile
ld64-59.2.tar.gz
[apple/ld64.git] / unit-tests / include / common.makefile
CommitLineData
d696c285
A
1# stuff to include in every test Makefile
2
3SHELL = /bin/sh
4
5# set default to be host
6ARCH ?= $(shell arch)
7
8# set default to be all
9VALID_ARCHS ?= "ppc ppc64 i386"
10
11# if run within Xcode, add the just built tools to the command path
12ifdef BUILT_PRODUCTS_DIR
13 PATH := ${BUILT_PRODUCTS_DIR}:${PATH}
14endif
15
16LD = ld
17OBJECTDUMP = ObjectDump
18MACHOCHECK = machocheck
19
20OTOOL = otool
21ifeq (${ARCH},ppc64)
22OTOOL = otool64
23endif
69a49097
A
24ifeq (${ARCH},x86_64)
25OTOOL = otool64
26endif
d696c285
A
27
28
29CC = gcc-4.0 -arch ${ARCH}
69a49097 30CCFLAGS = -Wall -std=c99
d696c285
A
31ASMFLAGS =
32
33CXX = g++-4.0 -arch ${ARCH}
69a49097 34CXXFLAGS = -Wall
d696c285
A
35
36RM = rm
37RMFLAGS = -rf
38
39# utilites for Makefiles
40PASS_IFF = ${TESTROOT}/bin/pass-iff-exit-zero.pl
41PASS_IFF_EMPTY = ${TESTROOT}/bin/pass-iff-no-stdin.pl
42PASS_IFF_STDIN = ${TESTROOT}/bin/pass-iff-stdin.pl
43PASS_IFF_GOOD_MACHO = ${TESTROOT}/bin/pass-iff-exit-zero.pl ${MACHOCHECK}
44FAIL_IFF = ${TESTROOT}/bin/fail-iff-exit-zero.pl
45FAIL_IF_BAD_MACHO = ${TESTROOT}/bin/fail-if-exit-non-zero.pl ${MACHOCHECK}
46FAIL_IF_SUCCESS = ${TESTROOT}/bin/fail-if-exit-zero.pl
47FAIL_IF_EMPTY = ${TESTROOT}/bin/fail-if-no-stdin.pl
48FAIL_IF_STDIN = ${TESTROOT}/bin/fail-if-stdin.pl