]> git.saurik.com Git - apple/xnu.git/blame_incremental - tests/Makefile
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tests / Makefile
... / ...
CommitLineData
1PROJECT := xnu/darwintests
2
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.
5ifdef BASEDSTROOT
6override DSTROOT = $(BASEDSTROOT)
7endif
8
9INVALID_ARCHS = i386
10ENABLE_LTE_TESTS=YES
11
12OTHER_LTE_INCLUDE_FILES += \
13 /System/Library/PrivateFrameworks/LoggingSupport.framework, \
14 /System/Library/PrivateFrameworks/MobileKeyBag.framework, \
15 /System/Library/Frameworks/IOSurface.framework, \
16 /usr/local/lib/libdarwintest_utils.dylib, \
17 /usr/lib/libapple_crypto.dylib,
18
19DEVELOPER_DIR ?= $(shell xcode-select -p)
20
21# the xnu build system will only ever call us with the default target
22.DEFAULT_GOAL := install
23
24include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common
25
26OTHER_CFLAGS = -Weverything -Wno-gnu-union-cast -Wno-missing-field-initializers -Wno-partial-availability
27OTHER_CFLAGS += -Wno-missing-noreturn -Wno-vla -Wno-reserved-id-macro -Wno-documentation-unknown-command
28OTHER_CFLAGS += -Wno-padded -Wno-used-but-marked-unused -Wno-covered-switch-default -Wno-nullability-extension
29OTHER_CFLAGS += -Wno-gnu-empty-initializer -Wno-unused-macros -Wno-undef -Wno-fixed-enum-extension
30OTHER_CFLAGS += -Wno-gnu-auto-type -Wno-switch-enum -Wno-variadic-macros
31OTHER_CFLAGS += --std=gnu11 -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
32OTHER_CFLAGS += -UT_NAMESPACE_PREFIX -DT_NAMESPACE_PREFIX=xnu
33OTHER_CFLAGS += -F $(SDKROOT)/System/Library/PrivateFrameworks
34
35OTHER_CFLAGS += -Wl,-sectcreate,__INFO_FILTER,__disable,/dev/null
36
37
38CODESIGN:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign)
39CODESIGN_HARDENED_RUNTIME:=$(CODESIGN) -o runtime
40CODESIGN_ALLOCATE:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign_allocate)
41
42# to have custom compiler flags to
43# target: OTHER_CFLAGS += <my flags>
44
45atm_diagnostic_flag: OTHER_CFLAGS += drop_priv.c
46
47atm_diagnostic_flag_entitled: CODE_SIGN_ENTITLEMENTS = atm_diagnostic_flag.entitlements
48atm_diagnostic_flag_entitled: OTHER_CFLAGS += drop_priv.c
49
50avx: INVALID_ARCHS = $(filter arm%,$(ARCH_CONFIGS))
51avx: OTHER_CFLAGS += -mavx512f -mavx512bw -mavx512vl
52avx: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
53avx: CONFIG_FLAGS := $(filter-out -O%,$(CONFIG_FLAGS))
54# Level 2 optimization must be used to prevent compiler from generating
55# invalid instructions when compiling with AVX-512 flags.
56avx: CONFIG_FLAGS += -O2
57# Disable vzeroupper insertion to work around rdar://problem/35035096
58avx: CONFIG_FLAGS += -mllvm -x86-use-vzeroupper=0
59ifneq (osx,$(TARGET_NAME))
60EXCLUDED_SOURCES += avx.c
61endif
62
63CUSTOM_TARGETS = sr_entitlement_helper
64
65sr_entitlement_helper: sr_entitlement_helper.c
66 mkdir -p $(SYMROOT)
67 $(CC) -I $(OBJROOT) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) sr_entitlement_helper.c -o $(SYMROOT)/$@
68 echo $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@; \
69 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@;
70
71install-sr_entitlement_helper: sr_entitlement_helper
72 mkdir -p $(INSTALLDIR)
73 cp $(SYMROOT)/sr_entitlement_helper $(INSTALLDIR)
74
75sr_entitlement: OTHER_LDFLAGS += -ldarwintest_utils
76
77restrict_jit: CODE_SIGN_ENTITLEMENTS = restrict_jit.entitlements
78
79backtracing: OTHER_LDFLAGS += -framework CoreSymbolication
80backtracing: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist
81
82data_protection: OTHER_LDFLAGS += -ldarwintest_utils -framework IOKit
83
84CUSTOM_TARGETS += immovable_send_client vm_spawn_tool
85
86exception_tests: excserver exc_helpers.c
87exception_tests: CODE_SIGN_ENTITLEMENTS = exception_tests.entitlements
88exception_tests: OTHER_CFLAGS += $(OBJROOT)/excserver.c
89exception_tests: OTHER_CFLAGS += -I $(OBJROOT)
90exception_tests: OTHER_CFLAGS += -DENTITLED=1
91
92immovable_send: excserver
93immovable_send: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
94immovable_send: OTHER_LDFLAGS += -ldarwintest_utils -lpthread -framework IOKit
95immovable_send: immovable_send_client
96
97immovable_send_client: immovable_send_client.c
98 $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) immovable_send_client.c -o $(SYMROOT)/immovable_send_client
99
100install-immovable_send_client: immovable_send_client
101 mkdir -p $(INSTALLDIR)
102 cp $(SYMROOT)/immovable_send_client $(INSTALLDIR)/
103
104vm_spawn_tool: INVALID_ARCHS = i386
105vm_spawn_tool: vm_spawn_tool.c
106 $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_spawn_tool.c -o $(SYMROOT)/vm_spawn_tool
107
108install-vm_spawn_tool: vm_spawn_tool
109 mkdir -p $(INSTALLDIR)/tools
110 cp $(SYMROOT)/vm_spawn_tool $(INSTALLDIR)/tools/
111
112CUSTOM_TARGETS += imm_pinned_control_port_crasher
113
114imm_pinned_control_port: excserver
115imm_pinned_control_port: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
116imm_pinned_control_port: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
117imm_pinned_control_port: OTHER_LDFLAGS += -ldarwintest_utils -lpthread
118imm_pinned_control_port: imm_pinned_control_port_crasher
119
120imm_pinned_control_port_crasher: imm_pinned_control_port_crasher.c
121 $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) imm_pinned_control_port_crasher.c -o $(SYMROOT)/imm_pinned_control_port_crasher
122 $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@
123
124install-imm_pinned_control_port_crasher: imm_pinned_control_port_crasher
125 mkdir -p $(INSTALLDIR)
126 cp $(SYMROOT)/imm_pinned_control_port_crasher $(INSTALLDIR)/
127
128kas_info: OTHER_LDFLAGS += -framework CoreSymbolication
129kas_info: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist
130
131kdebug: INVALID_ARCHS = i386
132kdebug: OTHER_LDFLAGS = -framework ktrace -ldarwintest_utils -framework kperf
133kdebug: OTHER_CFLAGS += test_utils.c
134
135EXCLUDED_SOURCES += drop_priv.c kperf_helpers.c xnu_quick_test_helpers.c memorystatus_assertion_helpers.c bpflib.c in_cksum.c test_utils.c
136
137ifneq ($(PLATFORM),iPhoneOS)
138EXCLUDED_SOURCES += jumbo_va_spaces_28530648.c perf_compressor.c memorystatus_freeze_test.c vm/entitlement_increased_memory_limit.c
139endif
140
141perf_compressor: OTHER_LDFLAGS += -ldarwintest_utils
142perf_compressor: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist
143
144
145memorystatus_freeze_test: CODE_SIGN_ENTITLEMENTS=./task_for_pid_entitlement.plist
146memorystatus_freeze_test: OTHER_LDFLAGS += -ldarwintest_utils
147memorystatus_freeze_test: OTHER_CFLAGS += -ldarwintest_utils memorystatus_assertion_helpers.c
148
149memorystatus_is_assertion: OTHER_LDFLAGS += -ldarwintest_utils
150memorystatus_is_assertion: OTHER_CFLAGS += memorystatus_assertion_helpers.c
151
152memorystatus_vm_map_fork: OTHER_CFLAGS += test_utils.c
153
154shared_cache_tests: OTHER_LDFLAGS += -ldarwintest_utils
155
156stackshot_tests: OTHER_CFLAGS += -Wno-objc-messaging-id
157stackshot_tests: OTHER_LDFLAGS += -lkdd -lz -ldarwintest_utils -framework Foundation
158
159stackshot_accuracy: OTHER_CFLAGS += -ldarwintest_utils -Wno-objc-messaging-id
160stackshot_accuracy: OTHER_LDFLAGS += -lkdd -ldarwintest_utils -framework Foundation
161stackshot_accuracy: INVALID_ARCHS = i386
162
163ifeq ($(PLATFORM),MacOSX)
164CUSTOM_TARGETS += stackshot_translated_child
165
166stackshot_translated_child: INVALID_ARCHS = arm64 arm64e
167stackshot_translated_child: stackshot_translated_child.c
168 $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) stackshot_translated_child.c -o $(SYMROOT)/stackshot_translated_child
169
170install-stackshot_translated_child: stackshot_translated_child
171 mkdir -p $(INSTALLDIR)
172 cp $(SYMROOT)/stackshot_translated_child $(INSTALLDIR)/
173else
174EXCLUDED_SOURCES += stackshot_translated_child.c
175endif
176
177telemetry: OTHER_LDFLAGS = -framework ktrace -framework kperf -framework CoreFoundation
178
179memorystatus_zone_test: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
180memorystatus_zone_test: OTHER_LDFLAGS += -framework ktrace
181memorystatus_zone_test: OTHER_LDFLAGS += -ldarwintest_utils
182
183ifeq ($(PLATFORM),BridgeOS)
184EXCLUDED_SOURCES += dirtiness_tracking.c
185endif
186
187dirtiness_tracking: OTHER_CFLAGS += -Wno-cast-align
188
189kpc: OTHER_LDFLAGS += -framework kperf -framework ktrace
190kpc: INVALID_ARCHS = i386
191
192kperf: OTHER_CFLAGS += kperf_helpers.c
193kperf: OTHER_LDFLAGS += -framework kperf -framework kperfdata -framework ktrace -ldarwintest_utils
194
195memcmp_zero: OTHER_CFLAGS += ../osfmk/arm64/memcmp_zero.s
196
197kperf_backtracing: OTHER_CFLAGS += kperf_helpers.c
198kperf_backtracing: OTHER_LDFLAGS += -framework kperf -framework kperfdata -framework ktrace
199kperf_backtracing: OTHER_LDFLAGS += -framework CoreSymbolication
200kperf_backtracing: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist
201
202text_corruption: OTHER_LDFLAGS += -ldarwintest_utils
203CUSTOM_TARGETS += text_corruption_helper
204
205text_corruption_helper:
206 $(CC) $(LDFLAGS) $(CFLAGS) text_corruption_helper.c -lm -o $(SYMROOT)/$@;
207 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
208
209install-text_corruption_helper:
210 mkdir -p $(INSTALLDIR)
211 cp $(SYMROOT)/text_corruption_helper $(INSTALLDIR)/
212
213kevent_qos: OTHER_CFLAGS += -Wno-unused-macros
214kevent_qos: OTHER_CFLAGS += -I $(OBJROOT)/
215
216mach_get_times: OTHER_LDFLAGS += -ldarwintest_utils
217
218monotonic_core: OTHER_LDFLAGS += -framework ktrace
219
220perf_exit: perf_exit_proc
221perf_exit: OTHER_LDFLAGS = -framework ktrace -ldarwintest_utils
222perf_exit: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist
223
224CUSTOM_TARGETS += prioritize_process_launch_helper
225prioritize_process_launch: prioritize_process_launch_helper
226
227prioritize_process_launch_helper: prioritize_process_launch_helper.c
228 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) prioritize_process_launch_helper.c -o $(SYMROOT)/prioritize_process_launch_helper
229 echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
230 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
231
232install-prioritize_process_launch_helper: prioritize_process_launch_helper
233 mkdir -p $(INSTALLDIR)
234 cp $(SYMROOT)/prioritize_process_launch_helper $(INSTALLDIR)/
235
236
237perf_spawn_fork: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist
238
239mach_exception_reply: OTHER_CFLAGS += -Wno-cast-align
240
241os_thread_self_restrict: os_thread_self_restrict.c os_thread_self_restrict-entitlements.plist
242os_thread_self_restrict: CODE_SIGN_ENTITLEMENTS=os_thread_self_restrict-entitlements.plist
243
244subsystem_root_path: subsystem_root_path.c subsystem_root_path-entitlements.plist
245subsystem_root_path: CODE_SIGN_ENTITLEMENTS=subsystem_root_path-entitlements.plist
246
247EXCLUDED_SOURCES += $(wildcard bounded_ptr_src/*.cpp)
248bounded_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
249bounded_ptr: $(wildcard bounded_ptr_src/*.cpp) bounded_ptr.cpp
250
251EXCLUDED_SOURCES += bounded_ptr_03.cpp
252bounded_ptr_03: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++03
253bounded_ptr_03: bounded_ptr_03.cpp
254
255EXCLUDED_SOURCES += $(wildcard bounded_array_src/*.cpp)
256bounded_array: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
257bounded_array: $(wildcard bounded_array_src/*.cpp) bounded_array.cpp
258
259EXCLUDED_SOURCES += $(wildcard bounded_array_ref_src/*.cpp)
260bounded_array_ref: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
261bounded_array_ref: $(wildcard bounded_array_ref_src/*.cpp) bounded_array_ref.cpp
262
263EXCLUDED_SOURCES += $(wildcard intrusive_shared_ptr_src/*.cpp)
264intrusive_shared_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
265intrusive_shared_ptr: $(wildcard intrusive_shared_ptr_src/*.cpp) intrusive_shared_ptr.cpp
266
267EXCLUDED_SOURCES += $(wildcard safe_allocation_src/*.cpp)
268safe_allocation: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
269safe_allocation: $(wildcard safe_allocation_src/*.cpp) safe_allocation.cpp
270
271EXCLUDED_SOURCES += osptr_compat.cpp
272osptr_98: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++98 -DOSPTR_STD="98"
273osptr_98: osptr_compat.cpp
274 $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
275osptr_11: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++11 -DOSPTR_STD="11"
276osptr_11: osptr_compat.cpp
277 $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
278osptr_14: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++14 -DOSPTR_STD="14"
279osptr_14: osptr_compat.cpp
280 $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
281osptr_17: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++17 -DOSPTR_STD="17"
282osptr_17: osptr_compat.cpp
283 $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
284
285priority_queue: OTHER_CXXFLAGS += -std=c++17
286zalloc_buddy: OTHER_CFLAGS += -Wno-format-pedantic
287
288os_refcnt: OTHER_CFLAGS += -I$(SRCROOT)/../libkern/ -Wno-gcc-compat -Wno-undef -O3 -flto
289
290kernel_inspection: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
291kernel_inspection: OTHER_CFLAGS += -DENTITLED=1
292
293turnstile_multihop: OTHER_CFLAGS += -Wno-unused-macros
294turnstile_multihop: OTHER_CFLAGS += -I $(OBJROOT)/
295
296CUSTOM_TARGETS += perf_exit_proc
297
298perf_exit_proc:
299 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) perf_exit_proc.c -o $(SYMROOT)/perf_exit_proc
300
301install-perf_exit_proc: perf_exit_proc
302 mkdir -p $(INSTALLDIR)
303 cp $(SYMROOT)/perf_exit_proc $(INSTALLDIR)/
304
305stackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation
306
307stackshot_block_owner_14362384: OTHER_LDFLAGS += -framework Foundation -lpthread -lkdd
308ifeq ($(PLATFORM),MacOSX)
309stackshot_block_owner_14362384: OTHER_LDFLAGS += -lpcre
310endif
311
312all: $(DSTROOT)/usr/local/bin/kcdata
313
314$(DSTROOT)/usr/local/bin/kcdata: $(SRCROOT)/../tools/lldbmacros/kcdata.py
315 mkdir -p $(dir $@)
316 cp $< $@
317 chmod a+x $@
318
319xnu_quick_test: OTHER_CFLAGS += xnu_quick_test_helpers.c
320
321CUSTOM_TARGETS += vm_set_max_addr_helper
322
323vm_set_max_addr_helper: vm_set_max_addr_helper.c
324 $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_set_max_addr_helper.c -o $(SYMROOT)/vm_set_max_addr_helper; \
325 echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
326 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
327
328install-vm_set_max_addr_helper: vm_set_max_addr_helper
329 mkdir -p $(INSTALLDIR)
330 cp $(SYMROOT)/vm_set_max_addr_helper $(INSTALLDIR)/
331
332CUSTOM_TARGETS += subsystem_root_path_helper_entitled
333CUSTOM_TARGETS += subsystem_root_path_helper
334
335subsystem_root_path_helper_entitled: subsystem_root_path_helper.c subsystem_root_path-entitlements.plist
336 $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper_entitled; \
337 echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
338 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements subsystem_root_path-entitlements.plist $(SYMROOT)/$@;
339
340install-subsystem_root_path_helper_entitled: subsystem_root_path_helper_entitled
341 mkdir -p $(INSTALLDIR)
342 cp $(SYMROOT)/subsystem_root_path_helper_entitled $(INSTALLDIR)/
343
344subsystem_root_path_helper: subsystem_root_path_helper.c
345 $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper; \
346 echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
347 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
348
349install-subsystem_root_path_helper: subsystem_root_path_helper
350 mkdir -p $(INSTALLDIR)
351 cp $(SYMROOT)/subsystem_root_path_helper $(INSTALLDIR)/
352
353CUSTOM_TARGETS += vm_test_code_signing_helper
354
355vm_test_code_signing_helper: vm_test_code_signing_helper.c
356 $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_test_code_signing_helper.c -o $(SYMROOT)/vm_test_code_signing_helper; \
357 echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
358 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
359
360install-vm_test_code_signing_helper: vm_test_code_signing_helper
361 mkdir -p $(INSTALLDIR)
362 cp $(SYMROOT)/vm_test_code_signing_helper $(INSTALLDIR)/
363
364vm_test_code_signing: OTHER_LDFLAGS += -ldarwintest_utils
365
366INCLUDED_TEST_SOURCE_DIRS += vm
367
368# Revert to legacy vm_test suite until <rdar://problem/56675212> gets solved
369EXCLUDED_SOURCES += vm/vm_allocation.c
370
371ifeq ($(PLATFORM),iPhoneOS)
372OTHER_TEST_TARGETS += jumbo_va_spaces_28530648_unentitled jumbo_va_spaces_52551256 vm_phys_footprint_legacy vm/entitlement_increased_memory_limit vm/entitlement_increased_memory_limit_unentitled
373jumbo_va_spaces_28530648: CODE_SIGN_ENTITLEMENTS = jumbo_va_spaces_28530648.entitlements
374jumbo_va_spaces_28530648: OTHER_CFLAGS += -DENTITLED=1 -DTESTNAME=jumbo_va_spaces_28530648
375jumbo_va_spaces_28530648: OTHER_LDFLAGS += -ldarwintest_utils
376
377jumbo_va_spaces_52551256: CODE_SIGN_ENTITLEMENTS = jumbo_va_spaces_52551256.entitlements
378jumbo_va_spaces_52551256: OTHER_CFLAGS += -DENTITLED=1 -DTESTNAME=jumbo_va_spaces_52551256
379jumbo_va_spaces_52551256: OTHER_LDFLAGS += -ldarwintest_utils
380jumbo_va_spaces_52551256: jumbo_va_spaces_28530648.c
381 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
382 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
383
384jumbo_va_spaces_28530648_unentitled: OTHER_LDFLAGS += -ldarwintest_utils
385jumbo_va_spaces_28530648_unentitled: OTHER_CFLAGS += -DTESTNAME=jumbo_va_spaces_28530648_unentitled
386jumbo_va_spaces_28530648_unentitled: jumbo_va_spaces_28530648.c
387 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
388
389vm/entitlement_increased_memory_limit: CODE_SIGN_ENTITLEMENTS = vm/entitlement_increased_memory_limit.entitlements
390vm/entitlement_increased_memory_limit: OTHER_CFLAGS += -DENTITLED=1
391vm/entitlement_increased_memory_limit: OTHER_LDFLAGS += -ldarwintest_utils memorystatus_assertion_helpers.c
392vm/entitlement_increased_memory_limit: vm/entitlement_increased_memory_limit.c
393 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
394 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
395
396vm/entitlement_increased_memory_limit_unentitled: OTHER_LDFLAGS += -ldarwintest_utils memorystatus_assertion_helpers.c
397vm/entitlement_increased_memory_limit_unentitled: vm/entitlement_increased_memory_limit.c
398 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
399
400vm_phys_footprint_legacy: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface
401vm_phys_footprint_legacy: OTHER_CFLAGS += -DLEGACY_FOOTPRINT_ENTITLED=1
402vm_phys_footprint_legacy: CODE_SIGN_ENTITLEMENTS=./legacy_footprint.entitlement
403vm_phys_footprint_legacy: vm_phys_footprint.c
404 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
405
406endif
407
408task_info_28439149: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
409
410read_inspect: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
411
412proc_info: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
413proc_info: OTHER_LDFLAGS += -ldarwintest_utils
414
415proc_info_list_kthreads: CODE_SIGN_ENTITLEMENTS = ./proc_info_list_kthreads.entitlements
416
417proc_info_44873309: CODE_SIGN_ENTITLEMENTS = ./proc_info_44873309.entitlements
418
419disk_mount_conditioner: disk_mount_conditioner*
420disk_mount_conditioner: CODE_SIGN_ENTITLEMENTS=./disk_mount_conditioner-entitlements.plist
421disk_mount_conditioner: OTHER_LDFLAGS += -ldarwintest_utils
422
423disk_mount_conditioner: OTHER_TEST_TARGETS += disk_mount_conditioner_unentitled
424disk_mount_conditioner_unentitled: OTHER_CFLAGS += -DTEST_UNENTITLED
425disk_mount_conditioner_unentitled: OTHER_LDFLAGS += -ldarwintest_utils
426disk_mount_conditioner_unentitled: disk_mount_conditioner.c
427 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
428
429work_interval_test: CODE_SIGN_ENTITLEMENTS = work_interval_test.entitlements
430work_interval_test: OTHER_CFLAGS += -DENTITLED=1
431
432settimeofday_29193041: OTHER_CFLAGS += drop_priv.c
433
434settimeofday_29193041_entitled: CODE_SIGN_ENTITLEMENTS = settimeofday_29193041.entitlements
435settimeofday_29193041_entitled: OTHER_CFLAGS += drop_priv.c
436
437thread_group_set_32261625: OTHER_LDFLAGS = -framework ktrace
438
439task_info: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
440task_info: OTHER_CFLAGS += test_utils.c
441
442extract_right_soft_fail: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
443
444ifneq ($(PLATFORM),iPhoneOS)
445 EXCLUDED_SOURCES += task_vm_info_decompressions.c
446endif
447
448socket_bind_35243417: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
449socket_bind_35685803: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
450
451net_tuntests: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
452
453net_bridge: OTHER_CFLAGS += bpflib.c in_cksum.c
454net_bridge: OTHER_LDFLAGS += -ldarwintest_utils
455
456CUSTOM_TARGETS += posix_spawn_archpref_helper
457
458posix_spawn_archpref_helper:
459 $(CC) $(LDFLAGS) $(CFLAGS) posix_spawn_archpref_helper.c -o $(SYMROOT)/$@;
460 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
461
462install-posix_spawn_archpref_helper:
463 mkdir -p $(INSTALLDIR)
464 cp $(SYMROOT)/posix_spawn_archpref_helper $(INSTALLDIR)/
465
466MIG:=SDKROOT=$(SDKROOT) $(shell xcrun -sdk "$(TARGETSDK)" -find mig)
467
468CUSTOM_TARGETS += excserver
469
470excserver:
471 $(MIG) $(CFLAGS) \
472 -sheader $(OBJROOT)/excserver.h \
473 -server $(OBJROOT)/excserver.c \
474 -header /dev/null -user /dev/null \
475 excserver.defs
476install-excserver: ;
477
478EXCLUDED_SOURCES += exc_helpers.c
479
480
481x18: OTHER_CFLAGS += -Wno-language-extension-token
482
483exc_resource_threads: excserver
484exc_resource_threads: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
485
486fp_exception: excserver exc_helpers.c
487fp_exception: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
488
489ptrauth_failure: excserver exc_helpers.c
490ptrauth_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) -Wno-language-extension-token
491ptrauth_failure: CODESIGN = $(CODESIGN_HARDENED_RUNTIME)
492
493# This test currently relies on pid_hibernate(), which is only available on embedded platforms.
494ifeq ($(PLATFORM),MacOSX)
495EXCLUDED_SOURCES += decompression_failure.c
496else
497decompression_failure: excserver exc_helpers.c
498decompression_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
499endif
500
501ifeq ($(findstring x86_64,$(ARCH_CONFIGS)),)
502EXCLUDED_SOURCES += ldt_code32.s ldt.c
503else # target = osx
504$(OBJROOT)/ldt_mach_exc_server.c:
505 $(MIG) $(CFLAGS) \
506 -user /dev/null \
507 -server $(OBJROOT)/ldt_mach_exc_server.c \
508 -header $(OBJROOT)/ldt_mach_exc.h \
509 mach_exc.defs
510
511ldt: INVALID_ARCHS = $(ARCH_CONFIGS)
512ldt: $(OBJROOT)/ldt_mach_exc_server.c
513ldt: OTHER_CFLAGS += -arch x86_64 -I $(OBJROOT) $(SRCROOT)/ldt_code32.s -Wl,-pagezero_size,0x1000 -Wno-missing-variable-declarations
514ldt: CODE_SIGN_ENTITLEMENTS=ldt_entitlement.plist
515endif
516
517ifneq ($(PLATFORM),BridgeOS)
518EXCLUDED_SOURCES += remote_time.c
519else
520remote_time: INVALID_ARCHS = armv7 armv7s arm64_32
521endif
522
523vm_phys_footprint: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface
524
525vm_kern_count_wired_kernelcache: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders/mach
526
527debug_control_port_for_pid: CODE_SIGN_ENTITLEMENTS = ./debug_control_port_for_pid_entitlement.plist
528
529prng: OTHER_LDFLAGS += -ldarwintest_utils
530
531preoslog: OTHER_LDFLAGS += -ldarwintest_utils
532preoslog: OTHER_CFLAGS += test_utils.c
533
534task_policy: CODE_SIGN_ENTITLEMENTS = ./task_policy_entitlement.plist
535
536OTHER_TEST_TARGETS += task_policy_unentitled
537task_policy_unentitled: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
538task_policy_unentitled: OTHER_CFLAGS += -DUNENTITLED
539task_policy_unentitled: task_policy.c
540 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
541 $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@
542
543
544EXCLUDED_SOURCES += get_shared_cache_address.c
545ifeq ($(PLATFORM),iPhoneOS)
546CUSTOM_TARGETS += get_shared_cache_address
547get_shared_cache_address: INVALID_ARCHS = arm64
548get_shared_cache_address: get_shared_cache_address.c
549 $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/get_shared_cache_address
550
551install-get_shared_cache_address: get_shared_cache_address
552 $(CODESIGN) --force --sign - --timestamp=none --identifier=com.apple.get_shared_cache_address $(SYMROOT)/get_shared_cache_address
553 mkdir -p $(INSTALLDIR)
554 cp $(SYMROOT)/get_shared_cache_address $(INSTALLDIR)/
555endif
556
557ifneq ($(PLATFORM),MacOSX)
558EXCLUDED_SOURCES += hvtest_x86.m hvtest_x86_guest.c hvtest_x86_asm.s
559else
560EXCLUDED_SOURCES += hvtest_x86_guest.c hvtest_x86_asm.s
561hvtest_x86: CODE_SIGN_ENTITLEMENTS = hv_public.entitlements
562hvtest_x86: INVALID_ARCHS += arm64e arm64 i386
563hvtest_x86: OTHER_CFLAGS += hvtest_x86_guest.c hvtest_x86_asm.s -framework Hypervisor -framework Foundation
564endif
565
566OTHER_TEST_TARGETS += io_catalog_send_data vm_memory_share_tests
567
568vm_memory_share_tests: INVALID_ARCHS = i386
569vm_memory_share_tests: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
570vm_memory_share_tests: vm_memory_tests_src/main.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c
571 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
572 echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
573 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@;
574
575# build the mach server as individual helper which does not use libdarwintest
576CUSTOM_TARGETS += vm_memory_share_tests_server
577vm_memory_share_tests_server: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
578vm_memory_share_tests_server: vm_memory_tests_src/server.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c
579 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/vm_memory_share_tests_server
580 echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
581 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@;
582
583install-vm_memory_share_tests_server: vm_memory_share_tests_server
584 mkdir -p $(INSTALLDIR)
585 cp $(SYMROOT)/vm_memory_share_tests_server $(INSTALLDIR)/
586
587io_catalog_send_data: INVALID_ARCHS = i386
588io_catalog_send_data: OTHER_CFLAGS += -DTEST_UNENTITLED -framework IOKit -framework CoreFoundation -framework Foundation
589
590io_catalog_send_data: iokit/io_catalog_send_data.m
591 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
592
593ifeq ($(PLATFORM),MacOSX)
594EXCLUDED_SOURCES += vm/kern_max_task_pmem.c
595endif
596
597EXCLUDED_SOURCES += benchmark/helpers.c
598
599perf_vmfault: OTHER_CFLAGS += benchmark/helpers.c
600
601fault_throughput: vm/fault_throughput.c
602 mkdir -p $(SYMROOT)/vm
603 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/vm/$@
604fault_throughput: OTHER_CFLAGS += benchmark/helpers.c
605
606install-fault_throughput: fault_throughput
607 mkdir -p $(INSTALLDIR)/vm
608 cp $(SYMROOT)/vm/fault_throughput $(INSTALLDIR)/vm/
609
610BATS_PLISTS += $(SRCROOT)/vm/fault_throughput.plist
611
612fault_throughput_benchrun:
613 mkdir -p $(SYMROOT)/vm
614 cp $(SRCROOT)/vm/fault_throughput.lua $(SYMROOT)/vm/fault_throughput.lua
615 chmod +x $(SYMROOT)/vm/fault_throughput.lua
616
617install-fault_throughput_benchrun: fault_throughput_benchrun
618 mkdir -p $(INSTALLDIR)/vm
619 cp $(SYMROOT)/vm/fault_throughput.lua $(INSTALLDIR)/vm
620 chmod +x $(INSTALLDIR)/vm/fault_throughput.lua
621
622CUSTOM_TARGETS += fault_throughput fault_throughput_benchrun
623EXCLUDED_SOURCES += vm/fault_throughput.plist vm/fault_throughput.c
624
625perf_madvise: vm/perf_madvise.c
626 mkdir -p $(SYMROOT)/vm
627 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/vm/$@
628perf_madvise: OTHER_CFLAGS += benchmark/helpers.c
629install-perf_madvise: perf_madvise
630 mkdir -p $(INSTALLDIR)/vm
631 cp $(SYMROOT)/vm/perf_madvise $(INSTALLDIR)/vm/
632perf_madvise_benchrun:
633 mkdir -p $(SYMROOT)/vm
634 cp $(SRCROOT)/vm/perf_madvise.lua $(SYMROOT)/vm/perf_madvise.lua
635 chmod +x $(SYMROOT)/vm/perf_madvise.lua
636install-perf_madvise_benchrun: perf_madvise_benchrun
637 mkdir -p $(INSTALLDIR)/vm
638 cp $(SYMROOT)/vm/perf_madvise.lua $(INSTALLDIR)/vm
639 chmod +x $(INSTALLDIR)/vm/perf_madvise.lua
640
641CUSTOM_TARGETS += perf_madvise perf_madvise_benchrun
642EXCLUDED_SOURCES += vm/perf_madvise.c
643
644task_create_suid_cred: CODE_SIGN_ENTITLEMENTS = ./task_create_suid_cred_entitlement.plist
645
646OTHER_TEST_TARGETS += task_create_suid_cred_unentitled
647task_create_suid_cred_unentitled: OTHER_CFLAGS += -DUNENTITLED
648task_create_suid_cred_unentitled: task_create_suid_cred.c
649 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
650
651ioconnectasyncmethod_57641955: OTHER_LDFLAGS += -framework IOKit
652
653ifeq ($(PLATFORM),BridgeOS)
654EXCLUDED_SOURCES += ipsec.m
655else
656ipsec: OTHER_LDFLAGS += -framework Foundation -framework CoreFoundation -framework NetworkExtension
657ipsec: CODE_SIGN_ENTITLEMENTS = ipsec.entitlements
658endif
659
660test_sysctl_kern_procargs_25397314: OTHER_LDFLAGS += -framework Foundation -ldarwintest_utils
661
662INCLUDED_TEST_SOURCE_DIRS += counter
663
664EXCLUDED_SOURCES += counter/common.c
665counter/counter: OTHER_CFLAGS += counter/common.c test_utils.c
666counter/counter: OTHER_LDFLAGS += -ldarwintest_utils -ldarwintest
667
668counter/benchmark: counter/benchmark.c
669 mkdir -p $(SYMROOT)/counter
670 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
671 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
672
673counter/benchmark: OTHER_CFLAGS += counter/common.c benchmark/helpers.c
674
675install-counter/benchmark: counter/benchmark
676 mkdir -p $(INSTALLDIR)/counter
677 cp $(SYMROOT)/counter/benchmark $(INSTALLDIR)/counter/
678
679counter/benchmark_benchrun:
680 mkdir -p $(SYMROOT)/counter
681 cp $(SRCROOT)/counter/benchmark.lua $(SYMROOT)/counter/benchmark.lua
682 chmod +x $(SYMROOT)/counter/benchmark.lua
683
684install-counter/benchmark_benchrun: counter/benchmark_benchrun
685 mkdir -p $(INSTALLDIR)/counter
686 cp $(SYMROOT)/counter/benchmark.lua $(INSTALLDIR)/counter/
687 chmod +x $(INSTALLDIR)/counter/benchmark.lua
688
689CUSTOM_TARGETS += counter/benchmark counter/benchmark_benchrun
690EXCLUDED_SOURCES += counter/benchmark.c
691
692ifneq ($(PLATFORM),MacOSX)
693EXCLUDED_SOURCES += vm/page_size_globals.c
694else
695vm/page_size_globals: INVALID_ARCHS = arm64 arm64e
696endif
697
698INCLUDED_TEST_SOURCE_DIRS += lockf_uaf_poc
699
700include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets
701
702trial_experiments: CODE_SIGN_ENTITLEMENTS = trial_experiments.entitlements
703trial_experiments: OTHER_CFLAGS += -DENTITLED=1 test_utils.c drop_priv.c
704trial_experiments: trial_experiments.c
705 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
706 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
707
708trial_experiments_unentitled: OTHER_CFLAGS += drop_priv.c test_utils.c
709trial_experiments_unentitled: trial_experiments.c
710 $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@