##
-# Copyright (c) 2009 Apple Computer, Inc. All rights reserved.
+# Copyright (c) 2010 Apple Inc. All rights reserved.
#
# @APPLE_LICENSE_HEADER_START@
#
#
# 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