X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/bac542e65c0030c0d819c7ff1dcfc25892a61844..9f83892a2b93eb5239bb24af5371fef9407632b4:/unit-tests/test-cases/crt-apple/Makefile diff --git a/unit-tests/test-cases/crt-apple/Makefile b/unit-tests/test-cases/crt-apple/Makefile index 0905421..73b71ac 100644 --- a/unit-tests/test-cases/crt-apple/Makefile +++ b/unit-tests/test-cases/crt-apple/Makefile @@ -1,5 +1,5 @@ ## -# Copyright (c) 2007 Apple Inc. All rights reserved. +# Copyright (c) 2007-2010 Apple Inc. All rights reserved. # # @APPLE_LICENSE_HEADER_START@ # @@ -23,35 +23,37 @@ TESTROOT = ../.. include ${TESTROOT}/include/common.makefile +SHELL = bash # use bash shell so we can redirect just stderr + + # # verify that apple[0] parameter is correct by comparing to argv[1] # -run: all - ./main-10.4 ./main-10.4 - ./main-10.5 ./main-10.5 - ./main-10.4.stripped ./main-10.4.stripped - ./main-10.5.stripped ./main-10.5.stripped - `pwd`/main-10.4 `pwd`/main-10.4 - `pwd`/main-10.5 `pwd`/main-10.5 - `pwd`/main-10.4.stripped `pwd`/main-10.4.stripped - `pwd`/main-10.5.stripped `pwd`/main-10.5.stripped +all-check: all check + +check: + ./main ./main + ./main.stripped ./main.stripped + `pwd`/main `pwd`/main + `pwd`/main.stripped `pwd`/main.stripped + export DYLD_LIBRARY_PATH=. && export DYLD_FRAMEWORK_PATH=. && ./main-setuid ./main-setuid 2>/dev/null + +all: main main.stripped main-setuid -all: main-10.4 main-10.5 main-10.4.stripped main-10.5.stripped +main: main.c + ${CC} ${CCFLAGS} -I${TESTROOT}/include -o main main.c -w -main-10.4: main.c - ${CC} ${CCFLAGS} -I${TESTROOT}/include -o main-10.4 main.c -mmacosx-version-min=10.4 -w +main.stripped: main + ${STRIP} main -o main.stripped -main-10.4.stripped: main-10.4 - strip main-10.4 -o main-10.4.stripped - -main-10.5: main.c - ${CC} ${CCFLAGS} -I${TESTROOT}/include -o main-10.5 main.c -mmacosx-version-min=10.5 -w +main-setuid: main + cp main main-setuid + sudo chown root main-setuid + sudo chmod 4755 main-setuid -main-10.5.stripped: main-10.5 - strip main-10.5 -o main-10.5.stripped clean: - ${RM} ${RMFLAGS} *~ main-10.4 main-10.5 main-10.4.stripped main-10.5.stripped + ${RM} ${RMFLAGS} *~ main main.stripped main-setuid