]> git.saurik.com Git - apple/ld64.git/blobdiff - unit-tests/test-cases/auto-arch/Makefile
ld64-127.2.tar.gz
[apple/ld64.git] / unit-tests / test-cases / auto-arch / Makefile
old mode 100755 (executable)
new mode 100644 (file)
index 3b1cc7c..06ca6ed
 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
@@ -33,8 +39,8 @@ run: all
 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