1 PROJECT := xnu/darwintests
3 # When building as part of xnu_tests, we get passed a DSTROOT that's got the
4 # unit test path in it already. But, BASEDSTROOT doesn't, so use that instead.
6 override DSTROOT = $(BASEDSTROOT)
9 DEVELOPER_DIR ?= /Applications/Xcode.app/Contents/Developer/
11 # the xnu build system will only ever call us with the default target
12 .DEFAULT_GOAL := install
14 include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common
16 OTHER_CFLAGS = -Weverything -Wno-gnu-union-cast -Wno-missing-field-initializers -Wno-partial-availability
17 OTHER_CFLAGS += -Wno-missing-noreturn -Wno-vla -Wno-reserved-id-macro -Wno-documentation-unknown-command
18 OTHER_CFLAGS += -Wno-padded -Wno-used-but-marked-unused
19 OTHER_CFLAGS += --std=gnu11 -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
21 # to have custom compiler flags to
22 # target: OTHER_CFLAGS += <my flags>
24 backtracing: OTHER_CFLAGS += -F $(SDKROOT)/System/Library/PrivateFrameworks
25 backtracing: OTHER_LDFLAGS += -framework CoreSymbolication
27 kdebug: INVALID_ARCHS = i386
28 kdebug: OTHER_LDFLAGS = -lktrace
30 EXCLUDED_SOURCES += kperf_helpers.c
32 kperf: INVALID_ARCHS = i386
33 kperf: OTHER_CFLAGS += kperf_helpers.c
34 kperf: OTHER_CFLAGS += -F $(SDKROOT)/System/Library/PrivateFrameworks
35 kperf: OTHER_LDFLAGS += -framework kperf -framework kperfdata -lktrace
37 kperf_backtracing: INVALID_ARCHS = i386
38 kperf_backtracing: OTHER_CFLAGS += kperf_helpers.c
39 kperf_backtracing: OTHER_CFLAGS += -F $(SDKROOT)/System/Library/PrivateFrameworks
40 kperf_backtracing: OTHER_LDFLAGS += -framework kperf -framework kperfdata -lktrace
41 kperf_backtracing: OTHER_LDFLAGS += -framework CoreSymbolication
43 mach_get_times: OTHER_LDFLAGS += -ldarwintest_utils
45 perf_exit: OTHER_LDFLAGS = -lktrace
46 perf_exit: INVALID_ARCHS = i386
48 stackshot_idle_25570396: INVALID_ARCHS = i386
49 stackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation
51 include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets