xref: /xnu-10063.121.3/tests/Makefile (revision 2c2f96dc2b9a4408a43d3150ae9c105355ca3daa)
1*2c2f96dcSApple OSS DistributionsPROJECT := xnu/darwintests
2*2c2f96dcSApple OSS Distributions
3*2c2f96dcSApple OSS Distributions# When building as part of xnu_tests, we get passed a DSTROOT that's got the
4*2c2f96dcSApple OSS Distributions# unit test path in it already.  But, BASEDSTROOT doesn't, so use that instead.
5*2c2f96dcSApple OSS Distributionsifdef BASEDSTROOT
6*2c2f96dcSApple OSS Distributionsoverride DSTROOT = $(BASEDSTROOT)
7*2c2f96dcSApple OSS Distributionsendif
8*2c2f96dcSApple OSS Distributions
9*2c2f96dcSApple OSS DistributionsINVALID_ARCHS = i386 $(filter armv7%,$(ARCH_CONFIGS))
10*2c2f96dcSApple OSS DistributionsENABLE_LTE_TESTS=YES
11*2c2f96dcSApple OSS Distributions
12*2c2f96dcSApple OSS DistributionsOTHER_LTE_INCLUDE_FILES += \
13*2c2f96dcSApple OSS Distributions	/System/Library/PrivateFrameworks/LoggingSupport.framework, \
14*2c2f96dcSApple OSS Distributions	/System/Library/PrivateFrameworks/MobileKeyBag.framework, \
15*2c2f96dcSApple OSS Distributions	/System/Library/Frameworks/IOSurface.framework, \
16*2c2f96dcSApple OSS Distributions	/usr/local/lib/libdarwintest_utils.dylib, \
17*2c2f96dcSApple OSS Distributions	/usr/lib/libapple_crypto.dylib,
18*2c2f96dcSApple OSS Distributions
19*2c2f96dcSApple OSS DistributionsDEVELOPER_DIR ?= $(shell xcode-select -p)
20*2c2f96dcSApple OSS Distributions
21*2c2f96dcSApple OSS Distributions
22*2c2f96dcSApple OSS Distributions# the xnu build system will only ever call us with the default target
23*2c2f96dcSApple OSS Distributions.DEFAULT_GOAL := install
24*2c2f96dcSApple OSS Distributions
25*2c2f96dcSApple OSS Distributionsinclude $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common
26*2c2f96dcSApple OSS Distributions
27*2c2f96dcSApple OSS DistributionsOTHER_CFLAGS  = -Weverything -Wno-gnu-union-cast -Wno-missing-field-initializers -Wno-partial-availability
28*2c2f96dcSApple OSS DistributionsOTHER_CFLAGS += -Wno-missing-noreturn -Wno-vla -Wno-reserved-id-macro -Wno-documentation-unknown-command
29*2c2f96dcSApple OSS DistributionsOTHER_CFLAGS += -Wno-padded -Wno-used-but-marked-unused -Wno-covered-switch-default -Wno-nullability-extension
30*2c2f96dcSApple OSS DistributionsOTHER_CFLAGS += -Wno-gnu-empty-initializer -Wno-unused-macros -Wno-undef -Wno-fixed-enum-extension
31*2c2f96dcSApple OSS DistributionsOTHER_CFLAGS += -Wno-gnu-auto-type -Wno-switch-enum -Wno-variadic-macros
32*2c2f96dcSApple OSS DistributionsOTHER_CFLAGS += --std=gnu11 -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
33*2c2f96dcSApple OSS DistributionsOTHER_CFLAGS += -UT_NAMESPACE_PREFIX -DT_NAMESPACE_PREFIX=xnu -DT_LEAKS_DISABLE=1
34*2c2f96dcSApple OSS DistributionsOTHER_CFLAGS += -F $(SDKROOT)/System/Library/PrivateFrameworks
35*2c2f96dcSApple OSS Distributions
36*2c2f96dcSApple OSS Distributions
37*2c2f96dcSApple OSS DistributionsCODESIGN:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign)
38*2c2f96dcSApple OSS DistributionsCODESIGN_HARDENED_RUNTIME:=$(CODESIGN) -o runtime
39*2c2f96dcSApple OSS DistributionsCODESIGN_ALLOCATE:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign_allocate)
40*2c2f96dcSApple OSS Distributions
41*2c2f96dcSApple OSS Distributionsifeq ($(PLATFORM),iPhoneOS)
42*2c2f96dcSApple OSS Distributions  IOS_TEST_COMPAT = YES
43*2c2f96dcSApple OSS Distributionselse
44*2c2f96dcSApple OSS Distributions  IOS_TEST_COMPAT = NO
45*2c2f96dcSApple OSS Distributionsendif
46*2c2f96dcSApple OSS Distributions
47*2c2f96dcSApple OSS Distributions# Subsystems
48*2c2f96dcSApple OSS Distributions
49*2c2f96dcSApple OSS Distributionsinclude ktrace/Makefile
50*2c2f96dcSApple OSS Distributions
51*2c2f96dcSApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += recount
52*2c2f96dcSApple OSS Distributionsinclude recount/Makefile
53*2c2f96dcSApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += cpu_counters
54*2c2f96dcSApple OSS Distributionsinclude cpu_counters/Makefile
55*2c2f96dcSApple OSS Distributions
56*2c2f96dcSApple OSS Distributions# Miscellaneous Tests
57*2c2f96dcSApple OSS Distributions
58*2c2f96dcSApple OSS Distributionsatm_diagnostic_flag: OTHER_CFLAGS += drop_priv.c
59*2c2f96dcSApple OSS Distributions
60*2c2f96dcSApple OSS Distributionsatm_diagnostic_flag_entitled: CODE_SIGN_ENTITLEMENTS = atm_diagnostic_flag.entitlements
61*2c2f96dcSApple OSS Distributionsatm_diagnostic_flag_entitled: OTHER_CFLAGS += drop_priv.c
62*2c2f96dcSApple OSS Distributions
63*2c2f96dcSApple OSS Distributionsavx: INVALID_ARCHS = $(filter arm%,$(ARCH_CONFIGS))
64*2c2f96dcSApple OSS Distributionsavx: OTHER_CFLAGS += -mavx512f -mavx512bw -mavx512vl
65*2c2f96dcSApple OSS Distributionsavx: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
66*2c2f96dcSApple OSS Distributionsavx: CONFIG_FLAGS := $(filter-out -O%,$(CONFIG_FLAGS))
67*2c2f96dcSApple OSS Distributions# Add -mno-implicit-float to prevent the compiler from touching SIMD regs
68*2c2f96dcSApple OSS Distributions# unexpectedly
69*2c2f96dcSApple OSS Distributionsavx: CONFIG_FLAGS += -mno-implicit-float
70*2c2f96dcSApple OSS Distributions# Disable vzeroupper insertion to work around rdar://problem/35035096
71*2c2f96dcSApple OSS Distributionsavx: CONFIG_FLAGS += -mllvm -x86-use-vzeroupper=0
72*2c2f96dcSApple OSS Distributionsifneq (osx,$(TARGET_NAME))
73*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += avx.c
74*2c2f96dcSApple OSS Distributionsendif
75*2c2f96dcSApple OSS Distributions
76*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS = sr_entitlement_helper
77*2c2f96dcSApple OSS Distributions
78*2c2f96dcSApple OSS Distributionssr_entitlement_helper: sr_entitlement_helper.c
79*2c2f96dcSApple OSS Distributions	mkdir -p $(SYMROOT)
80*2c2f96dcSApple OSS Distributions	$(CC) -I $(OBJROOT) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) sr_entitlement_helper.c -o $(SYMROOT)/$@
81*2c2f96dcSApple OSS Distributions	echo $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@; \
82*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@;
83*2c2f96dcSApple OSS Distributions
84*2c2f96dcSApple OSS Distributionsinstall-sr_entitlement_helper: sr_entitlement_helper
85*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
86*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/sr_entitlement_helper $(INSTALLDIR)
87*2c2f96dcSApple OSS Distributions
88*2c2f96dcSApple OSS Distributionssr_entitlement: OTHER_LDFLAGS += -ldarwintest_utils
89*2c2f96dcSApple OSS Distributions
90*2c2f96dcSApple OSS Distributionsrestrict_jit: CODE_SIGN_ENTITLEMENTS = restrict_jit.entitlements
91*2c2f96dcSApple OSS Distributions
92*2c2f96dcSApple OSS Distributionsbacktracing_tests: OTHER_LDFLAGS += -framework CoreSymbolication
93*2c2f96dcSApple OSS Distributionsbacktracing_tests: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist
94*2c2f96dcSApple OSS Distributions
95*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += corpse_backtrace2
96*2c2f96dcSApple OSS Distributions
97*2c2f96dcSApple OSS Distributionscorpse_backtrace2:
98*2c2f96dcSApple OSS Distributions		$(MIG) $(CFLAGS) \
99*2c2f96dcSApple OSS Distributions		-DMACH_EXC_SERVER_TASKIDTOKEN \
100*2c2f96dcSApple OSS Distributions		-DMACH_EXC_SERVER_BACKTRACE \
101*2c2f96dcSApple OSS Distributions		-sheader $(OBJROOT)/excserver_backtrace.h \
102*2c2f96dcSApple OSS Distributions		-server $(OBJROOT)/excserver_backtrace.c \
103*2c2f96dcSApple OSS Distributions		-header /dev/null -user /dev/null \
104*2c2f96dcSApple OSS Distributions		excserver_backtrace.defs
105*2c2f96dcSApple OSS Distributions
106*2c2f96dcSApple OSS Distributionsinstall-corpse_backtrace2: ;
107*2c2f96dcSApple OSS Distributions
108*2c2f96dcSApple OSS Distributionscorpse_backtrace: corpse_backtrace2 exc_helpers.c
109*2c2f96dcSApple OSS Distributionscorpse_backtrace: OTHER_CFLAGS += $(OBJROOT)/excserver_backtrace.c
110*2c2f96dcSApple OSS Distributionscorpse_backtrace: OTHER_CFLAGS += -I $(OBJROOT)
111*2c2f96dcSApple OSS Distributionscorpse_backtrace: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
112*2c2f96dcSApple OSS Distributions
113*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += immovable_send_client vm_spawn_tool port_exhaustion_client port_table_limits_client fd_table_limits_client posix_spawnattr_set_crash_behavior_np_child kqworkloop_limits_client
114*2c2f96dcSApple OSS Distributions
115*2c2f96dcSApple OSS Distributionsexception_tests: excserver_protect exc_helpers.c
116*2c2f96dcSApple OSS Distributionsexception_tests: CODE_SIGN_ENTITLEMENTS = exception_tests.entitlements
117*2c2f96dcSApple OSS Distributionsexception_tests: OTHER_CFLAGS += $(OBJROOT)/excserver_protect.c
118*2c2f96dcSApple OSS Distributionsexception_tests: OTHER_CFLAGS += -I $(OBJROOT)
119*2c2f96dcSApple OSS Distributionsexception_tests: OTHER_CFLAGS += -DENTITLED=1
120*2c2f96dcSApple OSS Distributions
121*2c2f96dcSApple OSS Distributionsimmovable_send: excserver
122*2c2f96dcSApple OSS Distributionsimmovable_send: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
123*2c2f96dcSApple OSS Distributionsimmovable_send: OTHER_LDFLAGS += -ldarwintest_utils -lpthread -framework IOKit
124*2c2f96dcSApple OSS Distributionsimmovable_send: immovable_send_client
125*2c2f96dcSApple OSS Distributionsimmovable_send: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
126*2c2f96dcSApple OSS Distributions
127*2c2f96dcSApple OSS Distributionslocks: OTHER_LDFLAGS += -ldarwintest_utils
128*2c2f96dcSApple OSS Distributions
129*2c2f96dcSApple OSS Distributionsimmovable_send_client: immovable_send_client.c
130*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) immovable_send_client.c -o $(SYMROOT)/immovable_send_client
131*2c2f96dcSApple OSS Distributions
132*2c2f96dcSApple OSS Distributionsinstall-immovable_send_client: immovable_send_client
133*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
134*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/immovable_send_client $(INSTALLDIR)/
135*2c2f96dcSApple OSS Distributions
136*2c2f96dcSApple OSS Distributions
137*2c2f96dcSApple OSS Distributionsposix_spawnattr_set_crash_behavior_np: posix_spawnattr_set_crash_behavior_np_child
138*2c2f96dcSApple OSS Distributionsposix_spawnattr_set_crash_behavior_np: CODE_SIGN_ENTITLEMENTS = posix_spawnattr_set_crash_behavior_np_entitlements.plist
139*2c2f96dcSApple OSS Distributions
140*2c2f96dcSApple OSS Distributionsposix_spawnattr_set_crash_behavior_np_child: posix_spawnattr_set_crash_behavior_np_child.c
141*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) posix_spawnattr_set_crash_behavior_np_child.c -o $(SYMROOT)/posix_spawnattr_set_crash_behavior_np_child
142*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@
143*2c2f96dcSApple OSS Distributions
144*2c2f96dcSApple OSS Distributionsinstall-posix_spawnattr_set_crash_behavior_np_child: posix_spawnattr_set_crash_behavior_np_child
145*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
146*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/posix_spawnattr_set_crash_behavior_np_child $(INSTALLDIR)/
147*2c2f96dcSApple OSS Distributions
148*2c2f96dcSApple OSS Distributionsposix_spawnattr_set_launch_type_np: posix_spawnattr_set_launch_type_test
149*2c2f96dcSApple OSS Distributionsposix_spawnattr_set_launch_type_np: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
150*2c2f96dcSApple OSS Distributions
151*2c2f96dcSApple OSS Distributionsposix_spawn_launch_type: CODE_SIGN_ENTITLEMENTS = posix_spawn_launch_type-entitlements.plist
152*2c2f96dcSApple OSS Distributions
153*2c2f96dcSApple OSS Distributionsport_exhaustion: OTHER_LDFLAGS += -ldarwintest_utils -lpthread
154*2c2f96dcSApple OSS Distributionsport_exhaustion: port_exhaustion_client
155*2c2f96dcSApple OSS Distributions
156*2c2f96dcSApple OSS Distributionsport_exhaustion_client: port_exhaustion_client.c
157*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) port_exhaustion_client.c -o $(SYMROOT)/port_exhaustion_client
158*2c2f96dcSApple OSS Distributions
159*2c2f96dcSApple OSS Distributionsinstall-port_exhaustion_client: port_exhaustion_client
160*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
161*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/port_exhaustion_client $(INSTALLDIR)/
162*2c2f96dcSApple OSS Distributions
163*2c2f96dcSApple OSS Distributionsport_table_limits: rnserver
164*2c2f96dcSApple OSS Distributionsport_table_limits: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
165*2c2f96dcSApple OSS Distributionsport_table_limits: OTHER_CFLAGS += $(OBJROOT)/rnServer.c -I $(OBJROOT)
166*2c2f96dcSApple OSS Distributionsport_table_limits: OTHER_LDFLAGS += -ldarwintest_utils -lpthread
167*2c2f96dcSApple OSS Distributionsport_table_limits: port_table_limits_client
168*2c2f96dcSApple OSS Distributions
169*2c2f96dcSApple OSS Distributionsport_table_limits_client: port_table_limits_client.c
170*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) port_table_limits_client.c -o $(SYMROOT)/port_table_limits_client
171*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@
172*2c2f96dcSApple OSS Distributions
173*2c2f96dcSApple OSS Distributionsinstall-port_table_limits_client: port_table_limits_client
174*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
175*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/port_table_limits_client $(INSTALLDIR)/
176*2c2f96dcSApple OSS Distributions
177*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += kqwl_rnserver
178*2c2f96dcSApple OSS Distributions
179*2c2f96dcSApple OSS Distributionskqwl_rnserver:
180*2c2f96dcSApple OSS Distributions	$(MIG) $(CFLAGS) \
181*2c2f96dcSApple OSS Distributions		-DKQWORKLOOPS_VIOLATION_SUPPORTED \
182*2c2f96dcSApple OSS Distributions		-user /dev/null \
183*2c2f96dcSApple OSS Distributions		-header $(OBJROOT)/kqwl_rn.h \
184*2c2f96dcSApple OSS Distributions		-sheader $(OBJROOT)/kqwl_rnServer.h \
185*2c2f96dcSApple OSS Distributions		-server $(OBJROOT)/kqwl_rnServer.c \
186*2c2f96dcSApple OSS Distributions		rnserver.defs
187*2c2f96dcSApple OSS Distributionsinstall-kqwl_rnserver: ;
188*2c2f96dcSApple OSS Distributions
189*2c2f96dcSApple OSS Distributionskqworkloop_limits: kqwl_rnserver
190*2c2f96dcSApple OSS Distributionskqworkloop_limits: OTHER_CFLAGS += $(OBJROOT)/kqwl_rnServer.c -I $(OBJROOT)
191*2c2f96dcSApple OSS Distributionskqworkloop_limits: OTHER_LDFLAGS += -ldarwintest_utils -lpthread
192*2c2f96dcSApple OSS Distributionskqworkloop_limits: kqworkloop_limits_client
193*2c2f96dcSApple OSS Distributions
194*2c2f96dcSApple OSS Distributionskqworkloop_limits_client: kqworkloop_limits_client.c
195*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) kqworkloop_limits_client.c -o $(SYMROOT)/kqworkloop_limits_client
196*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@
197*2c2f96dcSApple OSS Distributions
198*2c2f96dcSApple OSS Distributionsinstall-kqworkloop_limits_client: kqworkloop_limits_client
199*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
200*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/kqworkloop_limits_client $(INSTALLDIR)/
201*2c2f96dcSApple OSS Distributions
202*2c2f96dcSApple OSS Distributionsipc/task_name_for_pid: CODE_SIGN_ENTITLEMENTS = ipc/task_name_for_pid_entitlement.plist
203*2c2f96dcSApple OSS Distributions
204*2c2f96dcSApple OSS Distributionsfd_table_limits: rnserver
205*2c2f96dcSApple OSS Distributionsfd_table_limits: OTHER_CFLAGS += $(OBJROOT)/rnServer.c -I $(OBJROOT)
206*2c2f96dcSApple OSS Distributionsfd_table_limits: OTHER_LDFLAGS += -ldarwintest_utils -lpthread
207*2c2f96dcSApple OSS Distributionsfd_table_limits: fd_table_limits_client
208*2c2f96dcSApple OSS Distributions
209*2c2f96dcSApple OSS Distributionsfd_table_limits_client: fd_table_limits_client.c
210*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) fd_table_limits_client.c -o $(SYMROOT)/fd_table_limits_client
211*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@
212*2c2f96dcSApple OSS Distributions
213*2c2f96dcSApple OSS Distributionsinstall-fd_table_limits_client: fd_table_limits_client
214*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
215*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/fd_table_limits_client $(INSTALLDIR)/
216*2c2f96dcSApple OSS Distributions
217*2c2f96dcSApple OSS Distributionsvm_spawn_tool: INVALID_ARCHS = i386
218*2c2f96dcSApple OSS Distributionsvm_spawn_tool: vm_spawn_tool.c
219*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_spawn_tool.c -o $(SYMROOT)/vm_spawn_tool
220*2c2f96dcSApple OSS Distributions
221*2c2f96dcSApple OSS Distributionsinstall-vm_spawn_tool: vm_spawn_tool
222*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/tools
223*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm_spawn_tool $(INSTALLDIR)/tools/
224*2c2f96dcSApple OSS Distributions
225*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += imm_pinned_control_port_crasher
226*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += imm_pinned_control_port_crasher_3P_hardened
227*2c2f96dcSApple OSS Distributions
228*2c2f96dcSApple OSS Distributionsimm_pinned_control_port: excserver_protect
229*2c2f96dcSApple OSS Distributionsimm_pinned_control_port: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
230*2c2f96dcSApple OSS Distributionsimm_pinned_control_port: OTHER_CFLAGS += $(OBJROOT)/excserver_protect.c -I $(OBJROOT)
231*2c2f96dcSApple OSS Distributionsimm_pinned_control_port: OTHER_LDFLAGS += -ldarwintest_utils -lpthread
232*2c2f96dcSApple OSS Distributionsimm_pinned_control_port: imm_pinned_control_port_crasher imm_pinned_control_port_crasher_3P_hardened
233*2c2f96dcSApple OSS Distributions
234*2c2f96dcSApple OSS Distributionsimm_pinned_control_port_crasher: imm_pinned_control_port_crasher.c cs_helpers.c
235*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \
236*2c2f96dcSApple OSS Distributions	$^ -o $(SYMROOT)/$@
237*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@
238*2c2f96dcSApple OSS Distributions
239*2c2f96dcSApple OSS Distributionsimm_pinned_control_port_crasher_3P_hardened: CODE_SIGN_ENTITLEMENTS = entitlements/hardened-binary-entitlements-1.plist
240*2c2f96dcSApple OSS Distributionsimm_pinned_control_port_crasher_3P_hardened: imm_pinned_control_port_crasher.c cs_helpers.c
241*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \
242*2c2f96dcSApple OSS Distributions	$^ -o $(SYMROOT)/$@
243*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@
244*2c2f96dcSApple OSS Distributions
245*2c2f96dcSApple OSS Distributionsinstall-imm_pinned_control_port_crasher: imm_pinned_control_port_crasher
246*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
247*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/$^ $(INSTALLDIR)/
248*2c2f96dcSApple OSS Distributions
249*2c2f96dcSApple OSS Distributionsinstall-imm_pinned_control_port_crasher_3P_hardened: imm_pinned_control_port_crasher_3P_hardened
250*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
251*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/$^ $(INSTALLDIR)/
252*2c2f96dcSApple OSS Distributions
253*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += reply_port_defense_client
254*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += reply_port_defense_client_3P_hardened
255*2c2f96dcSApple OSS Distributions
256*2c2f96dcSApple OSS Distributionsreply_port_defense: excserver_protect
257*2c2f96dcSApple OSS Distributionsreply_port_defense: OTHER_CFLAGS += $(OBJROOT)/excserver_protect.c -I $(OBJROOT)
258*2c2f96dcSApple OSS Distributionsreply_port_defense: OTHER_LDFLAGS += -ldarwintest_utils -lpthread
259*2c2f96dcSApple OSS Distributionsreply_port_defense: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
260*2c2f96dcSApple OSS Distributionsreply_port_defense: reply_port_defense_client reply_port_defense_client_3P_hardened
261*2c2f96dcSApple OSS Distributions
262*2c2f96dcSApple OSS Distributionsreply_port_defense_client: reply_port_defense_client.c cs_helpers.c
263*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \
264*2c2f96dcSApple OSS Distributions	$^ -o $(SYMROOT)/$@
265*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@
266*2c2f96dcSApple OSS Distributions
267*2c2f96dcSApple OSS Distributionsreply_port_defense_client_3P_hardened: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-binary-entitlements-1.plist
268*2c2f96dcSApple OSS Distributionsreply_port_defense_client_3P_hardened: reply_port_defense_client.c cs_helpers.c
269*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \
270*2c2f96dcSApple OSS Distributions	$^ -o $(SYMROOT)/$@
271*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@
272*2c2f96dcSApple OSS Distributions
273*2c2f96dcSApple OSS Distributionsinstall-reply_port_defense_client: reply_port_defense_client
274*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
275*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/$< $(INSTALLDIR)/
276*2c2f96dcSApple OSS Distributions
277*2c2f96dcSApple OSS Distributionsinstall-reply_port_defense_client_3P_hardened: reply_port_defense_client_3P_hardened
278*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
279*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/$< $(INSTALLDIR)/
280*2c2f96dcSApple OSS Distributions
281*2c2f96dcSApple OSS Distributionskas_info: OTHER_LDFLAGS += -framework CoreSymbolication
282*2c2f96dcSApple OSS Distributionskas_info: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist
283*2c2f96dcSApple OSS Distributions
284*2c2f96dcSApple OSS Distributionshost_statistics_rate_limiting: cs_helpers.c host_statistics_rate_limiting.c
285*2c2f96dcSApple OSS Distributions
286*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += drop_priv.c xnu_quick_test_helpers.c memorystatus_assertion_helpers.c bpflib.c in_cksum.c test_utils.c inet_transfer.c net_test_lib.c cs_helpers.c
287*2c2f96dcSApple OSS Distributions
288*2c2f96dcSApple OSS Distributionsifneq ($(IOS_TEST_COMPAT),YES)
289*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += jumbo_va_spaces_28530648.c perf_compressor.c vm/entitlement_increased_memory_limit.c vm/ios13extended_footprint.c vm/entitlement_internal_bands.c
290*2c2f96dcSApple OSS Distributionsendif
291*2c2f96dcSApple OSS Distributions
292*2c2f96dcSApple OSS Distributionsperf_compressor: OTHER_LDFLAGS += -ldarwintest_utils
293*2c2f96dcSApple OSS Distributionsperf_compressor: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist
294*2c2f96dcSApple OSS Distributions
295*2c2f96dcSApple OSS Distributions
296*2c2f96dcSApple OSS Distributionsvm/memorystatus_freeze_test: CODE_SIGN_ENTITLEMENTS=./task_for_pid_entitlement.plist
297*2c2f96dcSApple OSS Distributionsvm/memorystatus_freeze_test: OTHER_LDFLAGS += -ldarwintest_utils
298*2c2f96dcSApple OSS Distributionsvm/memorystatus_freeze_test: memorystatus_assertion_helpers.c test_utils.c vm/memorystatus_freeze_test.c
299*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
300*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
301*2c2f96dcSApple OSS Distributions
302*2c2f96dcSApple OSS Distributionsvm/memorystatus_freeze_test_entitled: CODE_SIGN_ENTITLEMENTS=./vm/memorystatus_freeze_test_entitled.plist
303*2c2f96dcSApple OSS Distributionsvm/memorystatus_freeze_test_entitled: OTHER_LDFLAGS += -ldarwintest_utils
304*2c2f96dcSApple OSS Distributionsvm/memorystatus_freeze_test_entitled: test_utils.c vm/memorystatus_freeze_test_entitled.c
305*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
306*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
307*2c2f96dcSApple OSS Distributions
308*2c2f96dcSApple OSS Distributionsmemorystatus_is_assertion: OTHER_LDFLAGS += -ldarwintest_utils
309*2c2f96dcSApple OSS Distributionsmemorystatus_is_assertion: OTHER_CFLAGS += memorystatus_assertion_helpers.c
310*2c2f96dcSApple OSS Distributions
311*2c2f96dcSApple OSS Distributionsmemorystatus_vm_map_fork: OTHER_CFLAGS += test_utils.c
312*2c2f96dcSApple OSS Distributionsmemorystatus_vm_map_fork: OTHER_LDFLAGS += -ldarwintest_utils
313*2c2f96dcSApple OSS Distributions
314*2c2f96dcSApple OSS Distributionsshared_cache_tests: OTHER_LDFLAGS += -ldarwintest_utils
315*2c2f96dcSApple OSS Distributions
316*2c2f96dcSApple OSS Distributionsstackshot_tests: ./stackshot-entitlements.plist stackshot_tests.m
317*2c2f96dcSApple OSS Distributionsstackshot_tests: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
318*2c2f96dcSApple OSS Distributionsstackshot_tests: OTHER_CFLAGS += -Wno-objc-messaging-id
319*2c2f96dcSApple OSS Distributionsstackshot_tests: OTHER_LDFLAGS += -lkdd -lz -ldarwintest_utils -framework Foundation -framework IOKit
320*2c2f96dcSApple OSS Distributions
321*2c2f96dcSApple OSS Distributionsstackshot_accuracy: ./stackshot-entitlements.plist
322*2c2f96dcSApple OSS Distributionsstackshot_accuracy: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
323*2c2f96dcSApple OSS Distributionsstackshot_accuracy: OTHER_CFLAGS += -ldarwintest_utils -Wno-objc-messaging-id
324*2c2f96dcSApple OSS Distributionsstackshot_accuracy: OTHER_LDFLAGS += -lkdd -ldarwintest_utils -framework Foundation
325*2c2f96dcSApple OSS Distributionsstackshot_accuracy: INVALID_ARCHS = i386
326*2c2f96dcSApple OSS Distributions
327*2c2f96dcSApple OSS Distributionsstackshot_spawn_exit_stress: ./stackshot-entitlements.plist
328*2c2f96dcSApple OSS Distributionsstackshot_spawn_exit_stress: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
329*2c2f96dcSApple OSS Distributions
330*2c2f96dcSApple OSS Distributionsifeq ($(PLATFORM),MacOSX)
331*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += stackshot_translated_child
332*2c2f96dcSApple OSS Distributions
333*2c2f96dcSApple OSS Distributionsstackshot_translated_child: INVALID_ARCHS = arm64 arm64e
334*2c2f96dcSApple OSS Distributionsstackshot_translated_child: stackshot_translated_child.c
335*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) stackshot_translated_child.c -o $(SYMROOT)/stackshot_translated_child
336*2c2f96dcSApple OSS Distributions
337*2c2f96dcSApple OSS Distributionsinstall-stackshot_translated_child: stackshot_translated_child
338*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
339*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/stackshot_translated_child $(INSTALLDIR)/
340*2c2f96dcSApple OSS Distributionselse
341*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += stackshot_translated_child.c
342*2c2f96dcSApple OSS Distributionsendif
343*2c2f96dcSApple OSS Distributions
344*2c2f96dcSApple OSS Distributionsmicrostackshot_tests: ./stackshot-entitlements.plist
345*2c2f96dcSApple OSS Distributionsmicrostackshot_tests: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
346*2c2f96dcSApple OSS Distributionsmicrostackshot_tests: OTHER_LDFLAGS = -ldarwintest_utils -framework ktrace -framework kperf -framework CoreFoundation
347*2c2f96dcSApple OSS Distributions
348*2c2f96dcSApple OSS Distributionsmemorystatus_zone_test: ./stackshot-entitlements.plist
349*2c2f96dcSApple OSS Distributionsmemorystatus_zone_test: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
350*2c2f96dcSApple OSS Distributionsmemorystatus_zone_test: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
351*2c2f96dcSApple OSS Distributionsmemorystatus_zone_test: OTHER_LDFLAGS += -framework ktrace
352*2c2f96dcSApple OSS Distributionsmemorystatus_zone_test: OTHER_LDFLAGS += -ldarwintest_utils
353*2c2f96dcSApple OSS Distributions
354*2c2f96dcSApple OSS Distributionsmemcmp_zero: OTHER_CFLAGS += ../osfmk/arm64/memcmp_zero.s
355*2c2f96dcSApple OSS Distributions
356*2c2f96dcSApple OSS Distributionstext_corruption: OTHER_LDFLAGS += -ldarwintest_utils
357*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += text_corruption_helper
358*2c2f96dcSApple OSS Distributions
359*2c2f96dcSApple OSS Distributionstext_corruption_helper:
360*2c2f96dcSApple OSS Distributions	$(CC) $(LDFLAGS) $(CFLAGS) text_corruption_helper.c -lm -o $(SYMROOT)/$@;
361*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
362*2c2f96dcSApple OSS Distributions
363*2c2f96dcSApple OSS Distributionsinstall-text_corruption_helper: text_corruption_helper
364*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
365*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/text_corruption_helper $(INSTALLDIR)/
366*2c2f96dcSApple OSS Distributions
367*2c2f96dcSApple OSS Distributionscodesigntests: CODE_SIGN_ENTITLEMENTS=codesigntests-entitlements.plist
368*2c2f96dcSApple OSS Distributionscodesigntests: OTHER_CFLAGS += -DTESTNAME=codesigntests
369*2c2f96dcSApple OSS Distributions# Adding a custom target and build/install rules since CODE_SIGN_ENTITLEMENTS
370*2c2f96dcSApple OSS Distributions# does not take in arguments, and we need to sign this test using a sha256T
371*2c2f96dcSApple OSS Distributions# digest
372*2c2f96dcSApple OSS Distributions
373*2c2f96dcSApple OSS DistributionsOTHER_TEST_TARGETS += codesigntests_sha256t
374*2c2f96dcSApple OSS Distributionscodesigntests_sha256t: OTHER_CFLAGS += -DTESTNAME=codesigntests_sha256t
375*2c2f96dcSApple OSS Distributions
376*2c2f96dcSApple OSS Distributionscodesigntests_sha256t: codesigntests.c
377*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(DT_LDFLAGS) $(LDFLAGS) $(CFLAGS) codesigntests.c -o $(SYMROOT)/$@;
378*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --digest=sha256T -s - --entitlements codesigntests-entitlements.plist $(SYMROOT)/$@;
379*2c2f96dcSApple OSS Distributionsinstall-codesigntests_sha256t: codesigntests_sha256t
380*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
381*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/codesigntests_sha256t $(INSTALLDIR)/
382*2c2f96dcSApple OSS Distributions
383*2c2f96dcSApple OSS Distributions
384*2c2f96dcSApple OSS Distributionsecc_test: OTHER_LDFLAGS += -ldarwintest_utils
385*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += ecc_test_helper
386*2c2f96dcSApple OSS Distributions
387*2c2f96dcSApple OSS Distributionsecc_test_helper:
388*2c2f96dcSApple OSS Distributions	$(CC) $(LDFLAGS) $(CFLAGS) ecc_test_helper.c -lm -o $(SYMROOT)/$@;
389*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
390*2c2f96dcSApple OSS Distributions
391*2c2f96dcSApple OSS Distributionsinstall-ecc_test_helper: ecc_test_helper
392*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
393*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/ecc_test_helper $(INSTALLDIR)/
394*2c2f96dcSApple OSS Distributions
395*2c2f96dcSApple OSS Distributionsvm/test_vm_no_pager: excserver
396*2c2f96dcSApple OSS Distributionsvm/test_vm_no_pager: OTHER_LDFLAGS += -ldarwintest_utils -lpthread -lkdd -framework Foundation
397*2c2f96dcSApple OSS Distributionsvm/test_vm_no_pager: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders $(OBJROOT)/excserver.c -I$(OBJROOT)
398*2c2f96dcSApple OSS Distributionsvm,/test_vm_no_pager: vm/test_vm_no_pager_helper
399*2c2f96dcSApple OSS Distributionsvm/test_vm_no_pager: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
400*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += vm/test_vm_no_pager_helper
401*2c2f96dcSApple OSS Distributions
402*2c2f96dcSApple OSS Distributionsvm/test_vm_no_pager_helper: vm/test_vm_no_pager_helper.c
403*2c2f96dcSApple OSS Distributions	$(CC) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -lm -o $(SYMROOT)/$@;
404*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
405*2c2f96dcSApple OSS Distributions
406*2c2f96dcSApple OSS Distributionsinstall-vm/test_vm_no_pager_helper: vm/test_vm_no_pager_helper
407*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/vm
408*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm/test_vm_no_pager_helper $(INSTALLDIR)/vm/
409*2c2f96dcSApple OSS Distributions
410*2c2f96dcSApple OSS Distributions
411*2c2f96dcSApple OSS Distributionskevent_qos: OTHER_CFLAGS += -Wno-unused-macros
412*2c2f96dcSApple OSS Distributionskevent_qos: OTHER_CFLAGS += -I $(OBJROOT)/
413*2c2f96dcSApple OSS Distributions
414*2c2f96dcSApple OSS Distributionstest_knote_use_after_free: OTHER_CFLAGS += -Wno-unused-macros
415*2c2f96dcSApple OSS Distributionstest_knote_use_after_free: OTHER_LDFLAGS += -ldarwintest_utils -lpthread
416*2c2f96dcSApple OSS Distributions
417*2c2f96dcSApple OSS Distributionsmach_get_times: OTHER_LDFLAGS += -ldarwintest_utils
418*2c2f96dcSApple OSS Distributions
419*2c2f96dcSApple OSS Distributionsmonotonic_core: ./stackshot-entitlements.plist
420*2c2f96dcSApple OSS Distributionsmonotonic_core: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
421*2c2f96dcSApple OSS Distributionsmonotonic_core: OTHER_LDFLAGS += -framework ktrace
422*2c2f96dcSApple OSS Distributions
423*2c2f96dcSApple OSS Distributionsperf_exit: perf_exit_proc
424*2c2f96dcSApple OSS Distributionsperf_exit: ./stackshot-entitlements.plist
425*2c2f96dcSApple OSS Distributionsperf_exit: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
426*2c2f96dcSApple OSS Distributionsperf_exit: OTHER_LDFLAGS = -framework ktrace -ldarwintest_utils
427*2c2f96dcSApple OSS Distributionsperf_exit: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist
428*2c2f96dcSApple OSS Distributions
429*2c2f96dcSApple OSS Distributionsipc/mach_exc_port_substitute: excserver
430*2c2f96dcSApple OSS Distributionsipc/mach_exc_port_substitute: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
431*2c2f96dcSApple OSS Distributionsipc/mach_exc_port_substitute: CODE_SIGN_ENTITLEMENTS = ipc/mach_exc_port_substitute.plist
432*2c2f96dcSApple OSS Distributions
433*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += prioritize_process_launch_helper
434*2c2f96dcSApple OSS Distributionsprioritize_process_launch: prioritize_process_launch_helper
435*2c2f96dcSApple OSS Distributions
436*2c2f96dcSApple OSS Distributionsprioritize_process_launch_helper: prioritize_process_launch_helper.c
437*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) prioritize_process_launch_helper.c -o $(SYMROOT)/prioritize_process_launch_helper
438*2c2f96dcSApple OSS Distributions	echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
439*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
440*2c2f96dcSApple OSS Distributions
441*2c2f96dcSApple OSS Distributionsinstall-prioritize_process_launch_helper: prioritize_process_launch_helper
442*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
443*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/prioritize_process_launch_helper $(INSTALLDIR)/
444*2c2f96dcSApple OSS Distributions
445*2c2f96dcSApple OSS Distributions
446*2c2f96dcSApple OSS Distributionsperf_spawn_fork: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist
447*2c2f96dcSApple OSS Distributions
448*2c2f96dcSApple OSS Distributionsmach_exception_reply: OTHER_CFLAGS += -Wno-cast-align
449*2c2f96dcSApple OSS Distributionsmach_exception_reply: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
450*2c2f96dcSApple OSS Distributions
451*2c2f96dcSApple OSS Distributionsos_thread_self_restrict: os_thread_self_restrict.c os_thread_self_restrict-entitlements.plist
452*2c2f96dcSApple OSS Distributionsos_thread_self_restrict: CODE_SIGN_ENTITLEMENTS=os_thread_self_restrict-entitlements.plist
453*2c2f96dcSApple OSS Distributionsos_thread_self_restrict: OTHER_LDFLAGS += -sectcreate __TEXT __info_plist os_thread_self_restrict-identifier.plist
454*2c2f96dcSApple OSS Distributions
455*2c2f96dcSApple OSS Distributions# Temporarily disabled.  See rdar://121952316
456*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += os_thread_self_restrict.c
457*2c2f96dcSApple OSS Distributions
458*2c2f96dcSApple OSS Distributionssubsystem_root_path: subsystem_root_path.c subsystem_root_path-entitlements.plist
459*2c2f96dcSApple OSS Distributionssubsystem_root_path: CODE_SIGN_ENTITLEMENTS=subsystem_root_path-entitlements.plist
460*2c2f96dcSApple OSS Distributions
461*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard bounded_ptr_src/*.cpp)
462*2c2f96dcSApple OSS Distributionsbounded_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
463*2c2f96dcSApple OSS Distributionsbounded_ptr: $(wildcard bounded_ptr_src/*.cpp) bounded_ptr.cpp
464*2c2f96dcSApple OSS Distributions
465*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += bounded_ptr_03.cpp
466*2c2f96dcSApple OSS Distributionsbounded_ptr_03: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++03 $(DT_LDFLAGS)
467*2c2f96dcSApple OSS Distributionsbounded_ptr_03: bounded_ptr_03.cpp
468*2c2f96dcSApple OSS Distributions
469*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard bounded_array_src/*.cpp)
470*2c2f96dcSApple OSS Distributionsbounded_array: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
471*2c2f96dcSApple OSS Distributionsbounded_array: $(wildcard bounded_array_src/*.cpp) bounded_array.cpp
472*2c2f96dcSApple OSS Distributions
473*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard bounded_array_ref_src/*.cpp)
474*2c2f96dcSApple OSS Distributionsbounded_array_ref: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
475*2c2f96dcSApple OSS Distributionsbounded_array_ref: $(wildcard bounded_array_ref_src/*.cpp) bounded_array_ref.cpp
476*2c2f96dcSApple OSS Distributions
477*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard intrusive_shared_ptr_src/*.cpp)
478*2c2f96dcSApple OSS Distributionsintrusive_shared_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
479*2c2f96dcSApple OSS Distributionsintrusive_shared_ptr: $(wildcard intrusive_shared_ptr_src/*.cpp) intrusive_shared_ptr.cpp
480*2c2f96dcSApple OSS Distributions
481*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard safe_allocation_src/*.cpp)
482*2c2f96dcSApple OSS Distributionssafe_allocation: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17
483*2c2f96dcSApple OSS Distributionssafe_allocation: $(wildcard safe_allocation_src/*.cpp) safe_allocation.cpp
484*2c2f96dcSApple OSS Distributions
485*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += osptr_compat.cpp
486*2c2f96dcSApple OSS Distributionsosptr_98: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++98 -DOSPTR_STD="98"
487*2c2f96dcSApple OSS Distributionsosptr_98: osptr_compat.cpp
488*2c2f96dcSApple OSS Distributions	$(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
489*2c2f96dcSApple OSS Distributionsosptr_11: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++11 -DOSPTR_STD="11"
490*2c2f96dcSApple OSS Distributionsosptr_11: osptr_compat.cpp
491*2c2f96dcSApple OSS Distributions	$(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
492*2c2f96dcSApple OSS Distributionsosptr_14: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++14 -DOSPTR_STD="14"
493*2c2f96dcSApple OSS Distributionsosptr_14: osptr_compat.cpp
494*2c2f96dcSApple OSS Distributions	$(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
495*2c2f96dcSApple OSS Distributionsosptr_17: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++17 -DOSPTR_STD="17"
496*2c2f96dcSApple OSS Distributionsosptr_17: osptr_compat.cpp
497*2c2f96dcSApple OSS Distributions	$(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
498*2c2f96dcSApple OSS Distributions
499*2c2f96dcSApple OSS Distributionspriority_queue: OTHER_CXXFLAGS += -std=c++17
500*2c2f96dcSApple OSS Distributionsvm/zalloc: OTHER_LDFLAGS += -ldarwintest_utils
501*2c2f96dcSApple OSS Distributionsvm/zalloc_buddy: OTHER_CFLAGS += -Wno-format-pedantic
502*2c2f96dcSApple OSS Distributions
503*2c2f96dcSApple OSS Distributionsos_refcnt: OTHER_CFLAGS += -I$(SRCROOT)/../libkern/ -Wno-gcc-compat -Wno-undef -O3 -flto
504*2c2f96dcSApple OSS Distributions
505*2c2f96dcSApple OSS Distributionskernel_inspection: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
506*2c2f96dcSApple OSS Distributionskernel_inspection: OTHER_CFLAGS += -DENTITLED=1
507*2c2f96dcSApple OSS Distributions
508*2c2f96dcSApple OSS Distributionsturnstile_multihop: OTHER_CFLAGS += -Wno-unused-macros
509*2c2f96dcSApple OSS Distributionsturnstile_multihop: OTHER_CFLAGS += -I $(OBJROOT)/
510*2c2f96dcSApple OSS Distributions
511*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += perf_exit_proc
512*2c2f96dcSApple OSS Distributions
513*2c2f96dcSApple OSS Distributionsperf_exit_proc:
514*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) perf_exit_proc.c -o $(SYMROOT)/perf_exit_proc
515*2c2f96dcSApple OSS Distributions
516*2c2f96dcSApple OSS Distributionsinstall-perf_exit_proc: perf_exit_proc
517*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
518*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/perf_exit_proc $(INSTALLDIR)/
519*2c2f96dcSApple OSS Distributions
520*2c2f96dcSApple OSS Distributions# Stackshot
521*2c2f96dcSApple OSS Distributions
522*2c2f96dcSApple OSS Distributions
523*2c2f96dcSApple OSS Distributionsstackshot_idle_25570396: ./stackshot-entitlements.plist
524*2c2f96dcSApple OSS Distributionsstackshot_idle_25570396: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
525*2c2f96dcSApple OSS Distributionsstackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation
526*2c2f96dcSApple OSS Distributionsstackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation
527*2c2f96dcSApple OSS Distributions
528*2c2f96dcSApple OSS Distributionsstackshot_block_owner_14362384: ./stackshot-entitlements.plist
529*2c2f96dcSApple OSS Distributionsstackshot_block_owner_14362384: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
530*2c2f96dcSApple OSS Distributionsstackshot_block_owner_14362384: OTHER_LDFLAGS += -framework Foundation -lpthread -lkdd
531*2c2f96dcSApple OSS Distributionsifeq ($(PLATFORM),MacOSX)
532*2c2f96dcSApple OSS Distributionsstackshot_block_owner_14362384: OTHER_LDFLAGS += -lpcre
533*2c2f96dcSApple OSS Distributionsendif
534*2c2f96dcSApple OSS Distributions
535*2c2f96dcSApple OSS Distributionsall: $(DSTROOT)/usr/local/bin/kcdata
536*2c2f96dcSApple OSS Distributions
537*2c2f96dcSApple OSS Distributions$(DSTROOT)/usr/local/bin/kcdata: $(SRCROOT)/../tools/lldbmacros/kcdata.py
538*2c2f96dcSApple OSS Distributions	mkdir -p $(dir $@)
539*2c2f96dcSApple OSS Distributions	cp $< $@
540*2c2f96dcSApple OSS Distributions	chmod a+x $@
541*2c2f96dcSApple OSS Distributions
542*2c2f96dcSApple OSS Distributionsxnu_quick_test: OTHER_CFLAGS += xnu_quick_test_helpers.c
543*2c2f96dcSApple OSS Distributions
544*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += vm_set_max_addr_helper
545*2c2f96dcSApple OSS Distributions
546*2c2f96dcSApple OSS Distributionsvm_set_max_addr_helper: vm_set_max_addr_helper.c
547*2c2f96dcSApple OSS Distributions	$(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_set_max_addr_helper.c -o $(SYMROOT)/vm_set_max_addr_helper; \
548*2c2f96dcSApple OSS Distributions	echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
549*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
550*2c2f96dcSApple OSS Distributions
551*2c2f96dcSApple OSS Distributionsinstall-vm_set_max_addr_helper: vm_set_max_addr_helper
552*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
553*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm_set_max_addr_helper $(INSTALLDIR)/
554*2c2f96dcSApple OSS Distributions
555*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += subsystem_root_path_helper_entitled
556*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += subsystem_root_path_helper
557*2c2f96dcSApple OSS Distributions
558*2c2f96dcSApple OSS Distributionssubsystem_root_path_helper_entitled: subsystem_root_path_helper.c subsystem_root_path-entitlements.plist
559*2c2f96dcSApple OSS Distributions	$(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper_entitled; \
560*2c2f96dcSApple OSS Distributions	echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
561*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements subsystem_root_path-entitlements.plist $(SYMROOT)/$@;
562*2c2f96dcSApple OSS Distributions
563*2c2f96dcSApple OSS Distributionsinstall-subsystem_root_path_helper_entitled: subsystem_root_path_helper_entitled
564*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
565*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/subsystem_root_path_helper_entitled $(INSTALLDIR)/
566*2c2f96dcSApple OSS Distributions
567*2c2f96dcSApple OSS Distributionssubsystem_root_path_helper: subsystem_root_path_helper.c
568*2c2f96dcSApple OSS Distributions	$(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper; \
569*2c2f96dcSApple OSS Distributions	echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
570*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
571*2c2f96dcSApple OSS Distributions
572*2c2f96dcSApple OSS Distributionsinstall-subsystem_root_path_helper: subsystem_root_path_helper
573*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
574*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/subsystem_root_path_helper $(INSTALLDIR)/
575*2c2f96dcSApple OSS Distributions
576*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += vm_test_code_signing_helper
577*2c2f96dcSApple OSS Distributions
578*2c2f96dcSApple OSS Distributionsvm_test_code_signing_helper: vm_test_code_signing_helper.c
579*2c2f96dcSApple OSS Distributions	$(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_test_code_signing_helper.c -o $(SYMROOT)/vm_test_code_signing_helper; \
580*2c2f96dcSApple OSS Distributions	echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
581*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
582*2c2f96dcSApple OSS Distributions
583*2c2f96dcSApple OSS Distributionsinstall-vm_test_code_signing_helper: vm_test_code_signing_helper
584*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
585*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm_test_code_signing_helper $(INSTALLDIR)/
586*2c2f96dcSApple OSS Distributions
587*2c2f96dcSApple OSS Distributionsvm_test_code_signing: OTHER_LDFLAGS += -ldarwintest_utils
588*2c2f96dcSApple OSS Distributions
589*2c2f96dcSApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += vm ipc rm workq
590*2c2f96dcSApple OSS Distributions
591*2c2f96dcSApple OSS Distributions# Revert to legacy vm_test suite until <rdar://problem/56675212> gets solved
592*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += vm/vm_allocation.c
593*2c2f96dcSApple OSS Distributions
594*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += jumbo_va_spaces_common.c
595*2c2f96dcSApple OSS Distributions
596*2c2f96dcSApple OSS Distributionsifeq ($(IOS_TEST_COMPAT),YES)
597*2c2f96dcSApple OSS DistributionsOTHER_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 vm/ios13extended_footprint vm/memorystatus_freeze_test vm/memorystatus_freeze_test_entitled vm/entitlement_internal_bands vm/entitlement_internal_bands_unentitled
598*2c2f96dcSApple OSS Distributions
599*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_28530648: CODE_SIGN_ENTITLEMENTS = jumbo_va_spaces_28530648.entitlements
600*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_28530648: OTHER_CFLAGS += -DENTITLED=1 -DTESTNAME=jumbo_va_spaces_28530648
601*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_28530648: jumbo_va_spaces_common.c
602*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_28530648: OTHER_LDFLAGS += -ldarwintest_utils
603*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_28530648: OTHER_LDFLAGS += -sectcreate __TEXT __info_plist jumbo_va_spaces_28530648-identifier.plist
604*2c2f96dcSApple OSS Distributions
605*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_52551256: CODE_SIGN_ENTITLEMENTS = jumbo_va_spaces_52551256.entitlements
606*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_52551256: OTHER_CFLAGS += -DENTITLED=1 -DTESTNAME=jumbo_va_spaces_52551256
607*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_52551256: OTHER_LDFLAGS += -ldarwintest_utils
608*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_52551256: jumbo_va_spaces_28530648.c jumbo_va_spaces_common.c
609*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
610*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
611*2c2f96dcSApple OSS Distributions
612*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_28530648_unentitled: OTHER_LDFLAGS += -ldarwintest_utils
613*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_28530648_unentitled: OTHER_CFLAGS += -DTESTNAME=jumbo_va_spaces_28530648_unentitled
614*2c2f96dcSApple OSS Distributions
615*2c2f96dcSApple OSS Distributionsjumbo_va_spaces_28530648_unentitled: jumbo_va_spaces_28530648.c jumbo_va_spaces_common.c
616*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
617*2c2f96dcSApple OSS Distributions
618*2c2f96dcSApple OSS Distributionsvm/entitlement_increased_memory_limit: CODE_SIGN_ENTITLEMENTS = vm/entitlement_increased_memory_limit.entitlements
619*2c2f96dcSApple OSS Distributionsvm/entitlement_increased_memory_limit: OTHER_CFLAGS += -DENTITLED=1 jumbo_va_spaces_common.c
620*2c2f96dcSApple OSS Distributionsvm/entitlement_increased_memory_limit: OTHER_LDFLAGS += -ldarwintest_utils memorystatus_assertion_helpers.c
621*2c2f96dcSApple OSS Distributionsvm/entitlement_increased_memory_limit: vm/entitlement_increased_memory_limit.c
622*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
623*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
624*2c2f96dcSApple OSS Distributions
625*2c2f96dcSApple OSS Distributionsvm/entitlement_increased_memory_limit_unentitled: OTHER_LDFLAGS += -ldarwintest_utils memorystatus_assertion_helpers.c
626*2c2f96dcSApple OSS Distributionsvm/entitlement_increased_memory_limit_unentitled: vm/entitlement_increased_memory_limit.c jumbo_va_spaces_common.c
627*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
628*2c2f96dcSApple OSS Distributions
629*2c2f96dcSApple OSS Distributionsvm/entitlement_internal_bands: CODE_SIGN_ENTITLEMENTS = vm/entitlement_internal_bands.entitlements
630*2c2f96dcSApple OSS Distributionsvm/entitlement_internal_bands: OTHER_CFLAGS += -DENTITLED=1
631*2c2f96dcSApple OSS Distributionsvm/entitlement_internal_bands: OTHER_LDFLAGS += -ldarwintest_utils
632*2c2f96dcSApple OSS Distributionsvm/entitlement_internal_bands: vm/entitlement_internal_bands.c memorystatus_assertion_helpers.c
633*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
634*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
635*2c2f96dcSApple OSS Distributions
636*2c2f96dcSApple OSS Distributionsvm/entitlement_internal_bands_unentitled: OTHER_LDFLAGS += -ldarwintest_utils
637*2c2f96dcSApple OSS Distributionsvm/entitlement_internal_bands_unentitled: vm/entitlement_internal_bands.c memorystatus_assertion_helpers.c
638*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
639*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
640*2c2f96dcSApple OSS Distributions
641*2c2f96dcSApple OSS Distributionsvm/ios13extended_footprint: CODE_SIGN_ENTITLEMENTS = vm/ios13extended_footprint.entitlements
642*2c2f96dcSApple OSS Distributionsvm/ios13extended_footprint: vm/ios13extended_footprint.c
643*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
644*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
645*2c2f96dcSApple OSS Distributions
646*2c2f96dcSApple OSS Distributionsvm_phys_footprint_legacy: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface
647*2c2f96dcSApple OSS Distributionsvm_phys_footprint_legacy: OTHER_CFLAGS += -DLEGACY_FOOTPRINT_ENTITLED=1
648*2c2f96dcSApple OSS Distributionsvm_phys_footprint_legacy: CODE_SIGN_ENTITLEMENTS=./legacy_footprint.entitlement
649*2c2f96dcSApple OSS Distributionsvm_phys_footprint_legacy: vm_phys_footprint.c
650*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
651*2c2f96dcSApple OSS Distributions
652*2c2f96dcSApple OSS Distributionsendif
653*2c2f96dcSApple OSS Distributions
654*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += vm/hello
655*2c2f96dcSApple OSS Distributions
656*2c2f96dcSApple OSS Distributionsvm/hello: vm/hello.c
657*2c2f96dcSApple OSS Distributions	$(CC) $(LDFLAGS) $(CFLAGS) $< -o $(SYMROOT)/$@
658*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
659*2c2f96dcSApple OSS Distributions
660*2c2f96dcSApple OSS Distributions.PHONY: install-vm/hello
661*2c2f96dcSApple OSS Distributionsinstall-vm/hello: vm/hello
662*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/vm
663*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm/hello $(INSTALLDIR)/vm/
664*2c2f96dcSApple OSS Distributions
665*2c2f96dcSApple OSS Distributionsvm/vm_tainted_executable: vm/hello
666*2c2f96dcSApple OSS Distributions
667*2c2f96dcSApple OSS Distributionstask_info_28439149: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
668*2c2f96dcSApple OSS Distributions
669*2c2f96dcSApple OSS Distributionsipc_read_inspect: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
670*2c2f96dcSApple OSS Distributions
671*2c2f96dcSApple OSS Distributionsipc_thread_ports_race: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
672*2c2f96dcSApple OSS Distributionsipc_thread_ports_race: OTHER_LDFLAGS += -ldarwintest_utils
673*2c2f96dcSApple OSS Distributions
674*2c2f96dcSApple OSS Distributionsproc_info: recount/recount_test_utils.c
675*2c2f96dcSApple OSS Distributionsproc_info: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
676*2c2f96dcSApple OSS Distributionsproc_info: OTHER_LDFLAGS += -ldarwintest_utils
677*2c2f96dcSApple OSS Distributions
678*2c2f96dcSApple OSS Distributionsproc_info_list_kthreads: CODE_SIGN_ENTITLEMENTS = ./proc_info_list_kthreads.entitlements
679*2c2f96dcSApple OSS Distributions
680*2c2f96dcSApple OSS Distributionsproc_info_44873309: CODE_SIGN_ENTITLEMENTS = ./proc_info_44873309.entitlements
681*2c2f96dcSApple OSS Distributions
682*2c2f96dcSApple OSS Distributionsdisk_mount_conditioner: disk_mount_conditioner*
683*2c2f96dcSApple OSS Distributionsdisk_mount_conditioner: CODE_SIGN_ENTITLEMENTS=./disk_mount_conditioner-entitlements.plist
684*2c2f96dcSApple OSS Distributionsdisk_mount_conditioner: OTHER_LDFLAGS += -ldarwintest_utils
685*2c2f96dcSApple OSS Distributions
686*2c2f96dcSApple OSS Distributionsdisk_mount_conditioner: OTHER_TEST_TARGETS += disk_mount_conditioner_unentitled
687*2c2f96dcSApple OSS Distributionsdisk_mount_conditioner_unentitled: OTHER_CFLAGS += -DTEST_UNENTITLED
688*2c2f96dcSApple OSS Distributionsdisk_mount_conditioner_unentitled: OTHER_LDFLAGS += -ldarwintest_utils
689*2c2f96dcSApple OSS Distributionsdisk_mount_conditioner_unentitled: disk_mount_conditioner.c
690*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
691*2c2f96dcSApple OSS Distributions
692*2c2f96dcSApple OSS Distributionswork_interval_test: CODE_SIGN_ENTITLEMENTS = work_interval_test.entitlements
693*2c2f96dcSApple OSS Distributionswork_interval_test: OTHER_CFLAGS += -DENTITLED=1
694*2c2f96dcSApple OSS Distributions
695*2c2f96dcSApple OSS Distributionswork_interval_data_test: CODE_SIGN_ENTITLEMENTS = work_interval_test.entitlements
696*2c2f96dcSApple OSS Distributionswork_interval_data_test: OTHER_CFLAGS += -DENTITLED=1
697*2c2f96dcSApple OSS Distributionswork_interval_data_test: OTHER_LDFLAGS += -lpthread
698*2c2f96dcSApple OSS Distributions
699*2c2f96dcSApple OSS Distributionsgame_mode: CODE_SIGN_ENTITLEMENTS = game_mode.entitlements
700*2c2f96dcSApple OSS Distributions
701*2c2f96dcSApple OSS Distributionssettimeofday_29193041: OTHER_CFLAGS += drop_priv.c
702*2c2f96dcSApple OSS Distributions
703*2c2f96dcSApple OSS Distributionssettimeofday_29193041_entitled: CODE_SIGN_ENTITLEMENTS = settimeofday_29193041.entitlements
704*2c2f96dcSApple OSS Distributionssettimeofday_29193041_entitled: OTHER_CFLAGS += drop_priv.c
705*2c2f96dcSApple OSS Distributions
706*2c2f96dcSApple OSS Distributionsthread_group_set_32261625: ./stackshot-entitlements.plist
707*2c2f96dcSApple OSS Distributionsthread_group_set_32261625: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist
708*2c2f96dcSApple OSS Distributionsthread_group_set_32261625: OTHER_LDFLAGS = -framework ktrace
709*2c2f96dcSApple OSS Distributions
710*2c2f96dcSApple OSS Distributionstask_info: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
711*2c2f96dcSApple OSS Distributionstask_info: OTHER_CFLAGS += test_utils.c
712*2c2f96dcSApple OSS Distributionstask_info: OTHER_LDFLAGS += -ldarwintest_utils
713*2c2f96dcSApple OSS Distributions
714*2c2f96dcSApple OSS Distributionsextract_right_soft_fail: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
715*2c2f96dcSApple OSS Distributions
716*2c2f96dcSApple OSS Distributionsifneq ($(IOS_TEST_COMPAT),YES)
717*2c2f96dcSApple OSS Distributions	EXCLUDED_SOURCES += task_vm_info_decompressions.c
718*2c2f96dcSApple OSS Distributionsendif
719*2c2f96dcSApple OSS Distributions
720*2c2f96dcSApple OSS Distributionsifneq ($(PLATFORM),iPhoneOS)
721*2c2f96dcSApple OSS Distributions	EXCLUDED_SOURCES += vm/compression_sweep.c
722*2c2f96dcSApple OSS Distributionsendif
723*2c2f96dcSApple OSS Distributions
724*2c2f96dcSApple OSS Distributionsbpf_write: bpflib.c in_cksum.c net_test_lib.c
725*2c2f96dcSApple OSS Distributionsbpf_write: OTHER_LDFLAGS += -ldarwintest_utils
726*2c2f96dcSApple OSS Distributions
727*2c2f96dcSApple OSS Distributionsbpf_write_batch: bpflib.c in_cksum.c net_test_lib.c
728*2c2f96dcSApple OSS Distributionsbpf_write_batch: OTHER_LDFLAGS += -ldarwintest_utils
729*2c2f96dcSApple OSS Distributions
730*2c2f96dcSApple OSS Distributionsudp_bind_connect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
731*2c2f96dcSApple OSS Distributionstcp_bind_connect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
732*2c2f96dcSApple OSS Distributionstcp_send_implied_connect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
733*2c2f96dcSApple OSS Distributionssocket_bind_35243417: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
734*2c2f96dcSApple OSS Distributionssocket_bind_35685803: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
735*2c2f96dcSApple OSS Distributionsicmp_fragmetned_payload: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
736*2c2f96dcSApple OSS Distributionstcp_invalid_address: OTHER_CFLAGS += -Wno-int-conversion
737*2c2f96dcSApple OSS Distributionstcp_invalid_address: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
738*2c2f96dcSApple OSS Distributions
739*2c2f96dcSApple OSS Distributionsnet_tuntests: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
740*2c2f96dcSApple OSS Distributions
741*2c2f96dcSApple OSS Distributionsnet_bridge: inet_transfer.c bpflib.c in_cksum.c net_test_lib.c
742*2c2f96dcSApple OSS Distributionsnet_bridge: OTHER_LDFLAGS += -ldarwintest_utils
743*2c2f96dcSApple OSS Distributionsnet_bridge: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
744*2c2f96dcSApple OSS Distributions
745*2c2f96dcSApple OSS Distributionsif_generation_id: net_test_lib.c in_cksum.c
746*2c2f96dcSApple OSS Distributionsif_generation_id: OTHER_LDFLAGS += -ldarwintest_utils
747*2c2f96dcSApple OSS Distributions
748*2c2f96dcSApple OSS Distributionsinet6_addr_mode: net_test_lib.c in_cksum.c
749*2c2f96dcSApple OSS Distributionsinet6_addr_mode: OTHER_LDFLAGS += -ldarwintest_utils
750*2c2f96dcSApple OSS Distributions
751*2c2f96dcSApple OSS Distributionsbpf_direction: bpflib.c
752*2c2f96dcSApple OSS Distributionsbpf_direction: OTHER_LDFLAGS += -ldarwintest_utils
753*2c2f96dcSApple OSS Distributionsbpf_direction: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
754*2c2f96dcSApple OSS Distributions
755*2c2f96dcSApple OSS Distributionsipv6_bind_race: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist
756*2c2f96dcSApple OSS Distributions
757*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += posix_spawn_archpref_helper
758*2c2f96dcSApple OSS Distributions
759*2c2f96dcSApple OSS Distributionsposix_spawn_archpref_helper: posix_spawn_archpref_helper.c
760*2c2f96dcSApple OSS Distributions	$(CC) $(LDFLAGS) $(CFLAGS) posix_spawn_archpref_helper.c -o $(SYMROOT)/$@;
761*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
762*2c2f96dcSApple OSS Distributions
763*2c2f96dcSApple OSS Distributionsinstall-posix_spawn_archpref_helper: posix_spawn_archpref_helper
764*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
765*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/posix_spawn_archpref_helper $(INSTALLDIR)/
766*2c2f96dcSApple OSS Distributions
767*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += posix_spawn_alt_rosetta_helper
768*2c2f96dcSApple OSS Distributions
769*2c2f96dcSApple OSS Distributionsposix_spawn_alt_rosetta_helper: posix_spawn_alt_rosetta_helper.c
770*2c2f96dcSApple OSS Distributions	$(CC) $(LDFLAGS) $(CFLAGS) posix_spawn_alt_rosetta_helper.c -o $(SYMROOT)/$@;
771*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
772*2c2f96dcSApple OSS Distributions
773*2c2f96dcSApple OSS Distributionsinstall-posix_spawn_alt_rosetta_helper: posix_spawn_alt_rosetta_helper
774*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
775*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/posix_spawn_alt_rosetta_helper $(INSTALLDIR)/
776*2c2f96dcSApple OSS Distributions
777*2c2f96dcSApple OSS DistributionsMIG:=SDKROOT=$(SDKROOT) $(shell xcrun -sdk "$(TARGETSDK)" -find mig)
778*2c2f96dcSApple OSS Distributions
779*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += excserver
780*2c2f96dcSApple OSS Distributions
781*2c2f96dcSApple OSS Distributionsexcserver:
782*2c2f96dcSApple OSS Distributions	$(MIG) $(CFLAGS) \
783*2c2f96dcSApple OSS Distributions		-sheader $(OBJROOT)/excserver.h \
784*2c2f96dcSApple OSS Distributions		-server $(OBJROOT)/excserver.c \
785*2c2f96dcSApple OSS Distributions		-header /dev/null -user /dev/null \
786*2c2f96dcSApple OSS Distributions		excserver.defs
787*2c2f96dcSApple OSS Distributionsinstall-excserver: ;
788*2c2f96dcSApple OSS Distributions
789*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += excserver_protect
790*2c2f96dcSApple OSS Distributions
791*2c2f96dcSApple OSS Distributionsexcserver_protect:
792*2c2f96dcSApple OSS Distributions	$(MIG) $(CFLAGS) \
793*2c2f96dcSApple OSS Distributions		-DMACH_EXC_SERVER_TASKIDTOKEN \
794*2c2f96dcSApple OSS Distributions		-sheader $(OBJROOT)/excserver_protect.h \
795*2c2f96dcSApple OSS Distributions		-server $(OBJROOT)/excserver_protect.c \
796*2c2f96dcSApple OSS Distributions		-header /dev/null -user /dev/null \
797*2c2f96dcSApple OSS Distributions		excserver_protect.defs
798*2c2f96dcSApple OSS Distributionsinstall-excserver_protect: ;
799*2c2f96dcSApple OSS Distributions
800*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += exc_helpers.c
801*2c2f96dcSApple OSS Distributions
802*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += notifyserver
803*2c2f96dcSApple OSS Distributions
804*2c2f96dcSApple OSS Distributionsnotifyserver:
805*2c2f96dcSApple OSS Distributions	$(MIG) $(CFLAGS) \
806*2c2f96dcSApple OSS Distributions		-DMACH_NOTIFY_SERVICE_PORT_DESTROYED_EXPECTED \
807*2c2f96dcSApple OSS Distributions		-user /dev/null \
808*2c2f96dcSApple OSS Distributions		-header $(OBJROOT)/notify.h \
809*2c2f96dcSApple OSS Distributions		-sheader $(OBJROOT)/notifyServer.h \
810*2c2f96dcSApple OSS Distributions		-server $(OBJROOT)/notifyServer.c \
811*2c2f96dcSApple OSS Distributions		notifyserver.defs
812*2c2f96dcSApple OSS Distributionsinstall-notifyserver: ;
813*2c2f96dcSApple OSS Distributions
814*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += rnserver
815*2c2f96dcSApple OSS Distributions
816*2c2f96dcSApple OSS Distributionsrnserver:
817*2c2f96dcSApple OSS Distributions	$(MIG) $(CFLAGS) \
818*2c2f96dcSApple OSS Distributions		-user /dev/null \
819*2c2f96dcSApple OSS Distributions		-header $(OBJROOT)/rn.h \
820*2c2f96dcSApple OSS Distributions		-sheader $(OBJROOT)/rnServer.h \
821*2c2f96dcSApple OSS Distributions		-server $(OBJROOT)/rnServer.c \
822*2c2f96dcSApple OSS Distributions		rnserver.defs
823*2c2f96dcSApple OSS Distributionsinstall-rnserver: ;
824*2c2f96dcSApple OSS Distributions
825*2c2f96dcSApple OSS Distributions
826*2c2f96dcSApple OSS Distributionsx18_entitled: OTHER_CFLAGS += -Wno-language-extension-token
827*2c2f96dcSApple OSS Distributionsx18_entitled: CODE_SIGN_ENTITLEMENTS = x18-entitlements.plist
828*2c2f96dcSApple OSS Distributionsx18_unentitled: OTHER_CFLAGS += -Wno-language-extension-token
829*2c2f96dcSApple OSS Distributionsifneq ($(PLATFORM),MacOSX)
830*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += x18_legacy.c
831*2c2f96dcSApple OSS Distributionselse
832*2c2f96dcSApple OSS Distributionsx18_legacy: OTHER_CFLAGS += -Wno-language-extension-token -Wl,-platform_version -Wl,macos -Wl,10.12 -Wl,10.12
833*2c2f96dcSApple OSS Distributionsendif
834*2c2f96dcSApple OSS Distributions
835*2c2f96dcSApple OSS Distributionspmap_bench: INVALID_ARCHS = $(filter-out arm%,$(ARCH_CONFIGS))
836*2c2f96dcSApple OSS Distributions
837*2c2f96dcSApple OSS Distributionspmap_stress: INVALID_ARCHS = $(filter-out arm%,$(ARCH_CONFIGS))
838*2c2f96dcSApple OSS Distributions
839*2c2f96dcSApple OSS Distributionshw_breakpoint_step_arm64: CODE_SIGN_ENTITLEMENTS = hw_breakpoint_step_arm64_entitlements.plist
840*2c2f96dcSApple OSS Distributionshw_breakpoint_step_arm64: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS))
841*2c2f96dcSApple OSS Distributionshw_breakpoint_step_arm64: excserver
842*2c2f96dcSApple OSS Distributionshw_breakpoint_step_arm64: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
843*2c2f96dcSApple OSS Distributions
844*2c2f96dcSApple OSS Distributionsexc_resource_threads: excserver
845*2c2f96dcSApple OSS Distributionsexc_resource_threads: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
846*2c2f96dcSApple OSS Distributionsexc_resource_threads: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
847*2c2f96dcSApple OSS Distributions
848*2c2f96dcSApple OSS Distributionsmach_service_port: notifyserver
849*2c2f96dcSApple OSS Distributionsmach_service_port: OTHER_CFLAGS += $(OBJROOT)/notifyServer.c -I $(OBJROOT)
850*2c2f96dcSApple OSS Distributions
851*2c2f96dcSApple OSS Distributionsfp_exception: excserver exc_helpers.c
852*2c2f96dcSApple OSS Distributionsfp_exception: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
853*2c2f96dcSApple OSS Distributionsfp_exception: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
854*2c2f96dcSApple OSS Distributions
855*2c2f96dcSApple OSS Distributionsptrauth_failure: excserver exc_helpers.c
856*2c2f96dcSApple OSS Distributionsptrauth_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) -Wno-language-extension-token
857*2c2f96dcSApple OSS Distributionsptrauth_failure: CODESIGN = $(CODESIGN_HARDENED_RUNTIME)
858*2c2f96dcSApple OSS Distributionsptrauth_failure: CODE_SIGN_ENTITLEMENTS = set_state_and_exception_port.entitlement
859*2c2f96dcSApple OSS Distributions
860*2c2f96dcSApple OSS Distributionsdecompression_failure: excserver exc_helpers.c
861*2c2f96dcSApple OSS Distributionsdecompression_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
862*2c2f96dcSApple OSS Distributionsdecompression_failure: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
863*2c2f96dcSApple OSS Distributions
864*2c2f96dcSApple OSS Distributionsipc/kernel_signed_pac_thread_state: excserver
865*2c2f96dcSApple OSS Distributionsipc/kernel_signed_pac_thread_state: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
866*2c2f96dcSApple OSS Distributionsipc/kernel_signed_pac_thread_state: CODE_SIGN_ENTITLEMENTS = pac_exception_entitlement.plist
867*2c2f96dcSApple OSS Distributions
868*2c2f96dcSApple OSS Distributionsifeq ($(findstring arm64e,$(ARCH_CONFIGS)),)
869*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += pac_exception_entitlement.c
870*2c2f96dcSApple OSS Distributionselse
871*2c2f96dcSApple OSS Distributionspac_exception_entitlement: excserver exc_helpers.c
872*2c2f96dcSApple OSS Distributionspac_exception_entitlement: OTHER_CFLAGS += $(OBJROOT)/excserver.c -Wno-language-extension-token
873*2c2f96dcSApple OSS Distributionspac_exception_entitlement: CODE_SIGN_ENTITLEMENTS = pac_exception_entitlement.plist
874*2c2f96dcSApple OSS Distributionsendif
875*2c2f96dcSApple OSS Distributions
876*2c2f96dcSApple OSS Distributionsifeq ($(findstring arm64,$(ARCH_CONFIGS)),)
877*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += arm_cpu_capabilities.c
878*2c2f96dcSApple OSS Distributionselse
879*2c2f96dcSApple OSS Distributionsarm_cpu_capabilities: INVALID_ARCHS = armv7k x86_64 x86_64h
880*2c2f96dcSApple OSS Distributionsarm_cpu_capabilities: excserver exc_helpers.c
881*2c2f96dcSApple OSS Distributionsarm_cpu_capabilities: OTHER_CFLAGS += $(OBJROOT)/excserver.c -Wno-language-extension-token -mcpu=apple-a15
882*2c2f96dcSApple OSS Distributionsarm_cpu_capabilities: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
883*2c2f96dcSApple OSS Distributionsendif
884*2c2f96dcSApple OSS Distributions
885*2c2f96dcSApple OSS Distributions# Disabling building of ldt files as dt_extractmeta crashes
886*2c2f96dcSApple OSS Distributions# in build systems. Ref rdar://110251082
887*2c2f96dcSApple OSS Distributions# Leaving commented bits for future re-enablement
888*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += ldt_code32.s ldt.c
889*2c2f96dcSApple OSS Distributions
890*2c2f96dcSApple OSS Distributions#\ifeq ($(findstring x86_64,$(ARCH_CONFIGS)),)
891*2c2f96dcSApple OSS Distributions#EXCLUDED_SOURCES += ldt_code32.s ldt.c
892*2c2f96dcSApple OSS Distributions#\else # target = osx
893*2c2f96dcSApple OSS Distributions#$(OBJROOT)/ldt_mach_exc_server.c:
894*2c2f96dcSApple OSS Distributions#	$(MIG) $(CFLAGS) \
895*2c2f96dcSApple OSS Distributions#		-user /dev/null \
896*2c2f96dcSApple OSS Distributions#		-server $(OBJROOT)/ldt_mach_exc_server.c \
897*2c2f96dcSApple OSS Distributions#		-header $(OBJROOT)/ldt_mach_exc.h \
898*2c2f96dcSApple OSS Distributions#		mach_exc.defs
899*2c2f96dcSApple OSS Distributions#
900*2c2f96dcSApple OSS Distributions#ldt: INVALID_ARCHS = $(ARCH_CONFIGS)
901*2c2f96dcSApple OSS Distributions#ldt: $(OBJROOT)/ldt_mach_exc_server.c
902*2c2f96dcSApple OSS Distributions#ldt: OTHER_CFLAGS += -arch x86_64 -I $(OBJROOT) $(SRCROOT)/ldt_code32.s -Wl,-pagezero_size,0x1000 -Wno-missing-variable-declarations
903*2c2f96dcSApple OSS Distributions#ldt: CODE_SIGN_ENTITLEMENTS=ldt_entitlement.plist
904*2c2f96dcSApple OSS Distributions#\endif
905*2c2f96dcSApple OSS Distributions
906*2c2f96dcSApple OSS Distributionsifneq ($(PLATFORM),BridgeOS)
907*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += remote_time.c
908*2c2f96dcSApple OSS Distributionselse
909*2c2f96dcSApple OSS Distributionsremote_time: INVALID_ARCHS = armv7 armv7s arm64_32
910*2c2f96dcSApple OSS Distributionsendif
911*2c2f96dcSApple OSS Distributions
912*2c2f96dcSApple OSS Distributionsvm_phys_footprint: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface
913*2c2f96dcSApple OSS Distributions
914*2c2f96dcSApple OSS Distributionsvm_kern_count_wired_kernelcache: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders/mach
915*2c2f96dcSApple OSS Distributions
916*2c2f96dcSApple OSS Distributionsdebug_control_port_for_pid: CODE_SIGN_ENTITLEMENTS = ./debug_control_port_for_pid_entitlement.plist
917*2c2f96dcSApple OSS Distributions
918*2c2f96dcSApple OSS Distributionsprng: OTHER_LDFLAGS += -ldarwintest_utils
919*2c2f96dcSApple OSS Distributions
920*2c2f96dcSApple OSS Distributionspreoslog: OTHER_LDFLAGS += -ldarwintest_utils
921*2c2f96dcSApple OSS Distributionspreoslog: OTHER_CFLAGS += test_utils.c
922*2c2f96dcSApple OSS Distributions
923*2c2f96dcSApple OSS Distributionstask_policy: CODE_SIGN_ENTITLEMENTS = ./task_policy_entitlement.plist
924*2c2f96dcSApple OSS Distributions
925*2c2f96dcSApple OSS DistributionsOTHER_TEST_TARGETS += task_policy_unentitled
926*2c2f96dcSApple OSS Distributionstask_policy_unentitled: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
927*2c2f96dcSApple OSS Distributionstask_policy_unentitled: OTHER_CFLAGS += -DUNENTITLED
928*2c2f96dcSApple OSS Distributionstask_policy_unentitled: task_policy.c
929*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
930*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@
931*2c2f96dcSApple OSS Distributions
932*2c2f96dcSApple OSS Distributions
933*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += get_shared_cache_address.c
934*2c2f96dcSApple OSS Distributions
935*2c2f96dcSApple OSS Distributions
936*2c2f96dcSApple OSS Distributionsifneq ($(filter iPhoneOS MacOSX, $(PLATFORM)),)
937*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += get_shared_cache_address
938*2c2f96dcSApple OSS Distributions
939*2c2f96dcSApple OSS Distributionsget_shared_cache_address: INVALID_ARCHS = arm64 i386 x86_64
940*2c2f96dcSApple OSS Distributionsget_shared_cache_address: get_shared_cache_address.c
941*2c2f96dcSApple OSS Distributions	$(CC) $(OTHER_CFLAGS) $(CFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/get_shared_cache_address
942*2c2f96dcSApple OSS Distributions
943*2c2f96dcSApple OSS Distributionsinstall-get_shared_cache_address: get_shared_cache_address
944*2c2f96dcSApple OSS Distributions	$(CODESIGN) --force --sign - --timestamp=none --identifier=com.apple.get_shared_cache_address $(SYMROOT)/get_shared_cache_address
945*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
946*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/get_shared_cache_address $(INSTALLDIR)/
947*2c2f96dcSApple OSS Distributionsendif
948*2c2f96dcSApple OSS Distributions
949*2c2f96dcSApple OSS Distributions
950*2c2f96dcSApple OSS DistributionsOTHER_TEST_TARGETS += vm_memory_share_tests
951*2c2f96dcSApple OSS Distributions
952*2c2f96dcSApple OSS Distributionsvm_memory_share_tests: INVALID_ARCHS = i386
953*2c2f96dcSApple OSS Distributionsvm_memory_share_tests: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
954*2c2f96dcSApple OSS Distributionsvm_memory_share_tests: vm_memory_tests_src/main.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c
955*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
956*2c2f96dcSApple OSS Distributions	echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
957*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@;
958*2c2f96dcSApple OSS Distributions
959*2c2f96dcSApple OSS Distributions# build the mach server as individual helper which does not use libdarwintest
960*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += vm_memory_share_tests_server
961*2c2f96dcSApple OSS Distributionsvm_memory_share_tests_server: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
962*2c2f96dcSApple OSS Distributionsvm_memory_share_tests_server: vm_memory_tests_src/server.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c
963*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/vm_memory_share_tests_server
964*2c2f96dcSApple OSS Distributions	echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
965*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@;
966*2c2f96dcSApple OSS Distributions
967*2c2f96dcSApple OSS Distributionsinstall-vm_memory_share_tests_server: vm_memory_share_tests_server
968*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
969*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm_memory_share_tests_server $(INSTALLDIR)/
970*2c2f96dcSApple OSS Distributions
971*2c2f96dcSApple OSS Distributionsifeq ($(PLATFORM),MacOSX)
972*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += vm/kern_max_task_pmem.c
973*2c2f96dcSApple OSS Distributionsendif
974*2c2f96dcSApple OSS Distributions
975*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += benchmark/helpers.c
976*2c2f96dcSApple OSS Distributions
977*2c2f96dcSApple OSS Distributionsperf_vmfault: OTHER_CFLAGS += benchmark/helpers.c
978*2c2f96dcSApple OSS Distributions
979*2c2f96dcSApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/fault_throughput.plist
980*2c2f96dcSApple OSS Distributions
981*2c2f96dcSApple OSS Distributionsvm/fault_throughput: OTHER_CFLAGS += benchmark/helpers.c
982*2c2f96dcSApple OSS Distributions
983*2c2f96dcSApple OSS Distributions.PHONY: install-vm/fault_throughput
984*2c2f96dcSApple OSS Distributionsinstall-vm/fault_throughput: vm/fault_throughput
985*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/vm
986*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm/fault_throughput $(INSTALLDIR)/vm/
987*2c2f96dcSApple OSS Distributions
988*2c2f96dcSApple OSS Distributions$(SYMROOT)/vm/fault_throughput.lua: $(SRCROOT)/vm/fault_throughput.lua
989*2c2f96dcSApple OSS Distributions	mkdir -p $(SYMROOT)/vm
990*2c2f96dcSApple OSS Distributions	cp $< $@
991*2c2f96dcSApple OSS Distributions	chmod +x $@
992*2c2f96dcSApple OSS Distributions
993*2c2f96dcSApple OSS Distributions.PHONY: install-fault_throughput_benchrun
994*2c2f96dcSApple OSS Distributionsinstall-$(SYMROOT)/vm/fault_throughput.lua: $(SYMROOT)/vm/fault_throughput.lua
995*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/vm
996*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm/fault_throughput.lua $(INSTALLDIR)/vm/
997*2c2f96dcSApple OSS Distributions	chmod +x $(INSTALLDIR)/vm/fault_throughput.lua
998*2c2f96dcSApple OSS Distributions
999*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += vm/fault_throughput.plist
1000*2c2f96dcSApple OSS Distributions
1001*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/vm/fault_throughput.lua vm/fault_throughput
1002*2c2f96dcSApple OSS Distributions
1003*2c2f96dcSApple OSS Distributionsifeq ($(PLATFORM),MacOSX)
1004*2c2f96dcSApple OSS Distributionsmixed_pagesize: vm/mixed_pagesize.c
1005*2c2f96dcSApple OSS Distributions	mkdir -p $(SYMROOT)/vm
1006*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/vm/$@
1007*2c2f96dcSApple OSS Distributions
1008*2c2f96dcSApple OSS Distributionsinstall-mixed_pagesize: mixed_pagesize
1009*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/vm
1010*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm/mixed_pagesize $(INSTALLDIR)/vm/
1011*2c2f96dcSApple OSS Distributions
1012*2c2f96dcSApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/mixed_pagesize.plist
1013*2c2f96dcSApple OSS Distributions
1014*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += vm/mixed_pagesize.c vm/mixed_pagesize.plist
1015*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += mixed_pagesize
1016*2c2f96dcSApple OSS Distributionselse
1017*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += vm/mixed_pagesize.c vm/mixed_pagesize.plist
1018*2c2f96dcSApple OSS Distributionsendif
1019*2c2f96dcSApple OSS Distributions
1020*2c2f96dcSApple OSS Distributionsmanual_wq_cooperative: manual_wq_cooperative.c
1021*2c2f96dcSApple OSS Distributions	mkdir -p $(SYMROOT)
1022*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
1023*2c2f96dcSApple OSS Distributions
1024*2c2f96dcSApple OSS Distributionsinstall-manual_wq_cooperative: manual_wq_cooperative
1025*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
1026*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/manual_wq_cooperative $(INSTALLDIR)
1027*2c2f96dcSApple OSS Distributions
1028*2c2f96dcSApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/workqueue.plist
1029*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += manual_wq_cooperative.c workqueue.plist
1030*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += manual_wq_cooperative
1031*2c2f96dcSApple OSS Distributions
1032*2c2f96dcSApple OSS Distributions# VM madvise(2) benchmark
1033*2c2f96dcSApple OSS Distributions
1034*2c2f96dcSApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/perf_madvise.plist
1035*2c2f96dcSApple OSS Distributions
1036*2c2f96dcSApple OSS Distributionsvm/perf_madvise: OTHER_CFLAGS += benchmark/helpers.c
1037*2c2f96dcSApple OSS Distributions
1038*2c2f96dcSApple OSS Distributions.PHONY: install-vm/perf_madvise
1039*2c2f96dcSApple OSS Distributionsinstall-vm/perf_madvise: vm/perf_madvise
1040*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/vm
1041*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm/perf_madvise $(INSTALLDIR)/vm/
1042*2c2f96dcSApple OSS Distributions
1043*2c2f96dcSApple OSS Distributions$(SYMROOT)/vm/perf_madvise.lua: $(SRCROOT)/vm/perf_madvise.lua
1044*2c2f96dcSApple OSS Distributions	mkdir -p $(SYMROOT)/vm
1045*2c2f96dcSApple OSS Distributions	cp $< $@
1046*2c2f96dcSApple OSS Distributions	chmod +x $@
1047*2c2f96dcSApple OSS Distributions
1048*2c2f96dcSApple OSS Distributions.PHONY: install-perf_madvise_benchrun
1049*2c2f96dcSApple OSS Distributionsinstall-$(SYMROOT)/vm/perf_madvise.lua: $(SYMROOT)/vm/perf_madvise.lua
1050*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/vm
1051*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm/perf_madvise.lua $(INSTALLDIR)/vm
1052*2c2f96dcSApple OSS Distributions	chmod +x $(INSTALLDIR)/vm/perf_madvise.lua
1053*2c2f96dcSApple OSS Distributions
1054*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/vm/perf_madvise.lua vm/perf_madvise
1055*2c2f96dcSApple OSS Distributions
1056*2c2f96dcSApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/perf_compressor.plist
1057*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += vm/perf_compressor.plist
1058*2c2f96dcSApple OSS Distributions
1059*2c2f96dcSApple OSS Distributionsvm/perf_compressor: OTHER_CFLAGS += benchmark/helpers.c
1060*2c2f96dcSApple OSS Distributions
1061*2c2f96dcSApple OSS Distributions.PHONY: install-vm/perf_compressor
1062*2c2f96dcSApple OSS Distributionsinstall-vm/perf_compressor: vm/perf_compressor
1063*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/vm
1064*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm/perf_compressor $(INSTALLDIR)/vm/
1065*2c2f96dcSApple OSS Distributions
1066*2c2f96dcSApple OSS Distributions$(SYMROOT)/vm/perf_compressor.lua: $(SRCROOT)/vm/perf_compressor.lua
1067*2c2f96dcSApple OSS Distributions	mkdir -p $(SYMROOT)/vm
1068*2c2f96dcSApple OSS Distributions	cp $< $@
1069*2c2f96dcSApple OSS Distributions	chmod +x $@
1070*2c2f96dcSApple OSS Distributions
1071*2c2f96dcSApple OSS Distributions.PHONY: install-$(SYMROOT)/vm/perf_compressor_benchrun
1072*2c2f96dcSApple OSS Distributionsinstall-$(SYMROOT)/vm/perf_compressor.lua: $(SYMROOT)/vm/perf_compressor.lua
1073*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/vm
1074*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/vm/perf_compressor.lua $(INSTALLDIR)/vm/
1075*2c2f96dcSApple OSS Distributions	chmod +x $(INSTALLDIR)/vm/perf_compressor.lua
1076*2c2f96dcSApple OSS Distributions
1077*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/vm/perf_compressor.lua vm/perf_compressor
1078*2c2f96dcSApple OSS Distributions
1079*2c2f96dcSApple OSS Distributionsioconnectasyncmethod_57641955: OTHER_LDFLAGS += -framework IOKit
1080*2c2f96dcSApple OSS Distributions
1081*2c2f96dcSApple OSS Distributionsifeq ($(PLATFORM),BridgeOS)
1082*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += ipsec.m
1083*2c2f96dcSApple OSS Distributionselse
1084*2c2f96dcSApple OSS Distributionsipsec: OTHER_LDFLAGS += -framework Foundation -framework CoreFoundation -framework NetworkExtension
1085*2c2f96dcSApple OSS Distributionsipsec: CODE_SIGN_ENTITLEMENTS = ipsec.entitlements
1086*2c2f96dcSApple OSS Distributionsendif
1087*2c2f96dcSApple OSS Distributions
1088*2c2f96dcSApple OSS Distributionstest_sysctl_kern_procargs_25397314: OTHER_LDFLAGS += -framework Foundation -ldarwintest_utils
1089*2c2f96dcSApple OSS Distributions
1090*2c2f96dcSApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += counter
1091*2c2f96dcSApple OSS Distributions
1092*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += counter/common.c
1093*2c2f96dcSApple OSS Distributionscounter/counter: OTHER_CFLAGS += counter/common.c test_utils.c
1094*2c2f96dcSApple OSS Distributionscounter/counter: OTHER_LDFLAGS += -ldarwintest_utils -ldarwintest
1095*2c2f96dcSApple OSS Distributions
1096*2c2f96dcSApple OSS Distributionscounter/benchmark: OTHER_CFLAGS += counter/common.c benchmark/helpers.c
1097*2c2f96dcSApple OSS Distributions
1098*2c2f96dcSApple OSS Distributions.PHONY: install-counter/benchmark
1099*2c2f96dcSApple OSS Distributionsinstall-counter/benchmark: counter/benchmark
1100*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/counter
1101*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/counter/benchmark $(INSTALLDIR)/counter/
1102*2c2f96dcSApple OSS Distributions
1103*2c2f96dcSApple OSS Distributions$(SYMROOT)/counter/benchmark.lua: $(SRCROOT)/counter/benchmark.lua
1104*2c2f96dcSApple OSS Distributions	mkdir -p $(SYMROOT)/counter
1105*2c2f96dcSApple OSS Distributions	cp $< $@
1106*2c2f96dcSApple OSS Distributions	chmod +x $@
1107*2c2f96dcSApple OSS Distributions
1108*2c2f96dcSApple OSS Distributions.PHONY: install-counter_benchrun
1109*2c2f96dcSApple OSS Distributionsinstall-$(SYMROOT)/counter/benchmark.lua: $(SYMROOT)/counter/benchmark.lua
1110*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/counter
1111*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/counter/benchmark.lua $(INSTALLDIR)/counter/
1112*2c2f96dcSApple OSS Distributions	chmod +x $(INSTALLDIR)/counter/benchmark.lua
1113*2c2f96dcSApple OSS Distributions
1114*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/counter/benchmark.lua counter/benchmark
1115*2c2f96dcSApple OSS Distributions
1116*2c2f96dcSApple OSS Distributionsifneq ($(PLATFORM),MacOSX)
1117*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += vm/page_size_globals.c
1118*2c2f96dcSApple OSS Distributionselse
1119*2c2f96dcSApple OSS Distributionsvm/page_size_globals: INVALID_ARCHS = arm64 arm64e
1120*2c2f96dcSApple OSS Distributionsendif
1121*2c2f96dcSApple OSS Distributions
1122*2c2f96dcSApple OSS Distributions# Same helper used in execperf, different build system.
1123*2c2f96dcSApple OSS Distributionsstatic_binary: ../tools/tests/execperf/exit-asm.S
1124*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(CFLAGS) $(filter-out -l%,$(DT_LDFLAGS) $(LDFLAGS) $(OTHER_LDFLAGS)) $< -o $(SYMROOT)/static_binary -static -nostartfiles -nodefaultlibs -Wl,-version_load_command -Wl,-segalign,0x4000 -e _main
1125*2c2f96dcSApple OSS Distributions	CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/static_binary
1126*2c2f96dcSApple OSS Distributions
1127*2c2f96dcSApple OSS Distributionsinstall-static_binary: static_binary
1128*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
1129*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/static_binary $(INSTALLDIR)
1130*2c2f96dcSApple OSS Distributions
1131*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += static_binary
1132*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += static_binary.c
1133*2c2f96dcSApple OSS Distributions
1134*2c2f96dcSApple OSS Distributionstest_static_binary_csflags: static_binary
1135*2c2f96dcSApple OSS Distributionstest_static_binary_csflags: OTHER_LDFLAGS += -ldarwintest_utils
1136*2c2f96dcSApple OSS Distributions
1137*2c2f96dcSApple OSS Distributions
1138*2c2f96dcSApple OSS Distributionslibmalloc_apple_array: CODE_SIGN_ENTITLEMENTS = entitlements/libmalloc_apple_array.entitlements
1139*2c2f96dcSApple OSS Distributionslibmalloc_apple_array: OTHER_CFLAGS += -DENTITLED=1 drop_priv.c test_utils.c
1140*2c2f96dcSApple OSS Distributionslibmalloc_apple_array: OTHER_LDFLAGS += -ldarwintest_utils
1141*2c2f96dcSApple OSS Distributionslibmalloc_apple_array: libmalloc_apple_array.c print_apple_array print_apple_array_HR1 print_apple_array_HR2
1142*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
1143*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
1144*2c2f96dcSApple OSS Distributions
1145*2c2f96dcSApple OSS Distributionslibmalloc_apple_array_unentitled: OTHER_CFLAGS += drop_priv.c test_utils.c
1146*2c2f96dcSApple OSS Distributionslibmalloc_apple_array_unentitled: OTHER_LDFLAGS += -ldarwintest_utils
1147*2c2f96dcSApple OSS Distributionslibmalloc_apple_array_unentitled: libmalloc_apple_array.c print_apple_array print_apple_array_HR1 print_apple_array_HR2
1148*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $(OTHER_CFLAGS) $< -o $(SYMROOT)/$@
1149*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
1150*2c2f96dcSApple OSS Distributions
1151*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += print_apple_array
1152*2c2f96dcSApple OSS Distributionsprint_apple_array: print_apple_array.c
1153*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
1154*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
1155*2c2f96dcSApple OSS Distributions
1156*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_HR1
1157*2c2f96dcSApple OSS Distributionsprint_apple_array_HR1: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-binary-entitlements-1.plist
1158*2c2f96dcSApple OSS Distributionsprint_apple_array_HR1: print_apple_array.c
1159*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
1160*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@;
1161*2c2f96dcSApple OSS Distributions
1162*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_HR2
1163*2c2f96dcSApple OSS Distributionsprint_apple_array_HR2: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-binary-entitlements-2.plist
1164*2c2f96dcSApple OSS Distributionsprint_apple_array_HR2: print_apple_array.c
1165*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
1166*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@;
1167*2c2f96dcSApple OSS Distributions
1168*2c2f96dcSApple OSS Distributions
1169*2c2f96dcSApple OSS Distributionsinstall-print_apple_array: print_apple_array
1170*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/tools
1171*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/print_apple_array $(INSTALLDIR)/tools/
1172*2c2f96dcSApple OSS Distributions
1173*2c2f96dcSApple OSS Distributionsinstall-print_apple_array_HR1: print_apple_array_HR1
1174*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/tools
1175*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/print_apple_array_HR1 $(INSTALLDIR)/tools/
1176*2c2f96dcSApple OSS Distributions
1177*2c2f96dcSApple OSS Distributionsinstall-print_apple_array_HR2: print_apple_array_HR2
1178*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)/tools
1179*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/print_apple_array_HR2 $(INSTALLDIR)/tools/
1180*2c2f96dcSApple OSS Distributions
1181*2c2f96dcSApple OSS Distributionspersona: CODE_SIGN_ENTITLEMENTS = persona.entitlements
1182*2c2f96dcSApple OSS Distributionspersona_adoption: CODE_SIGN_ENTITLEMENTS = persona_adoption.entitlements
1183*2c2f96dcSApple OSS Distributions
1184*2c2f96dcSApple OSS DistributionsOTHER_TEST_TARGETS += libmalloc_apple_array libmalloc_apple_array_unentitled
1185*2c2f96dcSApple OSS Distributions
1186*2c2f96dcSApple OSS Distributionsentropy: OTHER_CFLAGS += -framework perfdata
1187*2c2f96dcSApple OSS Distributions
1188*2c2f96dcSApple OSS Distributionszero_to_n_tests: OTHER_LDFLAGS += -ldarwintest_utils -framework perfdata
1189*2c2f96dcSApple OSS Distributions
1190*2c2f96dcSApple OSS Distributionsdebug_enable_syscall_rejection: OTHER_LDFLAGS += -ldarwintest_utils
1191*2c2f96dcSApple OSS Distributions
1192*2c2f96dcSApple OSS Distributionssched_thread_group_fairness: CODE_SIGN_ENTITLEMENTS = sched_thread_group_fairness.entitlements
1193*2c2f96dcSApple OSS Distributionssched_thread_group_fairness: sched_thread_group_fairness_workload_config.h
1194*2c2f96dcSApple OSS Distributionssched_thread_group_fairness: OTHER_LDFLAGS += -framework perfdata
1195*2c2f96dcSApple OSS Distributionssched_thread_group_fairness: OTHER_CFLAGS += -DENTITLED=1
1196*2c2f96dcSApple OSS Distributionssched_thread_group_fairness_workload_config.h: sched_thread_group_fairness_workload_config.plist
1197*2c2f96dcSApple OSS Distributions	xxd -i $< > $@
1198*2c2f96dcSApple OSS Distributions
1199*2c2f96dcSApple OSS Distributionssched_yield_aggressor: OTHER_LDFLAGS += -ldarwintest_utils -framework perfdata
1200*2c2f96dcSApple OSS Distributionssched_yield_aggressor: OTHER_CFLAGS += -Wno-atomic-implicit-seq-cst
1201*2c2f96dcSApple OSS Distributions
1202*2c2f96dcSApple OSS Distributionssched_all_cores_running: OTHER_LDFLAGS += -ldarwintest_utils
1203*2c2f96dcSApple OSS Distributions
1204*2c2f96dcSApple OSS Distributionssched_overloaded_runqueue: CODE_SIGN_ENTITLEMENTS = sched_overloaded_runqueue.entitlements
1205*2c2f96dcSApple OSS Distributionssched_overloaded_runqueue: OTHER_CFLAGS += -DENTITLED=1
1206*2c2f96dcSApple OSS Distributionssched_overloaded_runqueue: OTHER_LDFLAGS += -framework ktrace -ldarwintest_utils
1207*2c2f96dcSApple OSS Distributions
1208*2c2f96dcSApple OSS Distributionsthread_set_state_arm64_cpsr: CODE_SIGN_ENTITLEMENTS = thread_set_state.entitlement
1209*2c2f96dcSApple OSS Distributions
1210*2c2f96dcSApple OSS Distributionsvm/app_swap: OTHER_LDFLAGS += -ldarwintest_utils
1211*2c2f96dcSApple OSS Distributions
1212*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += debug_syscall_rejection_helper
1213*2c2f96dcSApple OSS Distributionsdebug_syscall_rejection_helper: debug_syscall_rejection_helper.c
1214*2c2f96dcSApple OSS Distributions	$(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@; \
1215*2c2f96dcSApple OSS Distributions	echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \
1216*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
1217*2c2f96dcSApple OSS Distributions
1218*2c2f96dcSApple OSS Distributions
1219*2c2f96dcSApple OSS Distributionsinstall-debug_syscall_rejection_helper: debug_syscall_rejection_helper
1220*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
1221*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/debug_syscall_rejection_helper $(INSTALLDIR)/
1222*2c2f96dcSApple OSS Distributions
1223*2c2f96dcSApple OSS Distributionsfile_leases: OTHER_CFLAGS += test_utils.c
1224*2c2f96dcSApple OSS Distributionsfile_leases: OTHER_LDFLAGS += -ldarwintest_utils
1225*2c2f96dcSApple OSS Distributionsfile_leases: CODE_SIGN_ENTITLEMENTS = file_leases.entitlements
1226*2c2f96dcSApple OSS Distributions
1227*2c2f96dcSApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += vfs
1228*2c2f96dcSApple OSS Distributionsvfs/freeable_vnodes: OTHER_LDFLAGS += -ldarwintest_utils
1229*2c2f96dcSApple OSS Distributions
1230*2c2f96dcSApple OSS Distributionsvm/vm_reclaim: OTHER_CFLAGS += -Wno-language-extension-token -Wno-c++98-compat memorystatus_assertion_helpers.c
1231*2c2f96dcSApple OSS Distributionsvm/vm_reclaim: OTHER_LDFLAGS += -ldarwintest_utils
1232*2c2f96dcSApple OSS Distributions
1233*2c2f96dcSApple OSS Distributionsvm/vm_reclaim: INVALID_ARCHS = armv7k arm64_32
1234*2c2f96dcSApple OSS Distributions
1235*2c2f96dcSApple OSS DistributionsDIAG_MEM_THRESHOLD_UTILS = vm/diag_threshold_test.c
1236*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += $(DIAG_MEM_THRESHOLD_UTILS)
1237*2c2f96dcSApple OSS Distributions
1238*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test: $(DIAG_MEM_THRESHOLD_UTILS) excserver
1239*2c2f96dcSApple OSS Distributions
1240*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_double_limit: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1241*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_double_limit: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1242*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_double_limit: OTHER_CFLAGS += -l darwintest_utils
1243*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_double_limit: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1244*2c2f96dcSApple OSS Distributions
1245*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_simple: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1246*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_simple: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1247*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_simple: OTHER_CFLAGS += -l darwintest_utils
1248*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_simple: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1249*2c2f96dcSApple OSS Distributions
1250*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_enable_disable_threshold: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1251*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_enable_disable_threshold: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1252*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_enable_disable_threshold: OTHER_CFLAGS += -l darwintest_utils
1253*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_enable_disable_threshold: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1254*2c2f96dcSApple OSS Distributions
1255*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_no_limit_cross: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1256*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_no_limit_cross: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1257*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_no_limit_cross: OTHER_CFLAGS += -l darwintest_utils
1258*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_no_limit_cross: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1259*2c2f96dcSApple OSS Distributions
1260*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_no_retrigger: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1261*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_no_retrigger: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1262*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_no_retrigger: OTHER_CFLAGS += -l darwintest_utils
1263*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_no_retrigger: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1264*2c2f96dcSApple OSS Distributions
1265*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_with_low_watermark: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1266*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_with_low_watermark: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1267*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_with_low_watermark: OTHER_CFLAGS += -l darwintest_utils
1268*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_with_low_watermark: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1269*2c2f96dcSApple OSS Distributions
1270*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_with_high_watermark: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1271*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_with_high_watermark: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1272*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_with_high_watermark: OTHER_CFLAGS += -l darwintest_utils
1273*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_with_high_watermark: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1274*2c2f96dcSApple OSS Distributions
1275*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_watermark_and_threshold_same: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1276*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_watermark_and_threshold_same: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1277*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_watermark_and_threshold_same: OTHER_CFLAGS += -l darwintest_utils
1278*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_watermark_and_threshold_same: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1279*2c2f96dcSApple OSS Distributions
1280*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_limit_and_threshold_same: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1281*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_limit_and_threshold_same: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1282*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_limit_and_threshold_same: OTHER_CFLAGS += -l darwintest_utils
1283*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_limit_and_threshold_same: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1284*2c2f96dcSApple OSS Distributions
1285*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_logging: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1286*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_logging: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1287*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_logging: OTHER_CFLAGS += -l darwintest_utils
1288*2c2f96dcSApple OSS Distributions
1289*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_large_limit: $(DIAG_MEM_THRESHOLD_UTILS)  excserver
1290*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_large_limit: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT)
1291*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_large_limit: OTHER_CFLAGS += -l darwintest_utils
1292*2c2f96dcSApple OSS Distributionsvm/diag_threshold_test_large_limit: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1293*2c2f96dcSApple OSS Distributions
1294*2c2f96dcSApple OSS DistributionsEXCLUDED_SOURCES += constrained_ctypes_tests.c
1295*2c2f96dcSApple OSS DistributionsCUSTOM_TARGETS += constrained_ctypes_tests_enabled constrained_ctypes_tests_enacted constrained_ctypes_tests_disabled
1296*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_enabled: OTHER_CFLAGS += -D__CCT_TEST_ENABLED
1297*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_enabled: OTHER_LDFLAGS += -ldarwintest_utils
1298*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_enabled: constrained_ctypes_tests.c
1299*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) constrained_ctypes_tests.c -o $(SYMROOT)/constrained_ctypes_tests_enabled
1300*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/constrained_ctypes_tests_enabled;
1301*2c2f96dcSApple OSS Distributions
1302*2c2f96dcSApple OSS Distributionsinstall-constrained_ctypes_tests_enabled: constrained_ctypes_tests_enabled
1303*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
1304*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/constrained_ctypes_tests_enabled $(INSTALLDIR)/
1305*2c2f96dcSApple OSS Distributions
1306*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_CFLAGS += -D__CCT_TEST_ENABLED
1307*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_CFLAGS += -D__CCT_TEST_ENACTED
1308*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_CFLAGS += -fbounds-attributes
1309*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_LDFLAGS += -ldarwintest_utils
1310*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_enacted: constrained_ctypes_tests.c
1311*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) constrained_ctypes_tests.c -o $(SYMROOT)/constrained_ctypes_tests_enacted
1312*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/constrained_ctypes_tests_enacted;
1313*2c2f96dcSApple OSS Distributions
1314*2c2f96dcSApple OSS Distributionsinstall-constrained_ctypes_tests_enacted: constrained_ctypes_tests_enacted
1315*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
1316*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/constrained_ctypes_tests_enacted $(INSTALLDIR)/
1317*2c2f96dcSApple OSS Distributions
1318*2c2f96dcSApple OSS Distributions
1319*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_disabled: OTHER_LDFLAGS += -ldarwintest_utils
1320*2c2f96dcSApple OSS Distributionsconstrained_ctypes_tests_disabled: constrained_ctypes_tests.c
1321*2c2f96dcSApple OSS Distributions	$(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) constrained_ctypes_tests.c -o $(SYMROOT)/constrained_ctypes_tests_disabled
1322*2c2f96dcSApple OSS Distributions	env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/constrained_ctypes_tests_disabled;
1323*2c2f96dcSApple OSS Distributions
1324*2c2f96dcSApple OSS Distributionsinstall-constrained_ctypes_tests_disabled: constrained_ctypes_tests_disabled
1325*2c2f96dcSApple OSS Distributions	mkdir -p $(INSTALLDIR)
1326*2c2f96dcSApple OSS Distributions	cp $(SYMROOT)/constrained_ctypes_tests_disabled $(INSTALLDIR)/
1327*2c2f96dcSApple OSS Distributions
1328*2c2f96dcSApple OSS Distributionstask_suspend_stats: OTHER_LDFLAGS += -ldarwintest_utils
1329*2c2f96dcSApple OSS Distributionstask_suspend_stats: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
1330*2c2f96dcSApple OSS Distributions
1331*2c2f96dcSApple OSS Distributions# os_atomic use throws this warning
1332*2c2f96dcSApple OSS Distributionssetitimer: OTHER_CFLAGS += -Wno-c++98-compat
1333*2c2f96dcSApple OSS Distributions
1334*2c2f96dcSApple OSS Distributions
1335*2c2f96dcSApple OSS Distributionsinclude $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets
1336*2c2f96dcSApple OSS Distributions
1337*2c2f96dcSApple OSS Distributionsexception_ports_info: CODE_SIGN_ENTITLEMENTS = set_exception_port.entitlement
1338