]>
Commit | Line | Data |
---|---|---|
39037602 A |
1 | PROJECT := 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. | |
5 | ifdef BASEDSTROOT | |
6 | override DSTROOT = $(BASEDSTROOT) | |
7 | endif | |
8 | ||
5ba3f43e A |
9 | ENABLE_LTE_TESTS=YES |
10 | ||
11 | OTHER_LTE_INCLUDE_FILES += \ | |
12 | /System/Library/PrivateFrameworks/LoggingSupport.framework, \ | |
13 | /System/Library/PrivateFrameworks/MobileKeyBag.framework, \ | |
cb323159 | 14 | /System/Library/Frameworks/IOSurface.framework, \ |
5ba3f43e A |
15 | /usr/local/lib/libdarwintest_utils.dylib, \ |
16 | /usr/lib/libapple_crypto.dylib, | |
17 | ||
d9a64523 | 18 | DEVELOPER_DIR ?= $(shell xcode-select -p) |
39037602 A |
19 | |
20 | # the xnu build system will only ever call us with the default target | |
21 | .DEFAULT_GOAL := install | |
22 | ||
23 | include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common | |
24 | ||
25 | OTHER_CFLAGS = -Weverything -Wno-gnu-union-cast -Wno-missing-field-initializers -Wno-partial-availability | |
26 | OTHER_CFLAGS += -Wno-missing-noreturn -Wno-vla -Wno-reserved-id-macro -Wno-documentation-unknown-command | |
5ba3f43e | 27 | OTHER_CFLAGS += -Wno-padded -Wno-used-but-marked-unused -Wno-covered-switch-default -Wno-nullability-extension |
cb323159 | 28 | OTHER_CFLAGS += -Wno-gnu-empty-initializer -Wno-unused-macros -Wno-undef -Wno-fixed-enum-extension |
39037602 | 29 | OTHER_CFLAGS += --std=gnu11 -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders |
d9a64523 | 30 | OTHER_CFLAGS += -UT_NAMESPACE_PREFIX -DT_NAMESPACE_PREFIX=xnu |
5ba3f43e | 31 | OTHER_CFLAGS += -F $(SDKROOT)/System/Library/PrivateFrameworks |
813fb2f6 A |
32 | |
33 | CODESIGN:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign) | |
34 | CODESIGN_ALLOCATE:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign_allocate) | |
39037602 A |
35 | |
36 | # to have custom compiler flags to | |
37 | # target: OTHER_CFLAGS += <my flags> | |
38 | ||
a39ff7e2 A |
39 | atm_diagnostic_flag: OTHER_CFLAGS += drop_priv.c |
40 | ||
c6bf4f31 A |
41 | atm_diagnostic_flag_entitled: CODE_SIGN_ENTITLEMENTS = atm_diagnostic_flag.entitlements |
42 | atm_diagnostic_flag_entitled: OTHER_CFLAGS += drop_priv.c | |
43 | ||
0a7de745 A |
44 | testposixshm: INVALID_ARCHS = i386 |
45 | ||
5ba3f43e A |
46 | avx: INVALID_ARCHS = i386 |
47 | avx: OTHER_CFLAGS += -mavx512f -mavx512bw -mavx512vl | |
48 | avx: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
49 | avx: CONFIG_FLAGS := $(filter-out -O%,$(CONFIG_FLAGS)) | |
50 | # Level 2 optimization must be used to prevent compiler from generating | |
51 | # invalid instructions when compiling with AVX-512 flags. | |
52 | avx: CONFIG_FLAGS += -O2 | |
a39ff7e2 A |
53 | # Disable vzeroupper insertion to work around rdar://problem/35035096 |
54 | avx: CONFIG_FLAGS += -mllvm -x86-use-vzeroupper=0 | |
5ba3f43e A |
55 | ifneq (osx,$(TARGET_NAME)) |
56 | EXCLUDED_SOURCES += avx.c | |
57 | endif | |
58 | ||
39037602 A |
59 | backtracing: OTHER_LDFLAGS += -framework CoreSymbolication |
60 | ||
a39ff7e2 | 61 | data_protection: OTHER_LDFLAGS += -ldarwintest_utils -framework IOKit |
813fb2f6 | 62 | |
cb323159 A |
63 | immovable_send: excserver |
64 | immovable_send: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) | |
65 | immovable_send: OTHER_LDFLAGS += -ldarwintest_utils -lpthread -framework IOKit | |
66 | ||
67 | CUSTOM_TARGETS += immovable_send_client | |
68 | immovable_send: immovable_send_client | |
69 | ||
70 | immovable_send_client: immovable_send_client.c | |
71 | $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) immovable_send_client.c -o $(SYMROOT)/immovable_send_client | |
72 | ||
73 | install-immovable_send_client: immovable_send_client | |
74 | mkdir -p $(INSTALLDIR) | |
75 | cp $(SYMROOT)/immovable_send_client $(INSTALLDIR)/ | |
76 | ||
39037602 | 77 | kdebug: INVALID_ARCHS = i386 |
d9a64523 | 78 | kdebug: OTHER_LDFLAGS = -framework ktrace -ldarwintest_utils -framework kperf |
39037602 | 79 | |
cb323159 | 80 | EXCLUDED_SOURCES += drop_priv.c kperf_helpers.c xnu_quick_test_helpers.c memorystatus_assertion_helpers.c |
39037602 | 81 | |
0a7de745 A |
82 | ifneq ($(PLATFORM),iPhoneOS) |
83 | EXCLUDED_SOURCES += jumbo_va_spaces_28530648.c perf_compressor.c memorystatus_freeze_test.c | |
813fb2f6 A |
84 | endif |
85 | ||
a39ff7e2 | 86 | perf_compressor: OTHER_LDFLAGS += -ldarwintest_utils |
5ba3f43e A |
87 | perf_compressor: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist |
88 | ||
cb323159 | 89 | memorystatus_freeze_test: CODE_SIGN_ENTITLEMENTS=./task_for_pid_entitlement.plist |
d9a64523 | 90 | memorystatus_freeze_test: OTHER_LDFLAGS += -ldarwintest_utils |
cb323159 | 91 | memorystatus_freeze_test: OTHER_CFLAGS += -ldarwintest_utils memorystatus_assertion_helpers.c |
d9a64523 | 92 | |
cb323159 A |
93 | memorystatus_is_assertion: OTHER_LDFLAGS += -ldarwintest_utils |
94 | memorystatus_is_assertion: OTHER_CFLAGS += memorystatus_assertion_helpers.c | |
95 | ||
96 | shared_cache_tests: INVALID_ARCHS = i386 | |
97 | shared_cache_tests: OTHER_LDFLAGS += -ldarwintest_utils | |
98 | ||
99 | stackshot_tests: OTHER_CFLAGS += -Wno-objc-messaging-id | |
100 | stackshot_tests: OTHER_LDFLAGS += -lkdd -ldarwintest_utils -framework Foundation | |
101 | stackshot_tests: INVALID_ARCHS = i386 | |
5ba3f43e | 102 | |
4ba76501 A |
103 | stackshot_accuracy: OTHER_CFLAGS += -ldarwintest_utils -Wno-objc-messaging-id |
104 | stackshot_accuracy: OTHER_LDFLAGS += -lkdd -ldarwintest_utils -framework Foundation | |
105 | stackshot_accuracy: INVALID_ARCHS = i386 | |
106 | ||
0a7de745 | 107 | telemetry: OTHER_LDFLAGS = -framework ktrace -framework CoreFoundation |
d9a64523 A |
108 | telemetry: INVALID_ARCHS = i386 |
109 | ||
5ba3f43e A |
110 | memorystatus_zone_test: INVALID_ARCHS = i386 |
111 | memorystatus_zone_test: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
112 | memorystatus_zone_test: OTHER_LDFLAGS += -framework ktrace | |
113 | memorystatus_zone_test: OTHER_LDFLAGS += -ldarwintest_utils | |
114 | ||
115 | kpc: OTHER_LDFLAGS += -framework kperf | |
813fb2f6 | 116 | |
39037602 A |
117 | kperf: INVALID_ARCHS = i386 |
118 | kperf: OTHER_CFLAGS += kperf_helpers.c | |
5ba3f43e | 119 | kperf: OTHER_LDFLAGS += -framework kperf -framework kperfdata -framework ktrace -ldarwintest_utils |
39037602 A |
120 | |
121 | kperf_backtracing: INVALID_ARCHS = i386 | |
122 | kperf_backtracing: OTHER_CFLAGS += kperf_helpers.c | |
5ba3f43e | 123 | kperf_backtracing: OTHER_LDFLAGS += -framework kperf -framework kperfdata -framework ktrace |
39037602 A |
124 | kperf_backtracing: OTHER_LDFLAGS += -framework CoreSymbolication |
125 | ||
5ba3f43e A |
126 | kevent_qos: OTHER_CFLAGS += -Wno-unused-macros |
127 | kevent_qos: OTHER_CFLAGS += -I $(OBJROOT)/ | |
128 | ||
39037602 A |
129 | mach_get_times: OTHER_LDFLAGS += -ldarwintest_utils |
130 | ||
5ba3f43e A |
131 | monotonic_core: OTHER_LDFLAGS += -framework ktrace |
132 | monotonic_core: INVALID_ARCHS = i386 | |
133 | ||
d9a64523 | 134 | perf_exit: perf_exit_proc |
0a7de745 | 135 | perf_exit: OTHER_LDFLAGS = -framework ktrace -ldarwintest_utils |
39037602 | 136 | perf_exit: INVALID_ARCHS = i386 |
5ba3f43e A |
137 | perf_exit: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist |
138 | ||
cb323159 A |
139 | CUSTOM_TARGETS += prioritize_process_launch_helper |
140 | prioritize_process_launch: prioritize_process_launch_helper | |
141 | ||
142 | prioritize_process_launch_helper: prioritize_process_launch_helper.c | |
143 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) prioritize_process_launch_helper.c -o $(SYMROOT)/prioritize_process_launch_helper | |
144 | echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ | |
145 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; | |
146 | ||
147 | install-prioritize_process_launch_helper: prioritize_process_launch_helper | |
148 | mkdir -p $(INSTALLDIR) | |
149 | cp $(SYMROOT)/prioritize_process_launch_helper $(INSTALLDIR)/ | |
150 | ||
151 | ||
5ba3f43e A |
152 | perf_spawn_fork: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist |
153 | ||
cb323159 A |
154 | mach_exception_reply: OTHER_CFLAGS += -Wno-cast-align |
155 | ||
5ba3f43e A |
156 | os_thread_self_restrict: os_thread_self_restrict.c os_thread_self_restrict-entitlements.plist |
157 | os_thread_self_restrict: CODE_SIGN_ENTITLEMENTS=os_thread_self_restrict-entitlements.plist | |
39037602 | 158 | |
cb323159 A |
159 | osptr: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++98 |
160 | osptr: OTHER_CXXFLAGS += osptr_helper.cpp | |
161 | ||
162 | osptr_dumb: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++17 | |
163 | ||
164 | osptr_11: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++11 | |
165 | osptr_11: OTHER_CXXFLAGS += osptr_helper.cpp | |
166 | osptr_11: osptr.cpp | |
167 | $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
168 | ||
169 | osptr_17: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++17 | |
170 | osptr_17: OTHER_CXXFLAGS += osptr_helper.cpp | |
171 | osptr_17: osptr.cpp | |
172 | $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
173 | ||
174 | EXCLUDED_SOURCES += osptr_helper.cpp | |
175 | ||
176 | os_refcnt: OTHER_CFLAGS += -I$(SRCROOT)/../libkern/ -Wno-gcc-compat -Wno-undef -O3 -flto | |
177 | ||
813fb2f6 A |
178 | task_inspect: CODE_SIGN_ENTITLEMENTS = task_inspect.entitlements |
179 | task_inspect: OTHER_CFLAGS += -DENTITLED=1 | |
180 | ||
d9a64523 A |
181 | turnstile_multihop: OTHER_CFLAGS += -Wno-unused-macros |
182 | turnstile_multihop: OTHER_CFLAGS += -I $(OBJROOT)/ | |
183 | ||
813fb2f6 A |
184 | CUSTOM_TARGETS += perf_exit_proc |
185 | ||
186 | perf_exit_proc: | |
187 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) perf_exit_proc.c -o $(SYMROOT)/perf_exit_proc | |
188 | ||
189 | install-perf_exit_proc: perf_exit_proc | |
190 | mkdir -p $(INSTALLDIR) | |
191 | cp $(SYMROOT)/perf_exit_proc $(INSTALLDIR)/ | |
192 | ||
39037602 A |
193 | stackshot_idle_25570396: INVALID_ARCHS = i386 |
194 | stackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation | |
195 | ||
813fb2f6 A |
196 | stackshot_block_owner_14362384: INVALID_ARCHS = i386 |
197 | stackshot_block_owner_14362384: OTHER_LDFLAGS += -framework Foundation -lpthread -lkdd | |
a39ff7e2 A |
198 | ifeq ($(PLATFORM),MacOSX) |
199 | stackshot_block_owner_14362384: OTHER_LDFLAGS += -lpcre | |
200 | endif | |
201 | ||
202 | all: $(DSTROOT)/usr/local/bin/kcdata | |
203 | ||
d9a64523 | 204 | $(DSTROOT)/usr/local/bin/kcdata: $(SRCROOT)/../tools/lldbmacros/kcdata.py |
a39ff7e2 A |
205 | mkdir -p $(dir $@) |
206 | cp $< $@ | |
207 | chmod a+x $@ | |
813fb2f6 | 208 | |
5ba3f43e | 209 | xnu_quick_test: OTHER_CFLAGS += xnu_quick_test_helpers.c |
a39ff7e2 | 210 | |
d9a64523 A |
211 | xnu_quick_test_entitled: CODE_SIGN_ENTITLEMENTS = xnu_quick_test.entitlements |
212 | ||
213 | CUSTOM_TARGETS += vm_set_max_addr_helper | |
214 | ||
215 | vm_set_max_addr_helper: vm_set_max_addr_helper.c | |
216 | $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_set_max_addr_helper.c -o $(SYMROOT)/vm_set_max_addr_helper; \ | |
217 | echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ | |
218 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; | |
219 | ||
220 | install-vm_set_max_addr_helper: vm_set_max_addr_helper | |
221 | mkdir -p $(INSTALLDIR) | |
222 | cp $(SYMROOT)/vm_set_max_addr_helper $(INSTALLDIR)/ | |
223 | ||
813fb2f6 | 224 | ifeq ($(PLATFORM),iPhoneOS) |
cb323159 | 225 | OTHER_TEST_TARGETS += jumbo_va_spaces_28530648_unentitled vm_phys_footprint_legacy |
813fb2f6 A |
226 | jumbo_va_spaces_28530648: CODE_SIGN_ENTITLEMENTS = jumbo_va_spaces_28530648.entitlements |
227 | jumbo_va_spaces_28530648: OTHER_CFLAGS += -DENTITLED=1 | |
228 | jumbo_va_spaces_28530648: OTHER_LDFLAGS += -ldarwintest_utils | |
229 | ||
230 | jumbo_va_spaces_28530648_unentitled: OTHER_LDFLAGS += -ldarwintest_utils | |
231 | jumbo_va_spaces_28530648_unentitled: jumbo_va_spaces_28530648.c | |
232 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
cb323159 A |
233 | |
234 | vm_phys_footprint_legacy: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface | |
235 | vm_phys_footprint_legacy: OTHER_CFLAGS += -DLEGACY_FOOTPRINT_ENTITLED=1 | |
236 | vm_phys_footprint_legacy: CODE_SIGN_ENTITLEMENTS=./legacy_footprint.entitlement | |
237 | vm_phys_footprint_legacy: vm_phys_footprint.c | |
238 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
239 | ||
813fb2f6 A |
240 | endif |
241 | ||
5ba3f43e A |
242 | task_info_28439149: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist |
243 | ||
a39ff7e2 A |
244 | proc_info: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist |
245 | proc_info: OTHER_LDFLAGS += -ldarwintest_utils | |
246 | ||
d9a64523 A |
247 | proc_info_list_kthreads: CODE_SIGN_ENTITLEMENTS = ./proc_info_list_kthreads.entitlements |
248 | ||
cb323159 A |
249 | proc_info_44873309: CODE_SIGN_ENTITLEMENTS = ./proc_info_44873309.entitlements |
250 | ||
5ba3f43e A |
251 | disk_mount_conditioner: disk_mount_conditioner* |
252 | disk_mount_conditioner: CODE_SIGN_ENTITLEMENTS=./disk_mount_conditioner-entitlements.plist | |
253 | disk_mount_conditioner: OTHER_LDFLAGS += -ldarwintest_utils | |
254 | ||
cb323159 | 255 | disk_mount_conditioner: OTHER_TEST_TARGETS += disk_mount_conditioner_unentitled |
5ba3f43e A |
256 | disk_mount_conditioner_unentitled: OTHER_CFLAGS += -DTEST_UNENTITLED |
257 | disk_mount_conditioner_unentitled: OTHER_LDFLAGS += -ldarwintest_utils | |
258 | disk_mount_conditioner_unentitled: disk_mount_conditioner.c | |
259 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
260 | ||
261 | work_interval_test: CODE_SIGN_ENTITLEMENTS = work_interval_test.entitlements | |
262 | work_interval_test: OTHER_CFLAGS += -DENTITLED=1 | |
263 | ||
a39ff7e2 A |
264 | settimeofday_29193041: OTHER_CFLAGS += drop_priv.c |
265 | ||
5ba3f43e | 266 | settimeofday_29193041_entitled: CODE_SIGN_ENTITLEMENTS = settimeofday_29193041.entitlements |
a39ff7e2 A |
267 | settimeofday_29193041_entitled: OTHER_CFLAGS += drop_priv.c |
268 | ||
5ba3f43e A |
269 | thread_group_set_32261625: OTHER_LDFLAGS = -framework ktrace |
270 | thread_group_set_32261625: INVALID_ARCHS = i386 | |
271 | ||
272 | task_info: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist | |
273 | ||
cb323159 A |
274 | task_vm_info_decompressions: INVALID_ARCHS = x86_64 i386 |
275 | ||
a39ff7e2 A |
276 | socket_bind_35243417: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist |
277 | socket_bind_35685803: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist | |
278 | ||
d9a64523 A |
279 | net_tuntests: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist |
280 | ||
a39ff7e2 A |
281 | ifneq (osx,$(TARGET_NAME)) |
282 | EXCLUDED_SOURCES += no32exec_35914211.c no32exec_35914211_helper.c | |
94ff46dc A |
283 | else # target = osx |
284 | CUSTOM_TARGETS += no32exec_35914211_helper no32exec_35914211_helper_binprefs | |
285 | ||
286 | no32exec_35914211_helper: INVALID_ARCHS = x86_64 i386 | |
287 | no32exec_35914211_helper: | |
288 | $(CC) $(LDFLAGS) $(CFLAGS) -arch i386 no32exec_35914211_helper.c -o $(SYMROOT)/$@; | |
289 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; | |
290 | ||
291 | install-no32exec_35914211_helper: | |
292 | mkdir -p $(INSTALLDIR) | |
293 | cp $(SYMROOT)/no32exec_35914211_helper $(INSTALLDIR)/ | |
a39ff7e2 | 294 | |
94ff46dc | 295 | no32exec_35914211_helper_binprefs: INVALID_ARCHS = x86_64 i386 |
cb323159 | 296 | no32exec_35914211_helper_binprefs: |
94ff46dc A |
297 | $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -arch i386 -arch x86_64 no32exec_35914211_helper.c -o $(SYMROOT)/$@; |
298 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; | |
299 | ||
300 | install-no32exec_35914211_helper_binprefs: | |
301 | mkdir -p $(INSTALLDIR) | |
302 | cp $(SYMROOT)/no32exec_35914211_helper_binprefs $(INSTALLDIR)/ | |
cb323159 A |
303 | |
304 | no32exec_35914211: INVALID_ARCHS = i386 | |
305 | no32exec_35914211: no32exec_35914211_helper | |
306 | no32exec_35914211: no32exec_35914211_helper_binprefs | |
94ff46dc | 307 | endif # (osx,$(TARGET_NAME))) |
a39ff7e2 | 308 | |
d9a64523 A |
309 | MIG:=SDKROOT=$(SDKROOT) $(shell xcrun -sdk "$(TARGETSDK)" -find mig) |
310 | ||
311 | CUSTOM_TARGETS += excserver | |
312 | ||
313 | excserver: | |
314 | $(MIG) $(CFLAGS) \ | |
315 | -sheader $(OBJROOT)/excserver.h \ | |
316 | -server $(OBJROOT)/excserver.c \ | |
317 | -header /dev/null -user /dev/null \ | |
318 | excserver.defs | |
319 | install-excserver: ; | |
320 | ||
321 | exc_resource_threads: excserver | |
322 | exc_resource_threads: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) | |
323 | ||
cb323159 A |
324 | fp_exception: excserver |
325 | fp_exception: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) | |
326 | ||
0a7de745 A |
327 | ifneq (osx,$(TARGET_NAME)) |
328 | EXCLUDED_SOURCES += ldt_code32.s ldt.c | |
329 | else | |
330 | $(OBJROOT)/ldt_mach_exc_server.c: | |
331 | $(MIG) $(CFLAGS) \ | |
332 | -user /dev/null \ | |
333 | -server $(OBJROOT)/ldt_mach_exc_server.c \ | |
334 | -header $(OBJROOT)/ldt_mach_exc.h \ | |
335 | mach_exc.defs | |
336 | ||
337 | ldt: INVALID_ARCHS = i386 | |
338 | ldt: $(OBJROOT)/ldt_mach_exc_server.c | |
cb323159 A |
339 | ldt: OTHER_CFLAGS += -I $(OBJROOT) $(SRCROOT)/ldt_code32.s -Wl,-pagezero_size,0x1000 -Wno-missing-variable-declarations |
340 | ldt: CODE_SIGN_ENTITLEMENTS=ldt_entitlement.plist | |
0a7de745 A |
341 | endif |
342 | ||
d26ffc64 A |
343 | ifneq ($(PLATFORM),BridgeOS) |
344 | EXCLUDED_SOURCES += remote_time.c | |
345 | else | |
346 | remote_time: INVALID_ARCHS = armv7 armv7s arm64_32 | |
347 | endif | |
348 | ||
0a7de745 | 349 | vm_phys_footprint: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface |
cb323159 A |
350 | |
351 | debug_control_port_for_pid: CODE_SIGN_ENTITLEMENTS = ./debug_control_port_for_pid_entitlement.plist | |
352 | ||
353 | prng: OTHER_LDFLAGS += -ldarwintest_utils | |
0a7de745 | 354 | |
39037602 | 355 | include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets |