TESTROOT = ../..
include ${TESTROOT}/include/common.makefile
+ifeq ($(FILEARCH),arm)
+ LD_VERS = -ios_version_min 4.0 -syslibroot $(IOS_SDK)
+else
+ LD_VERS = -macosx_version_min 10.6
+endif
+
#
# Check that ld can figure out architecture from .o files without -arch option
all:
${CC} ${CCFLAGS} hello.c -c -o hello.o
${FAIL_IF_BAD_OBJ} hello.o
- ${LD} ${LDFLAGS} -lcrt1.o hello.o -o hello -lSystem
- file hello | grep ${FILEARCH} | ${PASS_IFF_STDIN}
+ ${LD} ${LDFLAGS} hello.o -dylib -o hello.dylib -lSystem $(LD_VERS)
+ file hello.dylib | grep ${FILEARCH} | ${PASS_IFF_STDIN}
clean:
- rm -rf hello.o hello
+ rm -rf hello.o hello.dylib