]>
Commit | Line | Data |
---|---|---|
a645023d A |
1 | |
2 | TESTROOT = ../.. | |
3 | include ${TESTROOT}/include/common.makefile | |
4 | ||
5 | # | |
6 | # Test a simple symbol resolver function | |
7 | # | |
8 | TARGET = all | |
9 | ifeq (${ARCH},ppc) | |
10 | TARGET = all-ppc | |
11 | endif | |
12 | ||
13 | ||
14 | run: ${TARGET} | |
15 | ||
16 | all: | |
17 | ${CC} ${CCFLAGS} foo.c -c -o foo.o | |
18 | ${CC} ${CCFLAGS} foo.o -dynamiclib -o libfoo.dylib | |
19 | ${DYLDINFO} -export libfoo.dylib | grep _foo | grep resolver | ${FAIL_IF_EMPTY} | |
20 | ${LD} -arch ${ARCH} -r foo.o -o foo-r.o | |
21 | ${CC} ${CCFLAGS} foo-r.o -dynamiclib -o libfoo-r.dylib | |
22 | ${DYLDINFO} -export libfoo-r.dylib | grep _foo | grep resolver | ${FAIL_IF_EMPTY} | |
23 | ${PASS_IFF_GOOD_MACHO} libfoo-r.dylib | |
24 | ||
25 | all-ppc: | |
26 | echo "PASS" | |
27 | ||
28 | clean: | |
29 | rm -f foo.o libfoo.dylib foo-r.o libfoo-r.dylib |