TESTROOT = ../..
include ${TESTROOT}/include/common.makefile
+PWD = $(shell pwd)
#
# a main executable linked with -rpath calls into a dylib which calls
# find the dlopen path.
#
+all-check: all check
-run: all
+check:
./main
all: main
${CC} foo.c -dynamiclib -o hide/hole/libfoo.dylib -install_name @rpath/libfoo.dylib
libbar.dylib : bar.c hide/hole/libfoo.dylib
- ${CC} bar.c -dynamiclib -o libbar.dylib -I${TESTROOT}/include -Wl,-rpath -Wl,`pwd`/hide/hole
+ ${CC} bar.c -dynamiclib -o libbar.dylib -I${TESTROOT}/include -Wl,-rpath -Wl,${PWD}/hide/hole
main : main.c libbar.dylib
${CC} -I${TESTROOT}/include main.c -o main libbar.dylib