##
-# Copyright (c) 2007 Apple Inc. All rights reserved.
+# Copyright (c) 2007-2010 Apple Inc. All rights reserved.
#
# @APPLE_LICENSE_HEADER_START@
#
# <rdar://problem/5277857> OpenGL.framework and X11 both have a libGL.dylib which can cause ld to segfault if both are found
#
-run: all
+all: all-${ARCH}
-all: libfoo.dylib
- ${CC} main.c libfoo.dylib -o main -L. 2>errmsg || true
- grep "cycle" errmsg | ${PASS_IFF_STDIN}
+all-i386: all-mac
+all-x86_64: all-mac
+all-armv6: all-good
+all-armv7: all-good
-libfoo.dylib : foo.c libbar.dylib
- ${CC} foo.c -dynamiclib -o libfoo.dylib libbar.dylib -sub_library libbar -mmacosx-version-min=10.4
-
-libbar.dylib : bar.c other/libfoo.dylib
- ${CC} bar.c -dynamiclib -o libbar.dylib other/libfoo.dylib -sub_library libfoo -mmacosx-version-min=10.4
-other/libfoo.dylib : foo.c
+all-mac:
mkdir -p other
${CC} foo.c -dynamiclib -o other/libfoo.dylib -mmacosx-version-min=10.4
+ ${CC} bar.c -dynamiclib -o libbar.dylib other/libfoo.dylib -sub_library libfoo -mmacosx-version-min=10.4
+ ${CC} foo.c -dynamiclib -o libfoo.dylib libbar.dylib -sub_library libbar -mmacosx-version-min=10.4
+ ${CC} main.c libfoo.dylib -o main -L. 2>errmsg || true
+ grep "cycle" errmsg | ${PASS_IFF_STDIN}
+all-good:
+ ${PASS_IFF} true
clean: