]> git.saurik.com Git - apple/ld64.git/blobdiff - unit-tests/test-cases/weak_import/Makefile
ld64-77.tar.gz
[apple/ld64.git] / unit-tests / test-cases / weak_import / Makefile
index 69ff397b4aae81e7e884852047c8d95c53877af4..d1fa1f3f9f0ba737cb9d6f11acaff057df039fa2 100644 (file)
@@ -32,6 +32,8 @@ run: all
 
 all:   
        ${CC} ${CCFLAGS} -dynamiclib -single_module foo.c -o libfoo-${ARCH}.dylib 
+       ${FAIL_IF_BAD_MACHO} libfoo-${ARCH}.dylib
+
        ${CC} ${CCFLAGS} -mmacosx-version-min=10.4 main.c -o main-${ARCH} libfoo-${ARCH}.dylib 
        nm -m main-${ARCH} | grep _func1 | grep -v weak    >/dev/null
        nm -m main-${ARCH} | grep _func2 | grep    weak    >/dev/null
@@ -41,6 +43,9 @@ all:
        nm -m main-${ARCH} | grep _data2 | grep    weak    >/dev/null
        nm -m main-${ARCH} | grep _data3 | grep -v weak    >/dev/null
        nm -m main-${ARCH} | grep _data4 | grep    weak    >/dev/null
+       otool -rv main-${ARCH} | grep _data6 > /dev/null
+       ${FAIL_IF_BAD_MACHO} main-${ARCH}
+
        ${CC} ${CCFLAGS} -mmacosx-version-min=10.4 main.c -dynamiclib -o main-${ARCH}.dylib libfoo-${ARCH}.dylib 
        nm -m main-${ARCH}.dylib | grep _func1 | grep -v weak    >/dev/null
        nm -m main-${ARCH}.dylib | grep _func2 | grep    weak    >/dev/null
@@ -50,7 +55,8 @@ all:
        nm -m main-${ARCH}.dylib | grep _data2 | grep    weak    >/dev/null
        nm -m main-${ARCH}.dylib | grep _data3 | grep -v weak    >/dev/null
        nm -m main-${ARCH}.dylib | grep _data4 | grep    weak    >/dev/null
+       otool -rv main-${ARCH}.dylib | grep _data6 > /dev/null
        ${PASS_IFF_GOOD_MACHO} main-${ARCH}.dylib
        
 clean:
-       rm -rf libfoo-${ARCH}.dylib  main-${ARCH}  main-${ARCH}.dylib
+       rm -rf *.dylib main-*