]> git.saurik.com Git - apple/ld64.git/blobdiff - unit-tests/test-cases/empty-dylib/Makefile
ld64-123.2.tar.gz
[apple/ld64.git] / unit-tests / test-cases / empty-dylib / Makefile
index a12e7c1cbaae04eec6ecf63708591eb70680d807..504fb97f7edad058d38ec262a2fb44c5253668b3 100644 (file)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2009 Apple Computer, Inc. All rights reserved.
+# Copyright (c) 2010 Apple Inc. All rights reserved.
 #
 # @APPLE_LICENSE_HEADER_START@
 # 
@@ -25,15 +25,23 @@ include ${TESTROOT}/include/common.makefile
 
 #
 # Check that the n_sect number for __mh_dylib_header is valid when there is no __text section
+# Also check that codesigning works on empty dylib.
 #
 
+CODESIGN_ARCH = ${ARCH}
+ifeq (${ARCH},ppc)
+       CODESIGN_ARCH = ppc7400
+endif
+
+
 run: all
 
 all:
        ${CC} ${CCFLAGS} -dynamiclib justdata.c -o libjustdata.dylib -Wl,-no_compact_unwind
        ${PASS_IFF_GOOD_MACHO} libjustdata.dylib
        ${CC} ${CCFLAGS} -dynamiclib empty.c -o libempty.dylib -Wl,-no_compact_unwind
-       ${PASS_IFF_GOOD_MACHO} libempty.dylib
+       codesign_allocate -i libempty.dylib -a ${CODESIGN_ARCH} 1024 -o libsigned.dylib
+       ${PASS_IFF_GOOD_MACHO} libsigned.dylib
 
 clean:
-       rm -rf libempty.dylib libjustdata.dylib
+       rm -rf libempty.dylib libjustdata.dylib libsigned.dylib