X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/39236c6e673c41db228275375ab7fdb0f837b292..4d15aeb193b2c68f1d38666c317f8d3734f5f083:/tools/tests/kqueue_tests/Makefile diff --git a/tools/tests/kqueue_tests/Makefile b/tools/tests/kqueue_tests/Makefile index 7bd1baacd..0a3c7daa1 100755 --- a/tools/tests/kqueue_tests/Makefile +++ b/tools/tests/kqueue_tests/Makefile @@ -1,36 +1,31 @@ -SDKROOT ?= / -ifeq "$(RC_TARGET_CONFIG)" "iPhone" -Embedded?=YES -else -Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO) -endif +include ../Makefile.common -CC:=xcrun -sdk "$(SDKROOT)" cc +CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc) ifdef RC_ARCHS ARCHS:=$(RC_ARCHS) else ifeq "$(Embedded)" "YES" - ARCHS:=armv7 armv7s + ARCHS:=armv7 armv7s arm64 else ARCHS:=x86_64 i386 endif endif -CFLAGS :=-g $(patsubst %, -arch %,$(ARCHS)) +CFLAGS :=-g $(patsubst %, -arch %,$(ARCHS)) -isysroot $(SDKROOT) DSTROOT?=$(shell /bin/pwd) SYMROOT?=$(shell /bin/pwd) -all: $(addprefix $(DSTROOT)/, file timer) +all: $(addprefix $(DSTROOT)/, file_tests timer_tests) -$(DSTROOT)/file: +$(DSTROOT)/file_tests: kqueue_file_tests.c $(CC) $(CFLAGS) -o $(SYMROOT)/file_tests kqueue_file_tests.c - if [ ! -e $(DSTROOT)/file_tests ]; then ditto $(SYMROOT)/file_tests $(DSTROOT)/file_tests; fi + ditto $(SYMROOT)/file_tests $(DSTROOT)/file_tests -$(DSTROOT)/timer: +$(DSTROOT)/timer_tests: kqueue_timer_tests.c $(CC) $(CFLAGS) -o $(SYMROOT)/timer_tests kqueue_timer_tests.c - if [ ! -e $(DSTROOT)/timer_tests ]; then ditto $(SYMROOT)/timer_tests $(DSTROOT)/timer_tests; fi + ditto $(SYMROOT)/timer_tests $(DSTROOT)/timer_tests clean: rm -rf $(DSTROOT)/file_tests $(DSTROOT)/timer_tests $(SYMROOT)/*.dSYM $(SYMROOT)/file_tests $(SYMROOT)/timer_tests