##
-# Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
#
# @APPLE_LICENSE_HEADER_START@
#
TESTROOT = ../..
include ${TESTROOT}/include/common.makefile
-run: all
- export DYLD_INSERT_LIBRARIES="/usr/lib/libldap.dylib:/usr/lib/libpcap.dylib" && ./main
+PWD = `pwd`
+
+ifeq "$(OS_NAME)" "iPhoneOS"
+ RUN_AS_USER = login -f -l mobile
+else
+ RUN_AS_USER =
+endif
+
+all-check: all check
+
+check:
+ ${RUN_AS_USER} $(PWD)/main-with-env
all: main
${CC} ${CCFLAGS} -I${TESTROOT}/include -o main main.c
sudo chown root main
sudo chmod 4755 main
+ echo "#!/bin/sh" > main-with-env
+ echo "export DYLD_INSERT_LIBRARIES=/usr/lib/libz.dylib" >> main-with-env
+ echo "$(PWD)/main" >> main-with-env
+ chmod +x main-with-env
clean:
- ${RM} ${RMFLAGS} *~ main
+ ${RM} ${RMFLAGS} *~ main main-with-env