1*f6217f89SApple OSS DistributionsPROJECT := xnu/darwintests 2*f6217f89SApple OSS Distributions 3*f6217f89SApple OSS Distributionsinclude disabled.mk 4*f6217f89SApple OSS Distributions 5*f6217f89SApple OSS Distributions# When building as part of xnu_tests, we get passed a DSTROOT that's got the 6*f6217f89SApple OSS Distributions# unit test path in it already. But, BASEDSTROOT doesn't, so use that instead. 7*f6217f89SApple OSS Distributionsifdef BASEDSTROOT 8*f6217f89SApple OSS Distributionsoverride DSTROOT = $(BASEDSTROOT) 9*f6217f89SApple OSS Distributionsendif 10*f6217f89SApple OSS Distributions 11*f6217f89SApple OSS DistributionsINVALID_ARCHS = i386 $(filter armv7%,$(ARCH_CONFIGS)) 12*f6217f89SApple OSS DistributionsENABLE_LTE_TESTS=YES 13*f6217f89SApple OSS Distributions 14*f6217f89SApple OSS DistributionsOTHER_LTE_INCLUDE_FILES += \ 15*f6217f89SApple OSS Distributions /System/Library/PrivateFrameworks/LoggingSupport.framework, \ 16*f6217f89SApple OSS Distributions /System/Library/PrivateFrameworks/MobileKeyBag.framework, \ 17*f6217f89SApple OSS Distributions /System/Library/Frameworks/IOSurface.framework, \ 18*f6217f89SApple OSS Distributions /usr/local/lib/libdarwintest_utils.dylib, \ 19*f6217f89SApple OSS Distributions /usr/lib/libapple_crypto.dylib, 20*f6217f89SApple OSS Distributions 21*f6217f89SApple OSS DistributionsENV = /usr/bin/env 22*f6217f89SApple OSS Distributions 23*f6217f89SApple OSS DistributionsDEVELOPER_DIR ?= $(shell xcode-select -p) 24*f6217f89SApple OSS Distributions 25*f6217f89SApple OSS Distributions 26*f6217f89SApple OSS Distributionsifeq ($(origin TIGHTBEAM_MODULE_DIR),undefined) 27*f6217f89SApple OSS Distributions export TIGHTBEAM_MODULE_DIR := $(shell /usr/bin/xcrun --show-sdk-path -sdk $(SDKROOT))/usr/local/lib/kernel/tightbeam 28*f6217f89SApple OSS Distributionsendif 29*f6217f89SApple OSS Distributions 30*f6217f89SApple OSS DistributionsUSE_WERROR := 1 31*f6217f89SApple OSS Distributionsifneq ($(BUILD_WERROR),) 32*f6217f89SApple OSS DistributionsUSE_WERROR := $(BUILD_WERROR) 33*f6217f89SApple OSS Distributionsendif 34*f6217f89SApple OSS Distributions 35*f6217f89SApple OSS Distributionsifeq ($(USE_WERROR),1) 36*f6217f89SApple OSS DistributionsWERROR := -Werror 37*f6217f89SApple OSS Distributionsendif 38*f6217f89SApple OSS Distributions 39*f6217f89SApple OSS Distributions# the xnu build system will only ever call us with the default target 40*f6217f89SApple OSS Distributions.DEFAULT_GOAL := install 41*f6217f89SApple OSS Distributions 42*f6217f89SApple OSS Distributionsinclude $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common 43*f6217f89SApple OSS Distributions 44*f6217f89SApple OSS DistributionsOTHER_CFLAGS = -Wall 45*f6217f89SApple OSS DistributionsOTHER_CFLAGS += -Wno-deprecated-declarations 46*f6217f89SApple OSS DistributionsOTHER_CFLAGS += -Werror=excess-initializers 47*f6217f89SApple OSS DistributionsOTHER_CFLAGS += -Wno-c2x-extensions 48*f6217f89SApple OSS DistributionsOTHER_CFLAGS += -Werror=excess-initializers 49*f6217f89SApple OSS DistributionsOTHER_CFLAGS += --std=gnu17 -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders 50*f6217f89SApple OSS DistributionsOTHER_CFLAGS += -UT_NAMESPACE_PREFIX -DT_NAMESPACE_PREFIX=xnu -DT_LEAKS_DISABLE=1 51*f6217f89SApple OSS DistributionsOTHER_CFLAGS += -F $(SDKROOT)/System/Library/PrivateFrameworks 52*f6217f89SApple OSS Distributions 53*f6217f89SApple OSS Distributionsipc/%: OTHER_CFLAGS += -Wno-format-pedantic $(WERROR) 54*f6217f89SApple OSS Distributions 55*f6217f89SApple OSS Distributions 56*f6217f89SApple OSS DistributionsCODESIGN:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign) 57*f6217f89SApple OSS DistributionsCODESIGN_HARDENED_RUNTIME:=$(CODESIGN) -o runtime 58*f6217f89SApple OSS DistributionsCODESIGN_ALLOCATE:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign_allocate) 59*f6217f89SApple OSS Distributions 60*f6217f89SApple OSS DistributionsLIPO:=$(shell xcrun -sdk "$(TARGETSDK)" -find lipo) 61*f6217f89SApple OSS Distributions 62*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),iPhoneOS) 63*f6217f89SApple OSS Distributions IOS_TEST_COMPAT = YES 64*f6217f89SApple OSS Distributionselse 65*f6217f89SApple OSS Distributions IOS_TEST_COMPAT = NO 66*f6217f89SApple OSS Distributionsendif 67*f6217f89SApple OSS Distributions 68*f6217f89SApple OSS Distributions# Generate tightbeam header for ExclavesCHelloServer from tbmodule in the SDK 69*f6217f89SApple OSS Distributionsifneq ($(wildcard $(SDKROOT)/System/Library/PrivateFrameworks/Tightbeam.framework/Headers/tightbeam.h),) 70*f6217f89SApple OSS DistributionsTIGHTBEAM_MODULES := \ 71*f6217f89SApple OSS Distributions ExclavesCHelloServer.tbmodule 72*f6217f89SApple OSS Distributions 73*f6217f89SApple OSS DistributionsTIGHTBEAM_MODULE_HEADERS := $(patsubst %.tbmodule,%.tightbeam.h,$(TIGHTBEAM_MODULES)) 74*f6217f89SApple OSS DistributionsTIGHTBEAM_MODULE_IMPL := $(patsubst %.tbmodule,%.tightbeam.c,$(TIGHTBEAM_MODULES)) 75*f6217f89SApple OSS Distributions 76*f6217f89SApple OSS Distributions# This makes sure to not include any tbmodules which don't exist in the SDK and 77*f6217f89SApple OSS Distributions# expand the modules listed above to their full path in the SDK. The modules 78*f6217f89SApple OSS Distributions# should only be needed when actually building with CONFIG_EXCLAVES 79*f6217f89SApple OSS Distributions# (which can't easily be checked here). 80*f6217f89SApple OSS DistributionsTIGHTBEAM_MODULES := $(patsubst %.tbmodule,$(TIGHTBEAM_MODULE_DIR)/%.tbmodule,$(TIGHTBEAM_MODULES)) 81*f6217f89SApple OSS DistributionsTIGHTBEAM_MODULES := $(wildcard $(TIGHTBEAM_MODULES)) 82*f6217f89SApple OSS DistributionsTIGHTBEAM_MODULE_IMPL_PATH := $(addprefix $(OBJROOT)/, $(TIGHTBEAM_MODULE_IMPL)) 83*f6217f89SApple OSS Distributions 84*f6217f89SApple OSS Distributions$(TIGHTBEAM_MODULE_IMPL) : \ 85*f6217f89SApple OSS Distributions %.tightbeam.c : $(TIGHTBEAM_MODULES) 86*f6217f89SApple OSS Distributions $(TIGHTBEAMC) build generate-c --output-base $(OBJROOT)/$*.tightbeam.c --codegen-version 2 $< 87*f6217f89SApple OSS Distributions 88*f6217f89SApple OSS Distributions$(TIGHTBEAM_MODULE_HEADERS) : $(TIGHTBEAM_MODULE_IMPL) 89*f6217f89SApple OSS Distributionsendif 90*f6217f89SApple OSS Distributions 91*f6217f89SApple OSS Distributions# Subsystems 92*f6217f89SApple OSS Distributions 93*f6217f89SApple OSS Distributionsinclude ktrace/Makefile 94*f6217f89SApple OSS Distributions 95*f6217f89SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += recount 96*f6217f89SApple OSS Distributionsinclude recount/Makefile 97*f6217f89SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += cpu_counters 98*f6217f89SApple OSS Distributionsinclude cpu_counters/Makefile 99*f6217f89SApple OSS Distributions 100*f6217f89SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += sched 101*f6217f89SApple OSS Distributionsinclude sched/Makefile 102*f6217f89SApple OSS Distributions 103*f6217f89SApple OSS Distributions# Miscellaneous Tests 104*f6217f89SApple OSS Distributions 105*f6217f89SApple OSS Distributionsmach_eventlink: OTHER_LDFLAGS += $(SCHED_UTILS_FLAGS) 106*f6217f89SApple OSS Distributionsmach_eventlink: $(SCHED_UTILS) 107*f6217f89SApple OSS Distributions 108*f6217f89SApple OSS Distributionssignal_exit_reason: CODE_SIGN_ENTITLEMENTS = signal_exit_reason.entitlements 109*f6217f89SApple OSS Distributions 110*f6217f89SApple OSS Distributionsatm_diagnostic_flag: OTHER_CFLAGS += drop_priv.c 111*f6217f89SApple OSS Distributions 112*f6217f89SApple OSS Distributionsatm_diagnostic_flag_entitled: CODE_SIGN_ENTITLEMENTS = atm_diagnostic_flag.entitlements 113*f6217f89SApple OSS Distributionsatm_diagnostic_flag_entitled: OTHER_CFLAGS += drop_priv.c 114*f6217f89SApple OSS Distributions 115*f6217f89SApple OSS Distributionsavx: INVALID_ARCHS = $(filter arm%,$(ARCH_CONFIGS)) 116*f6217f89SApple OSS Distributionsavx: OTHER_CFLAGS += -mavx512f -mavx512bw -mavx512vl 117*f6217f89SApple OSS Distributionsavx: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders 118*f6217f89SApple OSS Distributionsavx: CONFIG_FLAGS := $(filter-out -O%,$(CONFIG_FLAGS)) 119*f6217f89SApple OSS Distributions# Add -mno-implicit-float to prevent the compiler from touching SIMD regs 120*f6217f89SApple OSS Distributions# unexpectedly 121*f6217f89SApple OSS Distributionsavx: CONFIG_FLAGS += -mno-implicit-float 122*f6217f89SApple OSS Distributions# Disable vzeroupper insertion to work around rdar://problem/35035096 123*f6217f89SApple OSS Distributionsavx: CONFIG_FLAGS += -mllvm -x86-use-vzeroupper=0 124*f6217f89SApple OSS Distributionsifneq (osx,$(TARGET_NAME)) 125*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += avx.c 126*f6217f89SApple OSS Distributionsendif 127*f6217f89SApple OSS Distributions 128*f6217f89SApple OSS DistributionsCUSTOM_TARGETS = sr_entitlement_helper 129*f6217f89SApple OSS Distributions 130*f6217f89SApple OSS Distributionssr_entitlement_helper: sr_entitlement_helper.c 131*f6217f89SApple OSS Distributions mkdir -p $(SYMROOT) 132*f6217f89SApple OSS Distributions $(CC) -I $(OBJROOT) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) sr_entitlement_helper.c -o $(SYMROOT)/$@ 133*f6217f89SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@; \ 134*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@; 135*f6217f89SApple OSS Distributions 136*f6217f89SApple OSS Distributionsinstall-sr_entitlement_helper: sr_entitlement_helper 137*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 138*f6217f89SApple OSS Distributions cp $(SYMROOT)/sr_entitlement_helper $(INSTALLDIR) 139*f6217f89SApple OSS Distributions 140*f6217f89SApple OSS Distributionssr_entitlement: OTHER_LDFLAGS += -ldarwintest_utils 141*f6217f89SApple OSS Distributions 142*f6217f89SApple OSS Distributionsrestrict_jit: CODE_SIGN_ENTITLEMENTS = restrict_jit.entitlements 143*f6217f89SApple OSS Distributions 144*f6217f89SApple OSS Distributionsbacktracing_tests: OTHER_LDFLAGS += -framework CoreSymbolication 145*f6217f89SApple OSS Distributionsbacktracing_tests: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist 146*f6217f89SApple OSS Distributions 147*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += corpse_backtrace2 148*f6217f89SApple OSS Distributions 149*f6217f89SApple OSS Distributionscorpse_backtrace2: 150*f6217f89SApple OSS Distributions $(MIG) $(CFLAGS) \ 151*f6217f89SApple OSS Distributions -DMACH_EXC_SERVER_TASKIDTOKEN \ 152*f6217f89SApple OSS Distributions -DMACH_EXC_SERVER_BACKTRACE \ 153*f6217f89SApple OSS Distributions -sheader $(OBJROOT)/excserver_backtrace.h \ 154*f6217f89SApple OSS Distributions -server $(OBJROOT)/excserver_backtrace.c \ 155*f6217f89SApple OSS Distributions -header /dev/null -user /dev/null \ 156*f6217f89SApple OSS Distributions excserver_backtrace.defs 157*f6217f89SApple OSS Distributions 158*f6217f89SApple OSS Distributionsinstall-corpse_backtrace2: ; 159*f6217f89SApple OSS Distributions 160*f6217f89SApple OSS Distributionscorpse_backtrace: corpse_backtrace2 exc_helpers.c 161*f6217f89SApple OSS Distributionscorpse_backtrace: OTHER_CFLAGS += $(OBJROOT)/excserver_backtrace.c 162*f6217f89SApple OSS Distributionscorpse_backtrace: OTHER_CFLAGS += -I $(OBJROOT) 163*f6217f89SApple OSS Distributionscorpse_backtrace: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 164*f6217f89SApple OSS Distributions 165*f6217f89SApple OSS Distributions# Tests that use exc_guard_helper.h should add all of the build options used by exc_guard_helper_test: 166*f6217f89SApple OSS Distributions# - additional C files exc_guard_helper.c and exc_helpers.c and test_utils.c 167*f6217f89SApple OSS Distributions# - additional library darwintest_utils 168*f6217f89SApple OSS Distributions# - excserver MIG-generated file 169*f6217f89SApple OSS Distributions# - entitlement to allow thread_set_exception_ports() 170*f6217f89SApple OSS Distributionsexc_guard_helper_test: exc_guard_helper.c exc_helpers.c test_utils.c excserver 171*f6217f89SApple OSS Distributionsexc_guard_helper_test: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 172*f6217f89SApple OSS Distributionsexc_guard_helper_test: OTHER_LDFLAGS += -ldarwintest_utils 173*f6217f89SApple OSS Distributionsexc_guard_helper_test: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 174*f6217f89SApple OSS Distributions 175*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += exc_guard_helper.c 176*f6217f89SApple OSS Distributions 177*f6217f89SApple OSS Distributionsexc_guard_helper_test_unexpected: exc_guard_helper.c exc_helpers.c test_utils.c excserver 178*f6217f89SApple OSS Distributionsexc_guard_helper_test_unexpected: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 179*f6217f89SApple OSS Distributionsexc_guard_helper_test_unexpected: OTHER_LDFLAGS += -ldarwintest_utils 180*f6217f89SApple OSS Distributionsexc_guard_helper_test_unexpected: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 181*f6217f89SApple OSS Distributions 182*f6217f89SApple OSS Distributions# Tests that use try_read_write.h should add all of the build options used by try_read_write_test: 183*f6217f89SApple OSS Distributions# - additional C files try_read_write.c and exc_helpers.c 184*f6217f89SApple OSS Distributions# - excserver MIG-generated file 185*f6217f89SApple OSS Distributions# - entitlement to allow thread_set_exception_ports() 186*f6217f89SApple OSS Distributionstry_read_write_test: try_read_write.c exc_helpers.c excserver 187*f6217f89SApple OSS Distributionstry_read_write_test: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 188*f6217f89SApple OSS Distributionstry_read_write_test: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 189*f6217f89SApple OSS Distributions 190*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += try_read_write.c 191*f6217f89SApple OSS Distributions 192*f6217f89SApple OSS Distributionstry_read_write_test_unexpected: try_read_write.c exc_helpers.c excserver 193*f6217f89SApple OSS Distributionstry_read_write_test_unexpected: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 194*f6217f89SApple OSS Distributionstry_read_write_test_unexpected: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 195*f6217f89SApple OSS Distributions 196*f6217f89SApple OSS Distributionsvm/corpse_owned_vmobjects: excserver_protect_state 197*f6217f89SApple OSS Distributionsvm/corpse_owned_vmobjects: OTHER_CFLAGS += $(OBJROOT)/excserver_protect_state.c -I $(OBJROOT) 198*f6217f89SApple OSS Distributionsvm/corpse_owned_vmobjects: CODE_SIGN_ENTITLEMENTS += vm/corpse_owned_vmobjects.entitlements 199*f6217f89SApple OSS Distributions 200*f6217f89SApple OSS Distributionsvm_test_mach_map: try_read_write.c exc_helpers.c excserver 201*f6217f89SApple OSS Distributionsvm_test_mach_map: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 202*f6217f89SApple OSS Distributionsvm_test_mach_map: CODE_SIGN_ENTITLEMENTS = ./vm_test_mach_map.plist 203*f6217f89SApple OSS Distributions 204*f6217f89SApple OSS DistributionsOTHER_TEST_TARGETS += vm/vm_parameter_validation 205*f6217f89SApple OSS Distributions 206*f6217f89SApple OSS Distributions# vm_parameter_validation builds each arch as a separate build command 207*f6217f89SApple OSS Distributions# so we can pass architecture-specific linker flags. 208*f6217f89SApple OSS Distributions# and generate arch-specific MIG files. 209*f6217f89SApple OSS Distributions 210*f6217f89SApple OSS Distributions# libdarwintest.a doesn't have an arm64 slice on watchOS 211*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),WatchOS) 212*f6217f89SApple OSS DistributionsVM_PARAMETER_VALIDATION_INVALID_ARCHS = arm64 213*f6217f89SApple OSS Distributionsvm/vm_parameter_validation: INVALID_ARCHS += arm64 214*f6217f89SApple OSS Distributionsendif 215*f6217f89SApple OSS Distributions 216*f6217f89SApple OSS DistributionsVM_PARAMETER_VALIDATION_ARCHS = $(filter-out $(VM_PARAMETER_VALIDATION_INVALID_ARCHS),$(ARCH_CONFIGS)) 217*f6217f89SApple OSS Distributions 218*f6217f89SApple OSS Distributions# Some tests map-overwrite wildly at addresses near 0. 219*f6217f89SApple OSS Distributions# Use a large PAGEZERO so our executable and other data do not land there. 220*f6217f89SApple OSS Distributions# (This is 32-bit only. 64-bit uses 4GB PAGEZERO by default which is fine.) 221*f6217f89SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_i386 = -Xlinker -pagezero_size -Xlinker 0x1000000 222*f6217f89SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_armv7 = -Xlinker -pagezero_size -Xlinker 0x1000000 223*f6217f89SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_armv7s = -Xlinker -pagezero_size -Xlinker 0x1000000 224*f6217f89SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_armv7k = -Xlinker -pagezero_size -Xlinker 0x1000000 225*f6217f89SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_arm64_32 = -Xlinker -pagezero_size -Xlinker 0x1000000 226*f6217f89SApple OSS Distributions 227*f6217f89SApple OSS DistributionsVM_PARAMETER_VALIDATION_SLICES=$(addprefix $(SYMROOT)/vm/vm_parameter_validation_,$(VM_PARAMETER_VALIDATION_ARCHS)) 228*f6217f89SApple OSS Distributions 229*f6217f89SApple OSS Distributionsvm/vm_parameter_validation: assets $(VM_PARAMETER_VALIDATION_SLICES) 230*f6217f89SApple OSS Distributions $(LIPO) -create $(VM_PARAMETER_VALIDATION_SLICES) -output $(SYMROOT)/$@ 231*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 232*f6217f89SApple OSS Distributions 233*f6217f89SApple OSS Distributions$(SYMROOT)/vm/vm_parameter_validation_%: ../osfmk/tests/vm_parameter_validation.h \ 234*f6217f89SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_%_vm32_map_user.c \ 235*f6217f89SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_%_mach_vm_user.c \ 236*f6217f89SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_%_replacement_mach_host.c \ 237*f6217f89SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_%_replacement_host_priv.c \ 238*f6217f89SApple OSS Distributions vm/vm_parameter_validation.c 239*f6217f89SApple OSS Distributions mkdir -p $(SYMROOT)/vm 240*f6217f89SApple OSS Distributions $(CC) -I $(OBJROOT) \ 241*f6217f89SApple OSS Distributions $(DT_CFLAGS) $(OTHER_CFLAGS) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 242*f6217f89SApple OSS Distributions $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $(VM_PARAMETER_VALIDATION_LDFLAGS_$*) \ 243*f6217f89SApple OSS Distributions -DVM32_SUPPORT=1 -DKERNEL_VM_TEST=1 \ 244*f6217f89SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_$*_vm32_map_user.c \ 245*f6217f89SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_$*_mach_vm_user.c \ 246*f6217f89SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_$*_replacement_mach_host.c \ 247*f6217f89SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_$*_replacement_host_priv.c \ 248*f6217f89SApple OSS Distributions vm/vm_parameter_validation.c -o $@ 249*f6217f89SApple OSS Distributions 250*f6217f89SApple OSS Distributions# xnu/libsyscall/mach/mach_vm.c intercepts some VM calls from userspace, 251*f6217f89SApple OSS Distributions# sometimes doing something other than the expected MIG call. 252*f6217f89SApple OSS Distributions# And on 64-bit platforms libsystem has no interface to reach the 32-bit entrypoints. 253*f6217f89SApple OSS Distributions# We generate our own MIG userspace call sites to call the kernel entrypoints directly. 254*f6217f89SApple OSS Distributions$(OBJROOT)/vm_parameter_validation_%_vm32_map_user.c: ../osfmk/mach/vm32_map.defs 255*f6217f89SApple OSS Distributions $(MIG) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 256*f6217f89SApple OSS Distributions -I../osfmk -novouchers -DKERNEL_USER=1 -DKOBJECT_SERVER -DKERNEL_VM_TEST=1 \ 257*f6217f89SApple OSS Distributions -user $@ -header $(subst _$*_,_,$(@:.c=.h)) \ 258*f6217f89SApple OSS Distributions -server /dev/null -sheader /dev/null \ 259*f6217f89SApple OSS Distributions $< 260*f6217f89SApple OSS Distributions$(OBJROOT)/vm_parameter_validation_%_mach_vm_user.c: ../osfmk/mach/mach_vm.defs 261*f6217f89SApple OSS Distributions $(MIG) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 262*f6217f89SApple OSS Distributions -I../osfmk -novouchers -DKERNEL_USER=1 -DKOBJECT_SERVER -DKERNEL_VM_TEST=1 \ 263*f6217f89SApple OSS Distributions -user $@ -header $(subst _$*_,_,$(@:.c=.h)) \ 264*f6217f89SApple OSS Distributions -server /dev/null -sheader /dev/null \ 265*f6217f89SApple OSS Distributions $< 266*f6217f89SApple OSS Distributions# The declaration of mach_memory_object_memory_entry is buggy on U32. 267*f6217f89SApple OSS Distributions# We compile in our own MIG user stub for it with a "replacement_" prefix. 268*f6217f89SApple OSS Distributions# rdar://117927965 269*f6217f89SApple OSS Distributions$(OBJROOT)/vm_parameter_validation_%_replacement_mach_host.c: vm/vm_parameter_validation_replacement_mach_host.defs 270*f6217f89SApple OSS Distributions $(MIG) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 271*f6217f89SApple OSS Distributions -I../osfmk -novouchers -DKERNEL_USER=1 -DKOBJECT_SERVER -DKERNEL_VM_TEST=1 \ 272*f6217f89SApple OSS Distributions -user $@ -header $(subst _$*_,_,$(@:.c=.h)) \ 273*f6217f89SApple OSS Distributions -server /dev/null -sheader /dev/null \ 274*f6217f89SApple OSS Distributions $< 275*f6217f89SApple OSS Distributions# The declaration of vm_wire is buggy on U32. 276*f6217f89SApple OSS Distributions# We compile in our own MIG user stub for it with a "replacement_" prefix. 277*f6217f89SApple OSS Distributions# rdar://118258929 278*f6217f89SApple OSS Distributions$(OBJROOT)/vm_parameter_validation_%_replacement_host_priv.c: vm/vm_parameter_validation_replacement_host_priv.defs 279*f6217f89SApple OSS Distributions $(MIG) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 280*f6217f89SApple OSS Distributions -I../osfmk -novouchers -DKERNEL_USER=1 -DKOBJECT_SERVER -DKERNEL_VM_TEST=1 \ 281*f6217f89SApple OSS Distributions -user $@ -header $(subst _$*_,_,$(@:.c=.h)) \ 282*f6217f89SApple OSS Distributions -server /dev/null -sheader /dev/null \ 283*f6217f89SApple OSS Distributions $< 284*f6217f89SApple OSS Distributions 285*f6217f89SApple OSS Distributions 286*f6217f89SApple 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 287*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += ipc/hardened_exceptions_entitled_debugger ipc/hardened_exceptions_entitled 288*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += excserver_protect 289*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += excserver_protect_state 290*f6217f89SApple OSS Distributions 291*f6217f89SApple OSS Distributionsexception_tests: excserver_protect exc_helpers.c 292*f6217f89SApple OSS Distributionsexception_tests: CODE_SIGN_ENTITLEMENTS = exception_tests.entitlements 293*f6217f89SApple OSS Distributionsexception_tests: OTHER_CFLAGS += $(OBJROOT)/excserver_protect.c 294*f6217f89SApple OSS Distributionsexception_tests: OTHER_CFLAGS += -I $(OBJROOT) 295*f6217f89SApple OSS Distributionsexception_tests: OTHER_CFLAGS += -DENTITLED=1 296*f6217f89SApple OSS Distributions 297*f6217f89SApple OSS Distributionsipc/hardened_exceptions: excserver_protect_state exc_helpers.c 298*f6217f89SApple OSS Distributionsipc/hardened_exceptions: ipc/hardened_exceptions_entitled ipc/hardened_exceptions_entitled_debugger 299*f6217f89SApple OSS Distributionsipc/hardened_exceptions: OTHER_CFLAGS += $(OBJROOT)/excserver_protect_state.c -I $(OBJROOT) 300*f6217f89SApple OSS Distributions 301*f6217f89SApple OSS Distributionsipc/hardened_exceptions_entitled: excserver_protect_state 302*f6217f89SApple OSS Distributionsipc/hardened_exceptions_entitled: CODE_SIGN_ENTITLEMENTS = entitlements/only_one_exception_port.entitlement 303*f6217f89SApple OSS Distributionsipc/hardened_exceptions_entitled: OTHER_CFLAGS += -I $(OBJROOT) 304*f6217f89SApple OSS Distributionsipc/hardened_exceptions_entitled: exc_helpers.c ipc/hardened_exceptions.c 305*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(OTHER_CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 306*f6217f89SApple OSS Distributions $(filter-out $(CUSTOM_TARGETS), $^) -o $(SYMROOT)/$@ 307*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 308*f6217f89SApple OSS Distributions 309*f6217f89SApple OSS Distributionsipc/hardened_exceptions_entitled_debugger: excserver_protect_state 310*f6217f89SApple OSS Distributionsipc/hardened_exceptions_entitled_debugger: CODE_SIGN_ENTITLEMENTS = entitlements/only_one_exception_port_debugger.entitlement 311*f6217f89SApple OSS Distributionsipc/hardened_exceptions_entitled_debugger: OTHER_CFLAGS += -I $(OBJROOT) 312*f6217f89SApple OSS Distributionsipc/hardened_exceptions_entitled_debugger: exc_helpers.c ipc/hardened_exceptions.c 313*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(OTHER_CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 314*f6217f89SApple OSS Distributions $(filter-out $(CUSTOM_TARGETS), $^) -o $(SYMROOT)/$@ 315*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 316*f6217f89SApple OSS Distributions 317*f6217f89SApple OSS Distributionsinstall-ipc/hardened_exceptions_entitled_debugger: ipc/hardened_exceptions_entitled_debugger 318*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 319*f6217f89SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 320*f6217f89SApple OSS Distributions 321*f6217f89SApple OSS Distributionsinstall-ipc/hardened_exceptions_entitled: ipc/hardened_exceptions_entitled 322*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 323*f6217f89SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 324*f6217f89SApple OSS Distributions 325*f6217f89SApple OSS Distributionsinstall-reply_port_defense_client: reply_port_defense_client 326*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 327*f6217f89SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 328*f6217f89SApple OSS Distributions 329*f6217f89SApple OSS Distributionsimmovable_send: excserver 330*f6217f89SApple OSS Distributionsimmovable_send: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 331*f6217f89SApple OSS Distributionsimmovable_send: OTHER_LDFLAGS += -ldarwintest_utils -lpthread -framework IOKit 332*f6217f89SApple OSS Distributionsimmovable_send: immovable_send_client 333*f6217f89SApple OSS Distributionsimmovable_send: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 334*f6217f89SApple OSS Distributions 335*f6217f89SApple OSS Distributionslocks: OTHER_LDFLAGS += -ldarwintest_utils 336*f6217f89SApple OSS Distributions 337*f6217f89SApple OSS Distributionsimmovable_send_client: immovable_send_client.c 338*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) immovable_send_client.c -o $(SYMROOT)/immovable_send_client 339*f6217f89SApple OSS Distributions 340*f6217f89SApple OSS Distributionsinstall-immovable_send_client: immovable_send_client 341*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 342*f6217f89SApple OSS Distributions cp $(SYMROOT)/immovable_send_client $(INSTALLDIR)/ 343*f6217f89SApple OSS Distributions 344*f6217f89SApple OSS Distributionsipc/sys_perf_notify_test: excserver_protect_state 345*f6217f89SApple OSS Distributionsipc/sys_perf_notify_test: OTHER_CFLAGS += $(OBJROOT)/excserver_protect_state.c -I $(OBJROOT) 346*f6217f89SApple OSS Distributionsipc/sys_perf_notify_test: CODE_SIGN_ENTITLEMENTS=entitlements/sys_perf_notify_test.entitlements 347*f6217f89SApple OSS Distributions 348*f6217f89SApple OSS Distributionsipc/port_type_policy: CODE_SIGN_ENTITLEMENTS = entitlements/port_type_policy.entitlements 349*f6217f89SApple OSS Distributionsipc/port_type_policy: OTHER_CFLAGS += -I $(OBJROOT) 350*f6217f89SApple OSS Distributionsipc/port_type_policy: ipc/port_type_policy.c 351*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(OTHER_CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 352*f6217f89SApple OSS Distributions $(filter-out $(CUSTOM_TARGETS), $^) -o $(SYMROOT)/$@ 353*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 354*f6217f89SApple OSS Distributions 355*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += posix_sem_namespace_helper.c 356*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += posix_sem_namespace_helper_team0 posix_sem_namespace_helper_team1 357*f6217f89SApple OSS Distributionsposix_sem_namespace_helper_team0: posix_sem_namespace_helper.c 358*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 359*f6217f89SApple OSS Distributions $^ -o $(SYMROOT)/$@ 360*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none --team-identifier "PSXSEMT0" $(SYMROOT)/$@ 361*f6217f89SApple OSS Distributionsposix_sem_namespace_helper_team1: posix_sem_namespace_helper.c 362*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 363*f6217f89SApple OSS Distributions $^ -o $(SYMROOT)/$@ 364*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none --team-identifier "PSXSEMT1" $(SYMROOT)/$@ 365*f6217f89SApple OSS Distributions 366*f6217f89SApple OSS Distributionsinstall-posix_sem_namespace_helper_team0: posix_sem_namespace_helper_team0 367*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 368*f6217f89SApple OSS Distributions cp $(SYMROOT)/posix_sem_namespace_helper_team0 $(INSTALLDIR)/ 369*f6217f89SApple OSS Distributionsinstall-posix_sem_namespace_helper_team1: posix_sem_namespace_helper_team1 370*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 371*f6217f89SApple OSS Distributions cp $(SYMROOT)/posix_sem_namespace_helper_team1 $(INSTALLDIR)/ 372*f6217f89SApple OSS Distributions 373*f6217f89SApple OSS Distributionsposix_sem: posix_sem_namespace_helper_team0 posix_sem_namespace_helper_team1 374*f6217f89SApple OSS Distributionsposix_sem: OTHER_LDFLAGS += -ldarwintest_utils 375*f6217f89SApple OSS Distributions 376*f6217f89SApple OSS Distributions 377*f6217f89SApple OSS Distributionsposix_spawnattr_set_crash_behavior_np: posix_spawnattr_set_crash_behavior_np_child 378*f6217f89SApple OSS Distributionsposix_spawnattr_set_crash_behavior_np: CODE_SIGN_ENTITLEMENTS = posix_spawnattr_set_crash_behavior_np_entitlements.plist 379*f6217f89SApple OSS Distributions 380*f6217f89SApple OSS Distributionsposix_spawnattr_set_crash_behavior_np_child: posix_spawnattr_set_crash_behavior_np_child.c 381*f6217f89SApple 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 382*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 383*f6217f89SApple OSS Distributions 384*f6217f89SApple OSS Distributionsinstall-posix_spawnattr_set_crash_behavior_np_child: posix_spawnattr_set_crash_behavior_np_child 385*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 386*f6217f89SApple OSS Distributions cp $(SYMROOT)/posix_spawnattr_set_crash_behavior_np_child $(INSTALLDIR)/ 387*f6217f89SApple OSS Distributions 388*f6217f89SApple OSS Distributionsposix_spawnattr_set_launch_type_np: posix_spawnattr_set_launch_type_test 389*f6217f89SApple OSS Distributionsposix_spawnattr_set_launch_type_np: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders 390*f6217f89SApple OSS Distributions 391*f6217f89SApple OSS Distributionsposix_spawn_launch_type: CODE_SIGN_ENTITLEMENTS = posix_spawn_launch_type-entitlements.plist 392*f6217f89SApple OSS Distributions 393*f6217f89SApple OSS Distributionsport_exhaustion: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 394*f6217f89SApple OSS Distributionsport_exhaustion: port_exhaustion_client 395*f6217f89SApple OSS Distributions 396*f6217f89SApple OSS Distributionsport_exhaustion_client: port_exhaustion_client.c 397*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) port_exhaustion_client.c -o $(SYMROOT)/port_exhaustion_client 398*f6217f89SApple OSS Distributions 399*f6217f89SApple OSS Distributionsinstall-port_exhaustion_client: port_exhaustion_client 400*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 401*f6217f89SApple OSS Distributions cp $(SYMROOT)/port_exhaustion_client $(INSTALLDIR)/ 402*f6217f89SApple OSS Distributions 403*f6217f89SApple OSS Distributionsport_table_limits: rnserver 404*f6217f89SApple OSS Distributionsport_table_limits: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 405*f6217f89SApple OSS Distributionsport_table_limits: OTHER_CFLAGS += $(OBJROOT)/rnServer.c -I $(OBJROOT) 406*f6217f89SApple OSS Distributionsport_table_limits: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 407*f6217f89SApple OSS Distributionsport_table_limits: port_table_limits_client 408*f6217f89SApple OSS Distributions 409*f6217f89SApple OSS Distributionsport_table_limits_client: port_table_limits_client.c 410*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) port_table_limits_client.c -o $(SYMROOT)/port_table_limits_client 411*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 412*f6217f89SApple OSS Distributions 413*f6217f89SApple OSS Distributionsinstall-port_table_limits_client: port_table_limits_client 414*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 415*f6217f89SApple OSS Distributions cp $(SYMROOT)/port_table_limits_client $(INSTALLDIR)/ 416*f6217f89SApple OSS Distributions 417*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += kqwl_rnserver 418*f6217f89SApple OSS Distributions 419*f6217f89SApple OSS Distributionskqwl_rnserver: 420*f6217f89SApple OSS Distributions $(MIG) $(CFLAGS) \ 421*f6217f89SApple OSS Distributions -DKQWORKLOOPS_VIOLATION_SUPPORTED \ 422*f6217f89SApple OSS Distributions -user /dev/null \ 423*f6217f89SApple OSS Distributions -header $(OBJROOT)/kqwl_rn.h \ 424*f6217f89SApple OSS Distributions -sheader $(OBJROOT)/kqwl_rnServer.h \ 425*f6217f89SApple OSS Distributions -server $(OBJROOT)/kqwl_rnServer.c \ 426*f6217f89SApple OSS Distributions rnserver.defs 427*f6217f89SApple OSS Distributionsinstall-kqwl_rnserver: ; 428*f6217f89SApple OSS Distributions 429*f6217f89SApple OSS Distributionskqworkloop_limits: kqwl_rnserver 430*f6217f89SApple OSS Distributionskqworkloop_limits: OTHER_CFLAGS += $(OBJROOT)/kqwl_rnServer.c -I $(OBJROOT) 431*f6217f89SApple OSS Distributionskqworkloop_limits: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 432*f6217f89SApple OSS Distributionskqworkloop_limits: kqworkloop_limits_client 433*f6217f89SApple OSS Distributions 434*f6217f89SApple OSS Distributionskqworkloop_limits_client: kqworkloop_limits_client.c 435*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) kqworkloop_limits_client.c -o $(SYMROOT)/kqworkloop_limits_client 436*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 437*f6217f89SApple OSS Distributions 438*f6217f89SApple OSS Distributionsinstall-kqworkloop_limits_client: kqworkloop_limits_client 439*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 440*f6217f89SApple OSS Distributions cp $(SYMROOT)/kqworkloop_limits_client $(INSTALLDIR)/ 441*f6217f89SApple OSS Distributions 442*f6217f89SApple OSS Distributionsipc/task_name_for_pid: CODE_SIGN_ENTITLEMENTS = ipc/task_name_for_pid_entitlement.plist 443*f6217f89SApple OSS Distributions 444*f6217f89SApple OSS Distributionsipc/mach_msg_transport: CODE_SIGN_ENTITLEMENTS = entitlements/create_conn_port_with_port_array.entitlements 445*f6217f89SApple OSS Distributions 446*f6217f89SApple OSS Distributionsfd_table_limits: rnserver 447*f6217f89SApple OSS Distributionsfd_table_limits: OTHER_CFLAGS += $(OBJROOT)/rnServer.c -I $(OBJROOT) 448*f6217f89SApple OSS Distributionsfd_table_limits: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 449*f6217f89SApple OSS Distributionsfd_table_limits: fd_table_limits_client 450*f6217f89SApple OSS Distributions 451*f6217f89SApple OSS Distributionsfd_table_limits_client: fd_table_limits_client.c 452*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) fd_table_limits_client.c -o $(SYMROOT)/fd_table_limits_client 453*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 454*f6217f89SApple OSS Distributions 455*f6217f89SApple OSS Distributionsinstall-fd_table_limits_client: fd_table_limits_client 456*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 457*f6217f89SApple OSS Distributions cp $(SYMROOT)/fd_table_limits_client $(INSTALLDIR)/ 458*f6217f89SApple OSS Distributions 459*f6217f89SApple OSS Distributionsvm_spawn_tool: INVALID_ARCHS = i386 460*f6217f89SApple OSS Distributionsvm_spawn_tool: vm_spawn_tool.c 461*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_spawn_tool.c -o $(SYMROOT)/vm_spawn_tool 462*f6217f89SApple OSS Distributions 463*f6217f89SApple OSS Distributionsinstall-vm_spawn_tool: vm_spawn_tool 464*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 465*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm_spawn_tool $(INSTALLDIR)/tools/ 466*f6217f89SApple OSS Distributions 467*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += imm_pinned_control_port_crasher 468*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += imm_pinned_control_port_crasher_3P_hardened 469*f6217f89SApple OSS Distributions 470*f6217f89SApple OSS Distributionsimm_pinned_control_port: excserver_protect 471*f6217f89SApple OSS Distributionsimm_pinned_control_port: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 472*f6217f89SApple OSS Distributionsimm_pinned_control_port: OTHER_CFLAGS += $(OBJROOT)/excserver_protect.c -I $(OBJROOT) 473*f6217f89SApple OSS Distributionsimm_pinned_control_port: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 474*f6217f89SApple OSS Distributionsimm_pinned_control_port: imm_pinned_control_port_crasher imm_pinned_control_port_crasher_3P_hardened 475*f6217f89SApple OSS Distributions 476*f6217f89SApple OSS Distributionsimm_pinned_control_port_crasher: imm_pinned_control_port_crasher.c cs_helpers.c 477*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 478*f6217f89SApple OSS Distributions $^ -o $(SYMROOT)/$@ 479*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 480*f6217f89SApple OSS Distributions 481*f6217f89SApple OSS Distributionsimm_pinned_control_port_crasher_3P_hardened: CODE_SIGN_ENTITLEMENTS = entitlements/enhanced-security-binary-entitlements-1.plist 482*f6217f89SApple OSS Distributionsimm_pinned_control_port_crasher_3P_hardened: imm_pinned_control_port_crasher.c cs_helpers.c 483*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 484*f6217f89SApple OSS Distributions $^ -o $(SYMROOT)/$@ 485*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 486*f6217f89SApple OSS Distributions 487*f6217f89SApple OSS Distributionsinstall-imm_pinned_control_port_crasher: imm_pinned_control_port_crasher 488*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 489*f6217f89SApple OSS Distributions cp $(SYMROOT)/$^ $(INSTALLDIR)/ 490*f6217f89SApple OSS Distributions 491*f6217f89SApple OSS Distributionsinstall-imm_pinned_control_port_crasher_3P_hardened: imm_pinned_control_port_crasher_3P_hardened 492*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 493*f6217f89SApple OSS Distributions cp $(SYMROOT)/$^ $(INSTALLDIR)/ 494*f6217f89SApple OSS Distributions 495*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += reply_port_defense_client 496*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += reply_port_defense_client_3P_hardened 497*f6217f89SApple OSS Distributions 498*f6217f89SApple OSS Distributionsreply_port_defense: excserver_protect_state 499*f6217f89SApple OSS Distributionsreply_port_defense: OTHER_CFLAGS += $(OBJROOT)/excserver_protect_state.c -I $(OBJROOT) 500*f6217f89SApple OSS Distributionsreply_port_defense: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 501*f6217f89SApple OSS Distributionsreply_port_defense: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 502*f6217f89SApple OSS Distributionsreply_port_defense: reply_port_defense_client reply_port_defense_client_3P_hardened 503*f6217f89SApple OSS Distributions 504*f6217f89SApple OSS Distributionsreply_port_defense_client: CODE_SIGN_ENTITLEMENTS=exception_tests.entitlements 505*f6217f89SApple OSS Distributionsreply_port_defense_client: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 506*f6217f89SApple OSS Distributionsreply_port_defense_client: reply_port_defense_client.c cs_helpers.c 507*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 508*f6217f89SApple OSS Distributions $^ -o $(SYMROOT)/$@ 509*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 510*f6217f89SApple OSS Distributions 511*f6217f89SApple OSS Distributionsreply_port_defense_client_3P_hardened: CODE_SIGN_ENTITLEMENTS=entitlements/enhanced-security-binary-entitlements-1.plist 512*f6217f89SApple OSS Distributionsreply_port_defense_client_3P_hardened: reply_port_defense_client.c cs_helpers.c 513*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 514*f6217f89SApple OSS Distributions $^ -o $(SYMROOT)/$@ 515*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 516*f6217f89SApple OSS Distributions 517*f6217f89SApple OSS Distributionsinstall-reply_port_defense_client: reply_port_defense_client 518*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 519*f6217f89SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 520*f6217f89SApple OSS Distributions 521*f6217f89SApple OSS Distributionsinstall-reply_port_defense_client_3P_hardened: reply_port_defense_client_3P_hardened 522*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 523*f6217f89SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 524*f6217f89SApple OSS Distributions 525*f6217f89SApple OSS Distributionskas_info: OTHER_LDFLAGS += -framework CoreSymbolication 526*f6217f89SApple OSS Distributionskas_info: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist 527*f6217f89SApple OSS Distributions 528*f6217f89SApple OSS Distributionsnet_bounds_safety: OTHER_CFLAGS += -fbounds-safety 529*f6217f89SApple OSS Distributions 530*f6217f89SApple OSS Distributionsnet_no_bounds_safety: OTHER_CFLAGS += -fno-bounds-safety 531*f6217f89SApple OSS Distributionsnet_no_bounds_safety: net_bounds_safety.c 532*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 533*f6217f89SApple OSS DistributionsOTHER_TEST_TARGETS += net_no_bounds_safety 534*f6217f89SApple OSS Distributions 535*f6217f89SApple OSS Distributionshost_statistics_rate_limiting: cs_helpers.c host_statistics_rate_limiting.c 536*f6217f89SApple OSS Distributions 537*f6217f89SApple 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 vsock_helpers.c 538*f6217f89SApple OSS Distributions 539*f6217f89SApple OSS Distributionsifneq ($(IOS_TEST_COMPAT),YES) 540*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += jumbo_va_spaces_28530648.c perf_compressor.c vm/ios13extended_footprint.c vm/entitlement_internal_bands.c 541*f6217f89SApple OSS Distributionsendif 542*f6217f89SApple OSS Distributions 543*f6217f89SApple OSS Distributionsperf_compressor: OTHER_LDFLAGS += -ldarwintest_utils 544*f6217f89SApple OSS Distributionsperf_compressor: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist 545*f6217f89SApple OSS Distributions 546*f6217f89SApple OSS Distributions 547*f6217f89SApple OSS Distributionsvm/memorystatus_freeze_test: CODE_SIGN_ENTITLEMENTS=./task_for_pid_entitlement.plist 548*f6217f89SApple OSS Distributionsvm/memorystatus_freeze_test: OTHER_LDFLAGS += -ldarwintest_utils 549*f6217f89SApple OSS Distributionsvm/memorystatus_freeze_test: memorystatus_assertion_helpers.c test_utils.c vm/memorystatus_freeze_test.c 550*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 551*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 552*f6217f89SApple OSS Distributions 553*f6217f89SApple OSS Distributionsvm/memorystatus_freeze_test_entitled: CODE_SIGN_ENTITLEMENTS=./vm/memorystatus_freeze_test_entitled.plist 554*f6217f89SApple OSS Distributionsvm/memorystatus_freeze_test_entitled: OTHER_LDFLAGS += -ldarwintest_utils 555*f6217f89SApple OSS Distributionsvm/memorystatus_freeze_test_entitled: test_utils.c vm/memorystatus_freeze_test_entitled.c 556*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 557*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 558*f6217f89SApple OSS Distributions 559*f6217f89SApple OSS Distributionsvm/memorystatus_jetsam_zprint_snapshot: CODE_SIGN_ENTITLEMENTS=./vm/memorystatus_jetsam_zprint_snapshot.entitlements 560*f6217f89SApple OSS Distributionsvm/memorystatus_jetsam_zprint_snapshot: OTHER_LDFLAGS += -ldarwintest_utils 561*f6217f89SApple OSS Distributions 562*f6217f89SApple OSS Distributionsvm/memorystatus_kill_counts: CODE_SIGN_ENTITLEMENTS=./vm/memorystatus_kill_counts.entitlements 563*f6217f89SApple OSS Distributionsvm/memorystatus_kill_counts: OTHER_LDFLAGS += -ldarwintest_utils 564*f6217f89SApple OSS Distributions 565*f6217f89SApple OSS Distributionsvm/neural_footprint: CODE_SIGN_ENTITLEMENTS=./vm/neural_footprint.entitlement 566*f6217f89SApple OSS Distributionsvm/neural_footprint: OTHER_CFLAGS += -I $(OBJROOT) 567*f6217f89SApple OSS Distributionsvm/neural_footprint: OTHER_LDFLAGS += -ldarwintest_utils 568*f6217f89SApple OSS Distributionsvm/neural_footprint: test_utils.c vm/neural_footprint.c ./vm/neural_footprint.entitlement 569*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 570*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 571*f6217f89SApple OSS Distributions 572*f6217f89SApple OSS Distributionsmemorystatus_is_assertion: OTHER_LDFLAGS += -ldarwintest_utils 573*f6217f89SApple OSS Distributionsmemorystatus_is_assertion: OTHER_CFLAGS += memorystatus_assertion_helpers.c 574*f6217f89SApple OSS Distributions 575*f6217f89SApple OSS Distributionsmemorystatus_vm_map_fork: OTHER_CFLAGS += test_utils.c 576*f6217f89SApple OSS Distributionsmemorystatus_vm_map_fork: OTHER_LDFLAGS += -ldarwintest_utils 577*f6217f89SApple OSS Distributions 578*f6217f89SApple OSS Distributionsshared_cache_tests: OTHER_LDFLAGS += -ldarwintest_utils 579*f6217f89SApple OSS Distributions 580*f6217f89SApple OSS Distributionsifneq ($(wildcard $(SDKROOT)/System/Library/PrivateFrameworks/Tightbeam.framework/Headers/tightbeam.h),) 581*f6217f89SApple OSS Distributionsstackshot_tests: OTHER_LDFLAGS += -framework Tightbeam 582*f6217f89SApple OSS Distributionsstackshot_tests: OTHER_CFLAGS += -I$(OBJROOT) 583*f6217f89SApple OSS Distributionsstackshot_tests: OTHER_CFLAGS += $(TIGHTBEAM_MODULE_IMPL_PATH) 584*f6217f89SApple OSS Distributionsstackshot_tests.m: $(TIGHTBEAM_MODULE_HEADERS) 585*f6217f89SApple OSS Distributionsendif 586*f6217f89SApple OSS Distributionsstackshot_tests: ./stackshot-entitlements.plist stackshot_tests.m 587*f6217f89SApple OSS Distributionsstackshot_tests: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 588*f6217f89SApple OSS Distributionsstackshot_tests: OTHER_CFLAGS += -Wno-objc-messaging-id test_utils.c 589*f6217f89SApple OSS Distributionsstackshot_tests: OTHER_LDFLAGS += -lkdd -lz -ldarwintest_utils -framework Foundation -framework IOKit 590*f6217f89SApple OSS Distributions 591*f6217f89SApple OSS Distributionsstackshot_accuracy: ./stackshot-entitlements.plist 592*f6217f89SApple OSS Distributionsstackshot_accuracy: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 593*f6217f89SApple OSS Distributionsstackshot_accuracy: OTHER_CFLAGS += -ldarwintest_utils -Wno-objc-messaging-id 594*f6217f89SApple OSS Distributionsstackshot_accuracy: OTHER_LDFLAGS += -lkdd -ldarwintest_utils -framework Foundation 595*f6217f89SApple OSS Distributionsstackshot_accuracy: INVALID_ARCHS = i386 596*f6217f89SApple OSS Distributions 597*f6217f89SApple OSS Distributionsstackshot_spawn_exit_stress: ./stackshot-entitlements.plist 598*f6217f89SApple OSS Distributionsstackshot_spawn_exit_stress: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 599*f6217f89SApple OSS Distributions 600*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 601*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += stackshot_translated_child 602*f6217f89SApple OSS Distributions 603*f6217f89SApple OSS Distributionsstackshot_translated_child: INVALID_ARCHS = arm64 arm64e 604*f6217f89SApple OSS Distributionsstackshot_translated_child: stackshot_translated_child.c 605*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) stackshot_translated_child.c -o $(SYMROOT)/stackshot_translated_child 606*f6217f89SApple OSS Distributions 607*f6217f89SApple OSS Distributionsinstall-stackshot_translated_child: stackshot_translated_child 608*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 609*f6217f89SApple OSS Distributions cp $(SYMROOT)/stackshot_translated_child $(INSTALLDIR)/ 610*f6217f89SApple OSS Distributionselse 611*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += stackshot_translated_child.c 612*f6217f89SApple OSS Distributionsendif 613*f6217f89SApple OSS Distributions 614*f6217f89SApple OSS Distributionsmicrostackshot_tests: ./stackshot-entitlements.plist 615*f6217f89SApple OSS Distributionsmicrostackshot_tests: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 616*f6217f89SApple OSS Distributionsmicrostackshot_tests: OTHER_LDFLAGS = -ldarwintest_utils -framework ktrace -framework kperf -framework CoreFoundation 617*f6217f89SApple OSS Distributions 618*f6217f89SApple OSS Distributionsmemorystatus_zone_test: ./stackshot-entitlements.plist 619*f6217f89SApple OSS Distributionsmemorystatus_zone_test: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 620*f6217f89SApple OSS Distributionsmemorystatus_zone_test: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders 621*f6217f89SApple OSS Distributionsmemorystatus_zone_test: OTHER_LDFLAGS += -framework ktrace 622*f6217f89SApple OSS Distributionsmemorystatus_zone_test: OTHER_LDFLAGS += -ldarwintest_utils 623*f6217f89SApple OSS Distributions 624*f6217f89SApple OSS Distributionsmemcmp_zero: OTHER_CFLAGS += ../osfmk/arm64/memcmp_zero.s 625*f6217f89SApple OSS Distributions 626*f6217f89SApple OSS Distributionstext_corruption: OTHER_LDFLAGS += -ldarwintest_utils 627*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += text_corruption_helper 628*f6217f89SApple OSS Distributions 629*f6217f89SApple OSS Distributionstext_corruption_helper: 630*f6217f89SApple OSS Distributions $(CC) $(LDFLAGS) $(CFLAGS) text_corruption_helper.c -lm -o $(SYMROOT)/$@; 631*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 632*f6217f89SApple OSS Distributions 633*f6217f89SApple OSS Distributionsinstall-text_corruption_helper: text_corruption_helper 634*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 635*f6217f89SApple OSS Distributions cp $(SYMROOT)/text_corruption_helper $(INSTALLDIR)/ 636*f6217f89SApple OSS Distributions 637*f6217f89SApple OSS Distributionscodesigntests: CODE_SIGN_ENTITLEMENTS=codesigntests-entitlements.plist 638*f6217f89SApple OSS Distributionscodesigntests: OTHER_CFLAGS += -DTESTNAME=codesigntests 639*f6217f89SApple OSS Distributions# Adding a custom target and build/install rules since CODE_SIGN_ENTITLEMENTS 640*f6217f89SApple OSS Distributions# does not take in arguments, and we need to sign this test using a sha256T 641*f6217f89SApple OSS Distributions# digest 642*f6217f89SApple OSS Distributions 643*f6217f89SApple OSS DistributionsOTHER_TEST_TARGETS += codesigntests_sha256t 644*f6217f89SApple OSS Distributionscodesigntests_sha256t: OTHER_CFLAGS += -DTESTNAME=codesigntests_sha256t 645*f6217f89SApple OSS Distributions 646*f6217f89SApple OSS Distributionscodesigntests_sha256t: codesigntests.c 647*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(DT_LDFLAGS) $(LDFLAGS) $(CFLAGS) codesigntests.c -o $(SYMROOT)/$@; 648*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --digest=sha256T -s - --entitlements codesigntests-entitlements.plist $(SYMROOT)/$@; 649*f6217f89SApple OSS Distributionsinstall-codesigntests_sha256t: codesigntests_sha256t 650*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 651*f6217f89SApple OSS Distributions cp $(SYMROOT)/codesigntests_sha256t $(INSTALLDIR)/ 652*f6217f89SApple OSS Distributions 653*f6217f89SApple OSS Distributions 654*f6217f89SApple OSS Distributionsecc_test: OTHER_LDFLAGS += -ldarwintest_utils 655*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += ecc_test_helper 656*f6217f89SApple OSS Distributions 657*f6217f89SApple OSS Distributionsecc_test_helper: 658*f6217f89SApple OSS Distributions $(CC) $(LDFLAGS) $(CFLAGS) ecc_test_helper.c -lm -o $(SYMROOT)/$@; 659*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 660*f6217f89SApple OSS Distributions 661*f6217f89SApple OSS Distributionsinstall-ecc_test_helper: ecc_test_helper 662*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 663*f6217f89SApple OSS Distributions cp $(SYMROOT)/ecc_test_helper $(INSTALLDIR)/ 664*f6217f89SApple OSS Distributions 665*f6217f89SApple OSS Distributionsvm/test_vm_no_pager: excserver 666*f6217f89SApple OSS Distributionsvm/test_vm_no_pager: OTHER_LDFLAGS += -ldarwintest_utils -lpthread -lkdd -framework Foundation 667*f6217f89SApple OSS Distributionsvm/test_vm_no_pager: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders $(OBJROOT)/excserver.c -I$(OBJROOT) 668*f6217f89SApple OSS Distributionsvm/test_vm_no_pager: vm/test_vm_no_pager_helper 669*f6217f89SApple OSS Distributionsvm/test_vm_no_pager: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 670*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += vm/test_vm_no_pager_helper 671*f6217f89SApple OSS Distributions 672*f6217f89SApple OSS Distributionsvm/test_vm_no_pager_helper: vm/test_vm_no_pager_helper.c 673*f6217f89SApple OSS Distributions $(CC) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -lm -o $(SYMROOT)/$@; 674*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 675*f6217f89SApple OSS Distributions 676*f6217f89SApple OSS Distributionsinstall-vm/test_vm_no_pager_helper: vm/test_vm_no_pager_helper 677*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 678*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm/test_vm_no_pager_helper $(INSTALLDIR)/vm/ 679*f6217f89SApple OSS Distributions 680*f6217f89SApple OSS Distributions 681*f6217f89SApple OSS Distributionskevent_qos: OTHER_CFLAGS += -Wno-unused-macros 682*f6217f89SApple OSS Distributionskevent_qos: OTHER_CFLAGS += -I $(OBJROOT)/ 683*f6217f89SApple OSS Distributions 684*f6217f89SApple OSS Distributionstest_knote_use_after_free: OTHER_CFLAGS += -Wno-unused-macros 685*f6217f89SApple OSS Distributionstest_knote_use_after_free: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 686*f6217f89SApple OSS Distributions 687*f6217f89SApple OSS Distributionsmach_get_times: OTHER_LDFLAGS += -ldarwintest_utils 688*f6217f89SApple OSS Distributions 689*f6217f89SApple OSS Distributionsmonotonic_core: ./stackshot-entitlements.plist 690*f6217f89SApple OSS Distributionsmonotonic_core: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 691*f6217f89SApple OSS Distributionsmonotonic_core: OTHER_LDFLAGS += -framework ktrace 692*f6217f89SApple OSS Distributions 693*f6217f89SApple OSS Distributionsperf_exit: perf_exit_proc 694*f6217f89SApple OSS Distributionsperf_exit: ./stackshot-entitlements.plist 695*f6217f89SApple OSS Distributionsperf_exit: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 696*f6217f89SApple OSS Distributionsperf_exit: OTHER_LDFLAGS = -framework ktrace -ldarwintest_utils 697*f6217f89SApple OSS Distributionsperf_exit: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist 698*f6217f89SApple OSS Distributions 699*f6217f89SApple OSS Distributionsipc/mach_exc_port_substitute: excserver 700*f6217f89SApple OSS Distributionsipc/mach_exc_port_substitute: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 701*f6217f89SApple OSS Distributionsipc/mach_exc_port_substitute: CODE_SIGN_ENTITLEMENTS = ipc/mach_exc_port_substitute.plist 702*f6217f89SApple OSS Distributions 703*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += prioritize_process_launch_helper 704*f6217f89SApple OSS Distributionsprioritize_process_launch: prioritize_process_launch_helper 705*f6217f89SApple OSS Distributions 706*f6217f89SApple OSS Distributionsprioritize_process_launch_helper: prioritize_process_launch_helper.c 707*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) prioritize_process_launch_helper.c -o $(SYMROOT)/prioritize_process_launch_helper 708*f6217f89SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 709*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 710*f6217f89SApple OSS Distributions 711*f6217f89SApple OSS Distributionsinstall-prioritize_process_launch_helper: prioritize_process_launch_helper 712*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 713*f6217f89SApple OSS Distributions cp $(SYMROOT)/prioritize_process_launch_helper $(INSTALLDIR)/ 714*f6217f89SApple OSS Distributions 715*f6217f89SApple OSS Distributions 716*f6217f89SApple OSS Distributionsperf_spawn_fork: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist 717*f6217f89SApple OSS Distributions 718*f6217f89SApple OSS Distributionsmach_exception_reply: OTHER_CFLAGS += -Wno-cast-align 719*f6217f89SApple OSS Distributionsmach_exception_reply: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 720*f6217f89SApple OSS Distributions 721*f6217f89SApple OSS Distributionsos_thread_self_restrict: os_thread_self_restrict.c os_thread_self_restrict-entitlements.plist 722*f6217f89SApple OSS Distributionsos_thread_self_restrict: CODE_SIGN_ENTITLEMENTS=os_thread_self_restrict-entitlements.plist 723*f6217f89SApple OSS Distributionsos_thread_self_restrict: OTHER_LDFLAGS += -sectcreate __TEXT __info_plist os_thread_self_restrict-identifier.plist 724*f6217f89SApple OSS Distributions 725*f6217f89SApple OSS Distributions# Temporarily disabled. See rdar://121952316 726*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += os_thread_self_restrict.c 727*f6217f89SApple OSS Distributions 728*f6217f89SApple OSS Distributionssubsystem_root_path: subsystem_root_path.c subsystem_root_path-entitlements.plist 729*f6217f89SApple OSS Distributionssubsystem_root_path: CODE_SIGN_ENTITLEMENTS=subsystem_root_path-entitlements.plist 730*f6217f89SApple OSS Distributions 731*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard bounded_ptr_src/*.cpp) 732*f6217f89SApple OSS Distributionsbounded_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 733*f6217f89SApple OSS Distributionsbounded_ptr: $(wildcard bounded_ptr_src/*.cpp) bounded_ptr.cpp 734*f6217f89SApple OSS Distributions 735*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += bounded_ptr_03.cpp 736*f6217f89SApple OSS Distributionsbounded_ptr_03: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++03 $(DT_LDFLAGS) 737*f6217f89SApple OSS Distributionsbounded_ptr_03: bounded_ptr_03.cpp 738*f6217f89SApple OSS Distributions 739*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard bounded_array_src/*.cpp) 740*f6217f89SApple OSS Distributionsbounded_array: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 741*f6217f89SApple OSS Distributionsbounded_array: $(wildcard bounded_array_src/*.cpp) bounded_array.cpp 742*f6217f89SApple OSS Distributions 743*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard bounded_array_ref_src/*.cpp) 744*f6217f89SApple OSS Distributionsbounded_array_ref: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 745*f6217f89SApple OSS Distributionsbounded_array_ref: $(wildcard bounded_array_ref_src/*.cpp) bounded_array_ref.cpp 746*f6217f89SApple OSS Distributions 747*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard intrusive_shared_ptr_src/*.cpp) 748*f6217f89SApple OSS Distributionsintrusive_shared_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 749*f6217f89SApple OSS Distributionsintrusive_shared_ptr: $(wildcard intrusive_shared_ptr_src/*.cpp) intrusive_shared_ptr.cpp 750*f6217f89SApple OSS Distributions 751*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard safe_allocation_src/*.cpp) 752*f6217f89SApple OSS Distributionssafe_allocation: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 753*f6217f89SApple OSS Distributionssafe_allocation: $(wildcard safe_allocation_src/*.cpp) safe_allocation.cpp 754*f6217f89SApple OSS Distributions 755*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard cxx_safe_buffers_src/*.cpp) 756*f6217f89SApple OSS Distributionscxx_safe_buffers: OTHER_CXXFLAGS += -Werror=unsafe-buffer-usage -I$(SRCROOT)/../libkern -std=c++20 757*f6217f89SApple OSS Distributionscxx_safe_buffers: $(wildcard cxx_safe_buffers_src/*.cpp) cxx_safe_buffers.cpp 758*f6217f89SApple OSS Distributions 759*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += osptr_compat.cpp 760*f6217f89SApple OSS Distributionsosptr_98: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++98 -DOSPTR_STD="98" 761*f6217f89SApple OSS Distributionsosptr_98: osptr_compat.cpp 762*f6217f89SApple OSS Distributions $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 763*f6217f89SApple OSS Distributionsosptr_11: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++11 -DOSPTR_STD="11" 764*f6217f89SApple OSS Distributionsosptr_11: osptr_compat.cpp 765*f6217f89SApple OSS Distributions $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 766*f6217f89SApple OSS Distributionsosptr_14: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++14 -DOSPTR_STD="14" 767*f6217f89SApple OSS Distributionsosptr_14: osptr_compat.cpp 768*f6217f89SApple OSS Distributions $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 769*f6217f89SApple OSS Distributionsosptr_17: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++17 -DOSPTR_STD="17" 770*f6217f89SApple OSS Distributionsosptr_17: osptr_compat.cpp 771*f6217f89SApple OSS Distributions $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 772*f6217f89SApple OSS Distributions 773*f6217f89SApple OSS Distributionspriority_queue: OTHER_CXXFLAGS += -std=c++17 774*f6217f89SApple OSS Distributionsqueue: OTHER_CFLAGS += -I$(SRCROOT)/../osfmk 775*f6217f89SApple OSS Distributions 776*f6217f89SApple OSS Distributionsvm/zalloc: OTHER_LDFLAGS += -ldarwintest_utils 777*f6217f89SApple OSS Distributionsvm/zalloc_buddy: OTHER_CFLAGS += -Wno-format-pedantic 778*f6217f89SApple OSS Distributions 779*f6217f89SApple OSS Distributionsos_refcnt: OTHER_CFLAGS += -I$(SRCROOT)/../libkern/ -Wno-gcc-compat -Wno-undef -O3 -flto -ldarwintest_utils 780*f6217f89SApple OSS Distributions 781*f6217f89SApple OSS Distributionskernel_inspection: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 782*f6217f89SApple OSS Distributionskernel_inspection: OTHER_CFLAGS += -DENTITLED=1 783*f6217f89SApple OSS Distributions 784*f6217f89SApple OSS Distributionsturnstile_multihop: OTHER_CFLAGS += -Wno-unused-macros 785*f6217f89SApple OSS Distributionsturnstile_multihop: OTHER_CFLAGS += -I $(OBJROOT)/ 786*f6217f89SApple OSS Distributions 787*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += perf_exit_proc 788*f6217f89SApple OSS Distributions 789*f6217f89SApple OSS Distributionsperf_exit_proc: 790*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) perf_exit_proc.c -o $(SYMROOT)/perf_exit_proc 791*f6217f89SApple OSS Distributions 792*f6217f89SApple OSS Distributionsinstall-perf_exit_proc: perf_exit_proc 793*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 794*f6217f89SApple OSS Distributions cp $(SYMROOT)/perf_exit_proc $(INSTALLDIR)/ 795*f6217f89SApple OSS Distributions 796*f6217f89SApple OSS Distributions# Stackshot 797*f6217f89SApple OSS Distributions 798*f6217f89SApple OSS Distributions 799*f6217f89SApple OSS Distributionsstackshot_idle_25570396: ./stackshot-entitlements.plist 800*f6217f89SApple OSS Distributionsstackshot_idle_25570396: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 801*f6217f89SApple OSS Distributionsstackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation 802*f6217f89SApple OSS Distributionsstackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation 803*f6217f89SApple OSS Distributions 804*f6217f89SApple OSS Distributionsstackshot_block_owner_14362384: ./stackshot-entitlements.plist 805*f6217f89SApple OSS Distributionsstackshot_block_owner_14362384: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 806*f6217f89SApple OSS Distributionsstackshot_block_owner_14362384: OTHER_LDFLAGS += -framework Foundation -lpthread -lkdd 807*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 808*f6217f89SApple OSS Distributionsstackshot_block_owner_14362384: OTHER_LDFLAGS += -lpcre 809*f6217f89SApple OSS Distributionsendif 810*f6217f89SApple OSS Distributions 811*f6217f89SApple OSS Distributionsall: $(DSTROOT)/usr/local/bin/kcdata 812*f6217f89SApple OSS Distributions 813*f6217f89SApple OSS Distributions$(DSTROOT)/usr/local/bin/kcdata: $(SRCROOT)/../tools/lldbmacros/kcdata.py 814*f6217f89SApple OSS Distributions mkdir -p $(dir $@) 815*f6217f89SApple OSS Distributions cp $< $@ 816*f6217f89SApple OSS Distributions chmod a+x $@ 817*f6217f89SApple OSS Distributions 818*f6217f89SApple OSS Distributionsxnu_quick_test: OTHER_CFLAGS += xnu_quick_test_helpers.c 819*f6217f89SApple OSS Distributions 820*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += vm_set_max_addr_helper 821*f6217f89SApple OSS Distributions 822*f6217f89SApple OSS Distributionsvm_set_max_addr_helper: vm_set_max_addr_helper.c 823*f6217f89SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_set_max_addr_helper.c -o $(SYMROOT)/vm_set_max_addr_helper; \ 824*f6217f89SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 825*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 826*f6217f89SApple OSS Distributions 827*f6217f89SApple OSS Distributionsinstall-vm_set_max_addr_helper: vm_set_max_addr_helper 828*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 829*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm_set_max_addr_helper $(INSTALLDIR)/ 830*f6217f89SApple OSS Distributions 831*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += subsystem_root_path_helper_entitled 832*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += subsystem_root_path_helper 833*f6217f89SApple OSS Distributions 834*f6217f89SApple OSS Distributionssubsystem_root_path_helper_entitled: subsystem_root_path_helper.c subsystem_root_path-entitlements.plist 835*f6217f89SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper_entitled; \ 836*f6217f89SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 837*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements subsystem_root_path-entitlements.plist $(SYMROOT)/$@; 838*f6217f89SApple OSS Distributions 839*f6217f89SApple OSS Distributionsinstall-subsystem_root_path_helper_entitled: subsystem_root_path_helper_entitled 840*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 841*f6217f89SApple OSS Distributions cp $(SYMROOT)/subsystem_root_path_helper_entitled $(INSTALLDIR)/ 842*f6217f89SApple OSS Distributions 843*f6217f89SApple OSS Distributionssubsystem_root_path_helper: subsystem_root_path_helper.c 844*f6217f89SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper; \ 845*f6217f89SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 846*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 847*f6217f89SApple OSS Distributions 848*f6217f89SApple OSS Distributionsinstall-subsystem_root_path_helper: subsystem_root_path_helper 849*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 850*f6217f89SApple OSS Distributions cp $(SYMROOT)/subsystem_root_path_helper $(INSTALLDIR)/ 851*f6217f89SApple OSS Distributions 852*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += vm_test_code_signing_helper 853*f6217f89SApple OSS Distributions 854*f6217f89SApple OSS Distributionsvm_test_code_signing_helper: vm_test_code_signing_helper.c 855*f6217f89SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_test_code_signing_helper.c -o $(SYMROOT)/vm_test_code_signing_helper; \ 856*f6217f89SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 857*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 858*f6217f89SApple OSS Distributions 859*f6217f89SApple OSS Distributionsinstall-vm_test_code_signing_helper: vm_test_code_signing_helper 860*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 861*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm_test_code_signing_helper $(INSTALLDIR)/ 862*f6217f89SApple OSS Distributions 863*f6217f89SApple OSS Distributionsvm_test_code_signing: OTHER_LDFLAGS += -ldarwintest_utils 864*f6217f89SApple OSS Distributions 865*f6217f89SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += ipc rm workq 866*f6217f89SApple OSS Distributions 867*f6217f89SApple OSS Distributionsinclude vm/Makefile 868*f6217f89SApple OSS Distributions 869*f6217f89SApple OSS Distributionsvm/vm_stress: OTHER_CXXFLAGS += -std=c++20 870*f6217f89SApple OSS Distributionsvm/vm_stress: OTHER_LDFLAGS += -ldarwintest_utils 871*f6217f89SApple OSS Distributionsvm/vm_stress: INVALID_ARCHS = x86_64h 872*f6217f89SApple OSS Distributions 873*f6217f89SApple OSS Distributions 874*f6217f89SApple OSS Distributionsbig_map_test: CODE_SIGN_ENTITLEMENTS = ./big_map_test_entitlement.plist 875*f6217f89SApple OSS Distributions 876*f6217f89SApple OSS Distributionstask_info_28439149: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 877*f6217f89SApple OSS Distributions 878*f6217f89SApple OSS Distributionsipc/ipc_read_inspect: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 879*f6217f89SApple OSS Distributions 880*f6217f89SApple OSS Distributionsipc/ipc_thread_ports_race: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 881*f6217f89SApple OSS Distributionsipc/ipc_thread_ports_race: OTHER_LDFLAGS += -ldarwintest_utils 882*f6217f89SApple OSS Distributions 883*f6217f89SApple OSS Distributionsrm/pthread_setugid: OTHER_LDFLAGS += -ldarwintest_utils 884*f6217f89SApple OSS Distributionsrm/coalition_info_resource_usage: OTHER_LDFLAGS += -ldarwintest_utils 885*f6217f89SApple OSS Distributions 886*f6217f89SApple OSS Distributionsproc_info: recount/recount_test_utils.c 887*f6217f89SApple OSS Distributionsproc_info: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 888*f6217f89SApple OSS Distributionsproc_info: OTHER_LDFLAGS += -ldarwintest_utils 889*f6217f89SApple OSS Distributions 890*f6217f89SApple OSS Distributionsproc_info_list_kthreads: CODE_SIGN_ENTITLEMENTS = ./proc_info_list_kthreads.entitlements 891*f6217f89SApple OSS Distributions 892*f6217f89SApple OSS Distributionsproc_info_44873309: CODE_SIGN_ENTITLEMENTS = ./proc_info_44873309.entitlements 893*f6217f89SApple OSS Distributions 894*f6217f89SApple OSS Distributionsdisk_mount_conditioner: disk_mount_conditioner* 895*f6217f89SApple OSS Distributionsdisk_mount_conditioner: CODE_SIGN_ENTITLEMENTS=./disk_mount_conditioner-entitlements.plist 896*f6217f89SApple OSS Distributionsdisk_mount_conditioner: OTHER_LDFLAGS += -ldarwintest_utils -framework Foundation 897*f6217f89SApple OSS Distributions 898*f6217f89SApple OSS Distributionsdisk_mount_conditioner: OTHER_TEST_TARGETS += disk_mount_conditioner_unentitled 899*f6217f89SApple OSS Distributionsdisk_mount_conditioner_unentitled: OTHER_CFLAGS += -DTEST_UNENTITLED 900*f6217f89SApple OSS Distributionsdisk_mount_conditioner_unentitled: OTHER_LDFLAGS += -ldarwintest_utils -framework Foundation 901*f6217f89SApple OSS Distributionsdisk_mount_conditioner_unentitled: disk_mount_conditioner.m 902*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 903*f6217f89SApple OSS Distributions 904*f6217f89SApple OSS Distributionswork_interval_test: CODE_SIGN_ENTITLEMENTS = work_interval_test.entitlements 905*f6217f89SApple OSS Distributionswork_interval_test: OTHER_CFLAGS += -DENTITLED=1 906*f6217f89SApple OSS Distributions 907*f6217f89SApple OSS Distributionswork_interval_data_test: CODE_SIGN_ENTITLEMENTS = work_interval_test.entitlements 908*f6217f89SApple OSS Distributionswork_interval_data_test: OTHER_CFLAGS += -DENTITLED=1 909*f6217f89SApple OSS Distributionswork_interval_data_test: OTHER_LDFLAGS += -lpthread 910*f6217f89SApple OSS Distributions 911*f6217f89SApple OSS Distributionsgame_mode: CODE_SIGN_ENTITLEMENTS = game_mode.entitlements 912*f6217f89SApple OSS Distributionscarplay_mode: CODE_SIGN_ENTITLEMENTS = carplay_mode.entitlements 913*f6217f89SApple OSS Distributionsrunaway_mitigation: CODE_SIGN_ENTITLEMENTS = runaway_mitigation.entitlements 914*f6217f89SApple OSS Distributions 915*f6217f89SApple OSS Distributionscoalition_policy: CODE_SIGN_ENTITLEMENTS = coalition_policy.entitlements 916*f6217f89SApple OSS Distributionscoalition_policy: OTHER_LDFLAGS += $(SCHED_UTILS_FLAGS) 917*f6217f89SApple OSS Distributionscoalition_policy: $(SCHED_UTILS) 918*f6217f89SApple OSS Distributions 919*f6217f89SApple OSS Distributionssettimeofday_29193041: OTHER_CFLAGS += drop_priv.c 920*f6217f89SApple OSS Distributions 921*f6217f89SApple OSS Distributionssettimeofday_29193041_entitled: CODE_SIGN_ENTITLEMENTS = settimeofday_29193041.entitlements 922*f6217f89SApple OSS Distributionssettimeofday_29193041_entitled: OTHER_CFLAGS += drop_priv.c 923*f6217f89SApple OSS Distributions 924*f6217f89SApple OSS Distributionsthread_group_set_32261625: ./stackshot-entitlements.plist 925*f6217f89SApple OSS Distributionsthread_group_set_32261625: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 926*f6217f89SApple OSS Distributionsthread_group_set_32261625: OTHER_LDFLAGS = -framework ktrace 927*f6217f89SApple OSS Distributions 928*f6217f89SApple OSS Distributionstask_info: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 929*f6217f89SApple OSS Distributionstask_info: OTHER_CFLAGS += test_utils.c 930*f6217f89SApple OSS Distributionstask_info: OTHER_LDFLAGS += -ldarwintest_utils 931*f6217f89SApple OSS Distributions 932*f6217f89SApple OSS Distributionsextract_right_soft_fail: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 933*f6217f89SApple OSS Distributions 934*f6217f89SApple OSS Distributionsifneq ($(IOS_TEST_COMPAT),YES) 935*f6217f89SApple OSS Distributions EXCLUDED_SOURCES += task_vm_info_decompressions.c 936*f6217f89SApple OSS Distributionsendif 937*f6217f89SApple OSS Distributions 938*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 939*f6217f89SApple OSS Distributions EXCLUDED_SOURCES += vm/compression_sweep.c 940*f6217f89SApple OSS Distributionsendif 941*f6217f89SApple OSS Distributions 942*f6217f89SApple OSS Distributionsunp_sock_release: CODE_SIGN_ENTITLEMENTS = unp_sock_release-entitlements.plist 943*f6217f89SApple OSS Distributions 944*f6217f89SApple OSS Distributionsaccept_race: in_cksum.c net_test_lib.c 945*f6217f89SApple OSS Distributionsaccept_race: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 946*f6217f89SApple OSS Distributions 947*f6217f89SApple OSS Distributionsflow_div_doubleconnect_55917185: in_cksum.c net_test_lib.c 948*f6217f89SApple OSS Distributionsflow_div_doubleconnect_55917185: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 949*f6217f89SApple OSS Distributions 950*f6217f89SApple OSS Distributionsbpf_write: bpflib.c in_cksum.c net_test_lib.c 951*f6217f89SApple OSS Distributionsbpf_write: OTHER_LDFLAGS += -ldarwintest_utils 952*f6217f89SApple OSS Distributions 953*f6217f89SApple OSS Distributionsbpf_write_batch: bpflib.c in_cksum.c net_test_lib.c 954*f6217f89SApple OSS Distributionsbpf_write_batch: OTHER_LDFLAGS += -ldarwintest_utils 955*f6217f89SApple OSS Distributions 956*f6217f89SApple OSS Distributionsudp_disconnect: in_cksum.c net_test_lib.c 957*f6217f89SApple OSS Distributionsudp_disconnect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 958*f6217f89SApple OSS Distributions 959*f6217f89SApple OSS Distributionsudp_bind_connect: in_cksum.c net_test_lib.c 960*f6217f89SApple OSS Distributionsudp_bind_connect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 961*f6217f89SApple OSS Distributions 962*f6217f89SApple OSS Distributionstcp_bind_connect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 963*f6217f89SApple OSS Distributionstcp_send_implied_connect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 964*f6217f89SApple OSS Distributions 965*f6217f89SApple OSS Distributionstcp_cache_test: CODE_SIGN_ENTITLEMENTS = tcp_cache_entitlements.plist 966*f6217f89SApple OSS Distributions 967*f6217f89SApple OSS Distributionssocket_bind_35243417: in_cksum.c net_test_lib.c 968*f6217f89SApple OSS Distributionssocket_bind_35243417: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 969*f6217f89SApple OSS Distributions 970*f6217f89SApple OSS Distributionssocket_bind_35685803: in_cksum.c net_test_lib.c 971*f6217f89SApple OSS Distributionssocket_bind_35685803: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 972*f6217f89SApple OSS Distributions 973*f6217f89SApple OSS Distributionstcp_input_outputopts_uaf_56155583: in_cksum.c net_test_lib.c 974*f6217f89SApple OSS Distributionstcp_input_outputopts_uaf_56155583: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 975*f6217f89SApple OSS Distributions 976*f6217f89SApple OSS Distributionsunp_connect_thread_uaf: in_cksum.c net_test_lib.c 977*f6217f89SApple OSS Distributionsunp_connect_thread_uaf: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 978*f6217f89SApple OSS Distributions 979*f6217f89SApple OSS Distributionsicmp_fragmetned_payload: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 980*f6217f89SApple OSS Distributionstcp_invalid_address: OTHER_CFLAGS += -Wno-int-conversion 981*f6217f89SApple OSS Distributionstcp_invalid_address: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 982*f6217f89SApple OSS Distributions 983*f6217f89SApple OSS Distributionsnet_tuntests: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 984*f6217f89SApple OSS Distributions 985*f6217f89SApple OSS Distributionsnet_bridge: inet_transfer.c bpflib.c in_cksum.c net_test_lib.c 986*f6217f89SApple OSS Distributionsnet_bridge: OTHER_LDFLAGS += -ldarwintest_utils 987*f6217f89SApple OSS Distributionsnet_bridge: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 988*f6217f89SApple OSS Distributions 989*f6217f89SApple OSS Distributionsnet_vlan: inet_transfer.c bpflib.c in_cksum.c net_test_lib.c 990*f6217f89SApple OSS Distributionsnet_vlan: OTHER_LDFLAGS += -ldarwintest_utils 991*f6217f89SApple OSS Distributionsnet_vlan: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 992*f6217f89SApple OSS Distributions 993*f6217f89SApple OSS Distributionsnet_bond: inet_transfer.c bpflib.c in_cksum.c net_test_lib.c 994*f6217f89SApple OSS Distributionsnet_bond: OTHER_LDFLAGS += -ldarwintest_utils 995*f6217f89SApple OSS Distributionsnet_bond: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 996*f6217f89SApple OSS Distributions 997*f6217f89SApple OSS Distributionsmcast_ssm: in_cksum.c net_test_lib.c 998*f6217f89SApple OSS Distributionsmcast_ssm: OTHER_LDFLAGS += -ldarwintest_utils 999*f6217f89SApple OSS Distributions 1000*f6217f89SApple OSS Distributionsif_generation_id: net_test_lib.c in_cksum.c 1001*f6217f89SApple OSS Distributionsif_generation_id: OTHER_LDFLAGS += -ldarwintest_utils 1002*f6217f89SApple OSS Distributions 1003*f6217f89SApple OSS Distributionsinet6_addr_mode: net_test_lib.c in_cksum.c 1004*f6217f89SApple OSS Distributionsinet6_addr_mode: OTHER_LDFLAGS += -ldarwintest_utils 1005*f6217f89SApple OSS Distributions 1006*f6217f89SApple OSS Distributionsbpf_direction: bpflib.c 1007*f6217f89SApple OSS Distributionsbpf_direction: OTHER_LDFLAGS += -ldarwintest_utils 1008*f6217f89SApple OSS Distributionsbpf_direction: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1009*f6217f89SApple OSS Distributions 1010*f6217f89SApple OSS Distributionsbpf_timestamp: bpflib.c 1011*f6217f89SApple OSS Distributionsbpf_timestamp: OTHER_LDFLAGS += -ldarwintest_utils 1012*f6217f89SApple OSS Distributionsbpf_timestamp: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1013*f6217f89SApple OSS Distributions 1014*f6217f89SApple OSS Distributionsipv6_bind_race: in_cksum.c net_test_lib.c 1015*f6217f89SApple OSS Distributionsipv6_bind_race: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1016*f6217f89SApple OSS Distributions 1017*f6217f89SApple OSS Distributionsmcast_group_race_82820812: in_cksum.c net_test_lib.c 1018*f6217f89SApple OSS Distributionsmcast_group_race_82820812: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1019*f6217f89SApple OSS Distributions 1020*f6217f89SApple OSS Distributionsso_bindtodevice: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1021*f6217f89SApple OSS Distributions 1022*f6217f89SApple OSS Distributionsrecv_link_addr_type: net_test_lib.c in_cksum.c 1023*f6217f89SApple OSS Distributionsrecv_link_addr_type: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1024*f6217f89SApple OSS Distributions 1025*f6217f89SApple OSS Distributionsip_pktinfo: net_test_lib.c in_cksum.c 1026*f6217f89SApple OSS Distributionsip_pktinfo: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1027*f6217f89SApple OSS Distributions 1028*f6217f89SApple OSS Distributionsv4mappedv6_dontfrag: net_test_lib.c in_cksum.c 1029*f6217f89SApple OSS Distributionsv4mappedv6_dontfrag: OTHER_LDFLAGS += -ldarwintest_utils 1030*f6217f89SApple OSS Distributionsv4mappedv6_dontfrag: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1031*f6217f89SApple OSS Distributions 1032*f6217f89SApple OSS Distributionsnet_siocdifaddr: net_test_lib.c in_cksum.c 1033*f6217f89SApple OSS Distributionsnet_siocdifaddr: OTHER_LDFLAGS += -ldarwintest_utils 1034*f6217f89SApple OSS Distributions 1035*f6217f89SApple OSS Distributionsvsock: vsock_helpers.c 1036*f6217f89SApple OSS Distributionsvsock_entitled: vsock_helpers.c 1037*f6217f89SApple OSS Distributionsvsock_entitled: CODE_SIGN_ENTITLEMENTS = vsock_entitlements.plist 1038*f6217f89SApple OSS Distributions 1039*f6217f89SApple OSS Distributionssendmsg_test: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1040*f6217f89SApple OSS Distributions 1041*f6217f89SApple OSS Distributionsnetwork_elevated_logging: CODE_SIGN_ENTITLEMENTS = entitlements/network_elevated_logging.entitlements 1042*f6217f89SApple OSS Distributions 1043*f6217f89SApple OSS Distributionsipc/platform_restrictions_entitlements: CODE_SIGN_ENTITLEMENTS = entitlements/platform-restrictions.plist 1044*f6217f89SApple OSS Distributions 1045*f6217f89SApple OSS Distributionsipc/tpro_entitlements: CODE_SIGN_ENTITLEMENTS = entitlements/tpro.plist 1046*f6217f89SApple OSS Distributions 1047*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += posix_spawn_archpref_helper 1048*f6217f89SApple OSS Distributions 1049*f6217f89SApple OSS Distributionsposix_spawn_archpref_helper: posix_spawn_archpref_helper.c 1050*f6217f89SApple OSS Distributions $(CC) $(LDFLAGS) $(CFLAGS) posix_spawn_archpref_helper.c -o $(SYMROOT)/$@; 1051*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1052*f6217f89SApple OSS Distributions 1053*f6217f89SApple OSS Distributionsinstall-posix_spawn_archpref_helper: posix_spawn_archpref_helper 1054*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1055*f6217f89SApple OSS Distributions cp $(SYMROOT)/posix_spawn_archpref_helper $(INSTALLDIR)/ 1056*f6217f89SApple OSS Distributions 1057*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += posix_spawn_alt_rosetta_helper 1058*f6217f89SApple OSS Distributions 1059*f6217f89SApple OSS Distributionsposix_spawn_alt_rosetta_helper: posix_spawn_alt_rosetta_helper.c 1060*f6217f89SApple OSS Distributions $(CC) $(LDFLAGS) $(CFLAGS) posix_spawn_alt_rosetta_helper.c -o $(SYMROOT)/$@; 1061*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1062*f6217f89SApple OSS Distributions 1063*f6217f89SApple OSS Distributionsinstall-posix_spawn_alt_rosetta_helper: posix_spawn_alt_rosetta_helper 1064*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1065*f6217f89SApple OSS Distributions cp $(SYMROOT)/posix_spawn_alt_rosetta_helper $(INSTALLDIR)/ 1066*f6217f89SApple OSS Distributions 1067*f6217f89SApple OSS DistributionsMIG:=SDKROOT=$(SDKROOT) $(shell xcrun -sdk "$(TARGETSDK)" -find mig) 1068*f6217f89SApple OSS Distributions 1069*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += excserver 1070*f6217f89SApple OSS Distributions 1071*f6217f89SApple OSS Distributionsexcserver: 1072*f6217f89SApple OSS Distributions $(MIG) $(CFLAGS) \ 1073*f6217f89SApple OSS Distributions -sheader $(OBJROOT)/excserver.h \ 1074*f6217f89SApple OSS Distributions -server $(OBJROOT)/excserver.c \ 1075*f6217f89SApple OSS Distributions -header /dev/null -user /dev/null \ 1076*f6217f89SApple OSS Distributions excserver.defs 1077*f6217f89SApple OSS Distributionsinstall-excserver: ; 1078*f6217f89SApple OSS Distributions 1079*f6217f89SApple OSS Distributionsexcserver_protect: 1080*f6217f89SApple OSS Distributions $(MIG) $(CFLAGS) \ 1081*f6217f89SApple OSS Distributions -DMACH_EXC_SERVER_TASKIDTOKEN \ 1082*f6217f89SApple OSS Distributions -sheader $(OBJROOT)/excserver_protect.h \ 1083*f6217f89SApple OSS Distributions -server $(OBJROOT)/excserver_protect.c \ 1084*f6217f89SApple OSS Distributions -header /dev/null -user /dev/null \ 1085*f6217f89SApple OSS Distributions excserver_protect.defs 1086*f6217f89SApple OSS Distributionsinstall-excserver_protect: ; 1087*f6217f89SApple OSS Distributions 1088*f6217f89SApple OSS Distributionsexcserver_protect_state: 1089*f6217f89SApple OSS Distributions $(MIG) $(CFLAGS) \ 1090*f6217f89SApple OSS Distributions -DMACH_EXC_SERVER_TASKIDTOKEN_STATE \ 1091*f6217f89SApple OSS Distributions -DMACH_EXC_SERVER_TASKIDTOKEN \ 1092*f6217f89SApple OSS Distributions -sheader $(OBJROOT)/excserver_protect_state.h \ 1093*f6217f89SApple OSS Distributions -server $(OBJROOT)/excserver_protect_state.c \ 1094*f6217f89SApple OSS Distributions -header /dev/null -user /dev/null \ 1095*f6217f89SApple OSS Distributions excserver_protect.defs 1096*f6217f89SApple OSS Distributionsinstall-excserver_protect_state: ; 1097*f6217f89SApple OSS Distributions 1098*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += exc_helpers.c 1099*f6217f89SApple OSS Distributions 1100*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += notifyserver 1101*f6217f89SApple OSS Distributions 1102*f6217f89SApple OSS Distributionsnotifyserver: 1103*f6217f89SApple OSS Distributions $(MIG) $(CFLAGS) \ 1104*f6217f89SApple OSS Distributions -user /dev/null \ 1105*f6217f89SApple OSS Distributions -header $(OBJROOT)/notify.h \ 1106*f6217f89SApple OSS Distributions -sheader $(OBJROOT)/notifyServer.h \ 1107*f6217f89SApple OSS Distributions -server $(OBJROOT)/notifyServer.c \ 1108*f6217f89SApple OSS Distributions notifyserver.defs 1109*f6217f89SApple OSS Distributionsinstall-notifyserver: ; 1110*f6217f89SApple OSS Distributions 1111*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += rnserver 1112*f6217f89SApple OSS Distributions 1113*f6217f89SApple OSS Distributionsrnserver: 1114*f6217f89SApple OSS Distributions $(MIG) $(CFLAGS) \ 1115*f6217f89SApple OSS Distributions -user /dev/null \ 1116*f6217f89SApple OSS Distributions -header $(OBJROOT)/rn.h \ 1117*f6217f89SApple OSS Distributions -sheader $(OBJROOT)/rnServer.h \ 1118*f6217f89SApple OSS Distributions -server $(OBJROOT)/rnServer.c \ 1119*f6217f89SApple OSS Distributions rnserver.defs 1120*f6217f89SApple OSS Distributionsinstall-rnserver: ; 1121*f6217f89SApple OSS Distributions 1122*f6217f89SApple OSS DistributionsSKYWALK_COMMON_FILES := \ 1123*f6217f89SApple OSS Distributions skywalk/skywalk_test_common.c \ 1124*f6217f89SApple OSS Distributions skywalk/skywalk_test_utils.c 1125*f6217f89SApple OSS DistributionsSKYWALK_TEST_FILES := \ 1126*f6217f89SApple OSS Distributions skywalk/skywalk_test_driver.c \ 1127*f6217f89SApple OSS Distributions skywalk/skt_simple.c \ 1128*f6217f89SApple OSS Distributions skywalk/skt_features.c \ 1129*f6217f89SApple OSS Distributions skywalk/skt_oneslot.c \ 1130*f6217f89SApple OSS Distributions skywalk/skt_shutdown.c \ 1131*f6217f89SApple OSS Distributions skywalk/skt_shutdown2.c \ 1132*f6217f89SApple OSS Distributions skywalk/skt_nslots.c \ 1133*f6217f89SApple OSS Distributions skywalk/skt_closecfd.c \ 1134*f6217f89SApple OSS Distributions skywalk/skt_closenfd.c \ 1135*f6217f89SApple OSS Distributions skywalk/skt_badring.c \ 1136*f6217f89SApple OSS Distributions skywalk/skt_kqueue.c \ 1137*f6217f89SApple OSS Distributions skywalk/skt_mangle.c \ 1138*f6217f89SApple OSS Distributions skywalk/skt_features.c \ 1139*f6217f89SApple OSS Distributions skywalk/skt_ringid.c \ 1140*f6217f89SApple OSS Distributions skywalk/skt_closekq.c \ 1141*f6217f89SApple OSS Distributions skywalk/skt_writemem.c \ 1142*f6217f89SApple OSS Distributions skywalk/skt_debug_verify.c \ 1143*f6217f89SApple OSS Distributions skywalk/skt_utun27302538.c \ 1144*f6217f89SApple OSS Distributions skywalk/skt_utunleak.c \ 1145*f6217f89SApple OSS Distributions skywalk/skt_utunloop.c \ 1146*f6217f89SApple OSS Distributions skywalk/skt_flowswitch_ns_reserve.c \ 1147*f6217f89SApple OSS Distributions skywalk/skt_netifcompat.c \ 1148*f6217f89SApple OSS Distributions skywalk/skt_fswloop.c \ 1149*f6217f89SApple OSS Distributions skywalk/skt_teardown.c \ 1150*f6217f89SApple OSS Distributions skywalk/skt_bind.c \ 1151*f6217f89SApple OSS Distributions skywalk/skt_fsw29301703.c \ 1152*f6217f89SApple OSS Distributions skywalk/skt_fswbinds.c \ 1153*f6217f89SApple OSS Distributions skywalk/skt_manyflows.c \ 1154*f6217f89SApple OSS Distributions skywalk/skt_pllupipe.c \ 1155*f6217f89SApple OSS Distributions skywalk/skt_fullupipe.c \ 1156*f6217f89SApple OSS Distributions skywalk/skt_listener.c \ 1157*f6217f89SApple OSS Distributions skywalk/skt_copy_cksum.c \ 1158*f6217f89SApple OSS Distributions skywalk/skt_reass.c \ 1159*f6217f89SApple OSS Distributions skywalk/skt_memory.c \ 1160*f6217f89SApple OSS Distributions skywalk/skt_flow.c \ 1161*f6217f89SApple OSS Distributions skywalk/skt_flowlookup.c \ 1162*f6217f89SApple OSS Distributions skywalk/skt_libcuckoo.c \ 1163*f6217f89SApple OSS Distributions skywalk/skt_restricted_port.c \ 1164*f6217f89SApple OSS Distributions skywalk/skt_steering.c 1165*f6217f89SApple OSS DistributionsSKYWALK_MPTEST_FILES := \ 1166*f6217f89SApple OSS Distributions skywalk/skywalk_mptests.c \ 1167*f6217f89SApple OSS Distributions skywalk/skywalk_mptest_driver.c \ 1168*f6217f89SApple OSS Distributions skywalk/skt_mpsimple.c \ 1169*f6217f89SApple OSS Distributions skywalk/skt_mpprotons.c \ 1170*f6217f89SApple OSS Distributions skywalk/skt_xfer.c \ 1171*f6217f89SApple OSS Distributions skywalk/skt_netifdirect.c \ 1172*f6217f89SApple OSS Distributions skywalk/skt_filter.c 1173*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += $(SKYWALK_COMMON_FILES) $(SKYWALK_TEST_FILES) $(SKYWALK_MPTEST_FILES) 1174*f6217f89SApple OSS Distributions 1175*f6217f89SApple OSS Distributionsskywalk_tests: excserver 1176*f6217f89SApple OSS Distributionsskywalk_tests: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1177*f6217f89SApple OSS Distributionsskywalk_tests: CODE_SIGN_ENTITLEMENTS = skywalk_test.entitlements 1178*f6217f89SApple OSS Distributionsskywalk_tests: $(SKYWALK_COMMON_FILES) $(SKYWALK_TEST_FILES) $(SKYWALK_MPTEST_FILES) $(SDKROOT)/usr/local/lib/libCrashReporterClient.a 1179*f6217f89SApple OSS Distributions 1180*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += arm_matrix_sme.c 1181*f6217f89SApple OSS Distributions 1182*f6217f89SApple OSS Distributionsarm_matrix: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1183*f6217f89SApple OSS Distributionsarm_matrix: excserver exc_helpers.c arm_matrix_sme.c 1184*f6217f89SApple OSS Distributionsarm_matrix: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) -Wno-language-extension-token -Wno-c++98-compat -mcpu=firestorm+nofp+sme2 1185*f6217f89SApple OSS Distributionsarm_matrix: CODE_SIGN_ENTITLEMENTS = arm_matrix.entitlements 1186*f6217f89SApple OSS Distributions 1187*f6217f89SApple OSS Distributions 1188*f6217f89SApple OSS Distributionsx18_entitled: OTHER_CFLAGS += -ffixed-x18 -Wno-language-extension-token 1189*f6217f89SApple OSS Distributionsx18_entitled: CODE_SIGN_ENTITLEMENTS = x18-entitlements.plist 1190*f6217f89SApple OSS Distributionsx18_unentitled: OTHER_CFLAGS += -ffixed-x18 -Wno-language-extension-token 1191*f6217f89SApple OSS Distributionsifneq ($(PLATFORM),MacOSX) 1192*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += x18_legacy.c 1193*f6217f89SApple OSS Distributionselse 1194*f6217f89SApple OSS Distributionsx18_legacy: OTHER_CFLAGS += -ffixed-x18 -Wno-language-extension-token -Wl,-platform_version -Wl,macos -Wl,10.12 -Wl,10.12 1195*f6217f89SApple OSS Distributionsendif 1196*f6217f89SApple OSS Distributions 1197*f6217f89SApple OSS Distributionsifeq ($(findstring arm64,$(ARCH_CONFIGS)),) 1198*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += apple_generic_timer.c apple_generic_timer_legacy.c 1199*f6217f89SApple OSS Distributionselse 1200*f6217f89SApple OSS Distributionsapple_generic_timer: INVALID_ARCHS = armv7k x86_64 x86_64h 1201*f6217f89SApple OSS Distributions 1202*f6217f89SApple OSS Distributionsapple_generic_timer_legacy: INVALID_ARCHS = armv7k x86_64 x86_64h 1203*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 1204*f6217f89SApple OSS Distributionsapple_generic_timer_legacy: OTHER_CFLAGS += -Wl,-platform_version,macos,14.6,14.6 1205*f6217f89SApple OSS Distributionselse ifeq ($(PLATFORM),iPhoneOS) 1206*f6217f89SApple OSS Distributionsapple_generic_timer_legacy: OTHER_CFLAGS += -Wl,-platform_version,ios,14.6,14.6 1207*f6217f89SApple OSS Distributionselse ifeq ($(PLATFORM),tvOS) 1208*f6217f89SApple OSS Distributionsapple_generic_timer_legacy: OTHER_CFLAGS += -Wl,-platform_version,tvos,14.6,14.6 1209*f6217f89SApple OSS Distributionselse ifeq ($(PLATFORM),WatchOS) 1210*f6217f89SApple OSS Distributionsapple_generic_timer_legacy: OTHER_CFLAGS += -Wl,-platform_version,watchos,10.6,10.6 1211*f6217f89SApple OSS Distributionselse 1212*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += apple_generic_timer_legacy.c 1213*f6217f89SApple OSS Distributionsendif 1214*f6217f89SApple OSS Distributions 1215*f6217f89SApple OSS Distributionsifneq ($(PLATFORM),MacOSX) 1216*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += apple_generic_timer_vmm.c 1217*f6217f89SApple OSS Distributionselse 1218*f6217f89SApple OSS Distributionsapple_generic_timer_vmm: INVALID_ARCHS = armv7k x86_64 x86_64h 1219*f6217f89SApple OSS Distributionsapple_generic_timer_vmm: CODE_SIGN_ENTITLEMENTS = hv_private.entitlements 1220*f6217f89SApple OSS Distributionsendif 1221*f6217f89SApple OSS Distributions 1222*f6217f89SApple OSS Distributionsendif 1223*f6217f89SApple OSS Distributions 1224*f6217f89SApple OSS Distributionsbingrade: bingrade_helper_arm32 bingrade_helper_arm64 bingrade_helper_arm_fat 1225*f6217f89SApple OSS Distributionsbingrade: INVALID_ARCHS = x86_64 x86_64h 1226*f6217f89SApple OSS Distributions# libdarwintest.a doesn't have an arm64 slice on watchOS 1227*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),WatchOS) 1228*f6217f89SApple OSS Distributionsbingrade: INVALID_ARCHS += arm64 1229*f6217f89SApple OSS Distributionsendif 1230*f6217f89SApple OSS Distributions 1231*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += bingrade_helper.c 1232*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += bingrade_helper_arm32 1233*f6217f89SApple OSS Distributionsbingrade_helper_arm32: CFLAGS = -arch arm64_32 -static -nostdlib 1234*f6217f89SApple OSS Distributionsbingrade_helper_arm32: bingrade_helper.c 1235*f6217f89SApple OSS Distributions $(CC) $(CFLAGS) $< -o $(SYMROOT)/$@ 1236*f6217f89SApple OSS Distributions $(CODESIGN) -f -s- $(SYMROOT)/$@ 1237*f6217f89SApple OSS Distributions 1238*f6217f89SApple OSS Distributionsinstall-bingrade_helper_arm32: bingrade_helper_arm32 1239*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1240*f6217f89SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1241*f6217f89SApple OSS Distributions 1242*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += bingrade_helper_arm64 1243*f6217f89SApple OSS Distributionsbingrade_helper_arm64: CFLAGS = -arch arm64 -static -nostdlib 1244*f6217f89SApple OSS Distributionsbingrade_helper_arm64: bingrade_helper.c 1245*f6217f89SApple OSS Distributions $(CC) $(CFLAGS) $< -o $(SYMROOT)/$@ 1246*f6217f89SApple OSS Distributions $(CODESIGN) -f -s- $(SYMROOT)/$@ 1247*f6217f89SApple OSS Distributions 1248*f6217f89SApple OSS Distributionsinstall-bingrade_helper_arm64: bingrade_helper_arm64 1249*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1250*f6217f89SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1251*f6217f89SApple OSS Distributions 1252*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += bingrade_helper_arm_fat 1253*f6217f89SApple OSS Distributionsbingrade_helper_arm_fat: CFLAGS = -arch arm64 -arch arm64_32 -arch arm64e -static -nostdlib 1254*f6217f89SApple OSS Distributionsbingrade_helper_arm_fat: bingrade_helper.c 1255*f6217f89SApple OSS Distributions $(CC) $(CFLAGS) $< -o $(SYMROOT)/$@ 1256*f6217f89SApple OSS Distributions $(CODESIGN) -f -s- $(SYMROOT)/$@ 1257*f6217f89SApple OSS Distributions 1258*f6217f89SApple OSS Distributionsinstall-bingrade_helper_arm_fat: bingrade_helper_arm_fat 1259*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1260*f6217f89SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1261*f6217f89SApple OSS Distributions 1262*f6217f89SApple OSS Distributionspmap_bench: INVALID_ARCHS = $(filter-out arm%,$(ARCH_CONFIGS)) 1263*f6217f89SApple OSS Distributionspmap_stress: INVALID_ARCHS = $(filter-out arm%,$(ARCH_CONFIGS)) 1264*f6217f89SApple OSS Distributionspmap_fault_on_commpage: INVALID_ARCHS = $(filter-out arm%,$(ARCH_CONFIGS)) 1265*f6217f89SApple OSS Distributions 1266*f6217f89SApple OSS Distributionshw_breakpoint_step_arm64: CODE_SIGN_ENTITLEMENTS = hw_breakpoint_step_arm64_entitlements.plist 1267*f6217f89SApple OSS Distributionshw_breakpoint_step_arm64: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1268*f6217f89SApple OSS Distributionshw_breakpoint_step_arm64: excserver 1269*f6217f89SApple OSS Distributionshw_breakpoint_step_arm64: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1270*f6217f89SApple OSS Distributions 1271*f6217f89SApple OSS Distributionsexc_resource_threads: excserver 1272*f6217f89SApple OSS Distributionsexc_resource_threads: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1273*f6217f89SApple OSS Distributionsexc_resource_threads: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1274*f6217f89SApple OSS Distributions 1275*f6217f89SApple OSS Distributionsmach_service_port: notifyserver 1276*f6217f89SApple OSS Distributionsmach_service_port: OTHER_CFLAGS += $(OBJROOT)/notifyServer.c -I $(OBJROOT) 1277*f6217f89SApple OSS Distributions 1278*f6217f89SApple OSS Distributionsfp_exception: excserver exc_helpers.c 1279*f6217f89SApple OSS Distributionsfp_exception: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1280*f6217f89SApple OSS Distributionsfp_exception: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1281*f6217f89SApple OSS Distributions 1282*f6217f89SApple OSS Distributionsptrauth_failure: excserver exc_helpers.c 1283*f6217f89SApple OSS Distributionsptrauth_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) -Wno-language-extension-token 1284*f6217f89SApple OSS Distributionsptrauth_failure: CODESIGN = $(CODESIGN_HARDENED_RUNTIME) 1285*f6217f89SApple OSS Distributionsptrauth_failure: CODE_SIGN_ENTITLEMENTS = entitlements/set_state_and_exception_port.entitlement 1286*f6217f89SApple OSS Distributions 1287*f6217f89SApple OSS Distributionsdecompression_failure: excserver exc_helpers.c try_read_write.c 1288*f6217f89SApple OSS Distributionsdecompression_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1289*f6217f89SApple OSS Distributionsdecompression_failure: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1290*f6217f89SApple OSS Distributions 1291*f6217f89SApple OSS Distributionsipc/kernel_signed_pac_thread_state: excserver 1292*f6217f89SApple OSS Distributionsipc/kernel_signed_pac_thread_state: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1293*f6217f89SApple OSS Distributionsipc/kernel_signed_pac_thread_state: CODE_SIGN_ENTITLEMENTS = pac_exception_entitlement.plist 1294*f6217f89SApple OSS Distributions 1295*f6217f89SApple OSS Distributionsifeq ($(findstring arm64e,$(ARCH_CONFIGS)),) 1296*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += pac_exception_entitlement.c 1297*f6217f89SApple OSS Distributionselse 1298*f6217f89SApple OSS Distributionspac_exception_entitlement: excserver exc_helpers.c 1299*f6217f89SApple OSS Distributionspac_exception_entitlement: OTHER_CFLAGS += $(OBJROOT)/excserver.c -Wno-language-extension-token 1300*f6217f89SApple OSS Distributionspac_exception_entitlement: CODE_SIGN_ENTITLEMENTS = pac_exception_entitlement.plist 1301*f6217f89SApple OSS Distributionsendif 1302*f6217f89SApple OSS Distributions 1303*f6217f89SApple OSS Distributionsunrecoverable_trap_test: excserver exc_helpers.c 1304*f6217f89SApple OSS Distributionsunrecoverable_trap_test: OTHER_CFLAGS += $(OBJROOT)/excserver.c -Wno-language-extension-token 1305*f6217f89SApple OSS Distributionsunrecoverable_trap_test: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1306*f6217f89SApple OSS Distributions# libdarwintest.a doesn't have an arm64 slice on watchOS 1307*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),WatchOS) 1308*f6217f89SApple OSS Distributionsunrecoverable_trap_test: INVALID_ARCHS += arm64 1309*f6217f89SApple OSS Distributionsendif 1310*f6217f89SApple OSS Distributions 1311*f6217f89SApple OSS Distributionsifeq ($(findstring arm64,$(ARCH_CONFIGS)),) 1312*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += arm_cpu_capabilities.c 1313*f6217f89SApple OSS Distributionselse 1314*f6217f89SApple OSS Distributionsarm_cpu_capabilities: INVALID_ARCHS = armv7k x86_64 x86_64h 1315*f6217f89SApple OSS Distributionsarm_cpu_capabilities: excserver exc_helpers.c 1316*f6217f89SApple OSS Distributionsarm_cpu_capabilities: OTHER_CFLAGS += $(OBJROOT)/excserver.c -Wno-language-extension-token -mcpu=apple-a15 1317*f6217f89SApple OSS Distributions#if HAS_ARM_FEAT_SME 1318*f6217f89SApple OSS Distributionsarm_cpu_capabilities: OTHER_CFLAGS += -mcpu=apple-a15+sme2 1319*f6217f89SApple OSS Distributions#endif 1320*f6217f89SApple OSS Distributions# Including PrivateHeaders from both Kernel.framework and System.framework makes 1321*f6217f89SApple OSS Distributions# a mess out of the Mach headers we need to build exception handling support. 1322*f6217f89SApple OSS Distributions# Work around this by only including the arm/ directory. 1323*f6217f89SApple OSS Distributionsarm_cpu_capabilities: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders/arm 1324*f6217f89SApple OSS Distributionsarm_cpu_capabilities: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1325*f6217f89SApple OSS Distributionsendif 1326*f6217f89SApple OSS Distributions 1327*f6217f89SApple OSS Distributions# Disabling building of ldt files as dt_extractmeta crashes 1328*f6217f89SApple OSS Distributions# in build systems. Ref rdar://110251082 1329*f6217f89SApple OSS Distributions# Leaving commented bits for future re-enablement 1330*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += ldt_code32.s ldt.c 1331*f6217f89SApple OSS Distributions 1332*f6217f89SApple OSS Distributions#\ifeq ($(findstring x86_64,$(ARCH_CONFIGS)),) 1333*f6217f89SApple OSS Distributions#EXCLUDED_SOURCES += ldt_code32.s ldt.c 1334*f6217f89SApple OSS Distributions#\else # target = osx 1335*f6217f89SApple OSS Distributions#$(OBJROOT)/ldt_mach_exc_server.c: 1336*f6217f89SApple OSS Distributions# $(MIG) $(CFLAGS) \ 1337*f6217f89SApple OSS Distributions# -user /dev/null \ 1338*f6217f89SApple OSS Distributions# -server $(OBJROOT)/ldt_mach_exc_server.c \ 1339*f6217f89SApple OSS Distributions# -header $(OBJROOT)/ldt_mach_exc.h \ 1340*f6217f89SApple OSS Distributions# mach_exc.defs 1341*f6217f89SApple OSS Distributions# 1342*f6217f89SApple OSS Distributions#ldt: INVALID_ARCHS = $(ARCH_CONFIGS) 1343*f6217f89SApple OSS Distributions#ldt: $(OBJROOT)/ldt_mach_exc_server.c 1344*f6217f89SApple OSS Distributions#ldt: OTHER_CFLAGS += -arch x86_64 -I $(OBJROOT) $(SRCROOT)/ldt_code32.s -Wl,-pagezero_size,0x1000 -Wno-missing-variable-declarations 1345*f6217f89SApple OSS Distributions#ldt: CODE_SIGN_ENTITLEMENTS=ldt_entitlement.plist 1346*f6217f89SApple OSS Distributions#\endif 1347*f6217f89SApple OSS Distributions 1348*f6217f89SApple OSS Distributionsifneq ($(PLATFORM),BridgeOS) 1349*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += remote_time.c 1350*f6217f89SApple OSS Distributionselse 1351*f6217f89SApple OSS Distributionsremote_time: INVALID_ARCHS = armv7 armv7s arm64_32 1352*f6217f89SApple OSS Distributionsendif 1353*f6217f89SApple OSS Distributions 1354*f6217f89SApple OSS Distributionsvm_phys_footprint: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface 1355*f6217f89SApple OSS Distributions 1356*f6217f89SApple OSS Distributionsvm_kern_count_wired_kernelcache: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders/mach 1357*f6217f89SApple OSS Distributions 1358*f6217f89SApple OSS Distributionsdebug_control_port_for_pid: CODE_SIGN_ENTITLEMENTS = ./debug_control_port_for_pid_entitlement.plist 1359*f6217f89SApple OSS Distributions 1360*f6217f89SApple OSS Distributionsprng: OTHER_LDFLAGS += -ldarwintest_utils 1361*f6217f89SApple OSS Distributions 1362*f6217f89SApple OSS Distributionspreoslog: OTHER_LDFLAGS += -ldarwintest_utils 1363*f6217f89SApple OSS Distributionspreoslog: OTHER_CFLAGS += test_utils.c 1364*f6217f89SApple OSS Distributions 1365*f6217f89SApple OSS Distributionstask_policy: CODE_SIGN_ENTITLEMENTS = ./task_policy_entitlement.plist 1366*f6217f89SApple OSS Distributions 1367*f6217f89SApple OSS DistributionsOTHER_TEST_TARGETS += task_policy_unentitled 1368*f6217f89SApple OSS Distributionstask_policy_unentitled: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 1369*f6217f89SApple OSS Distributionstask_policy_unentitled: OTHER_CFLAGS += -DUNENTITLED 1370*f6217f89SApple OSS Distributionstask_policy_unentitled: task_policy.c 1371*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 1372*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@ 1373*f6217f89SApple OSS Distributions 1374*f6217f89SApple OSS Distributions 1375*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += get_shared_cache_address.c 1376*f6217f89SApple OSS Distributions 1377*f6217f89SApple OSS Distributions 1378*f6217f89SApple OSS Distributionsifneq ($(filter iPhoneOS MacOSX, $(PLATFORM)),) 1379*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += get_shared_cache_address 1380*f6217f89SApple OSS Distributions 1381*f6217f89SApple OSS Distributionsget_shared_cache_address: INVALID_ARCHS = arm64 i386 x86_64 1382*f6217f89SApple OSS Distributionsget_shared_cache_address: get_shared_cache_address.c 1383*f6217f89SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/get_shared_cache_address 1384*f6217f89SApple OSS Distributions 1385*f6217f89SApple OSS Distributionsinstall-get_shared_cache_address: get_shared_cache_address 1386*f6217f89SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none --identifier=com.apple.get_shared_cache_address $(SYMROOT)/get_shared_cache_address 1387*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1388*f6217f89SApple OSS Distributions cp $(SYMROOT)/get_shared_cache_address $(INSTALLDIR)/ 1389*f6217f89SApple OSS Distributionsendif 1390*f6217f89SApple OSS Distributions 1391*f6217f89SApple OSS Distributions 1392*f6217f89SApple OSS DistributionsOTHER_TEST_TARGETS += vm_memory_share_tests 1393*f6217f89SApple OSS Distributions 1394*f6217f89SApple OSS Distributionsvm_memory_share_tests: INVALID_ARCHS = i386 1395*f6217f89SApple OSS Distributionsvm_memory_share_tests: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 1396*f6217f89SApple OSS Distributionsvm_memory_share_tests: vm_memory_tests_src/main.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c 1397*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1398*f6217f89SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 1399*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@; 1400*f6217f89SApple OSS Distributions 1401*f6217f89SApple OSS Distributions# build the mach server as individual helper which does not use libdarwintest 1402*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += vm_memory_share_tests_server 1403*f6217f89SApple OSS Distributionsvm_memory_share_tests_server: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 1404*f6217f89SApple 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 1405*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/vm_memory_share_tests_server 1406*f6217f89SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 1407*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@; 1408*f6217f89SApple OSS Distributions 1409*f6217f89SApple OSS Distributionsinstall-vm_memory_share_tests_server: vm_memory_share_tests_server 1410*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1411*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm_memory_share_tests_server $(INSTALLDIR)/ 1412*f6217f89SApple OSS Distributions 1413*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 1414*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += vm/kern_max_task_pmem.c 1415*f6217f89SApple OSS Distributionsendif 1416*f6217f89SApple OSS Distributions 1417*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += benchmark/helpers.c 1418*f6217f89SApple OSS Distributions 1419*f6217f89SApple OSS Distributionsvm/fault_throughput: OTHER_CFLAGS += benchmark/helpers.c 1420*f6217f89SApple OSS Distributions 1421*f6217f89SApple OSS Distributions.PHONY: install-vm/fault_throughput 1422*f6217f89SApple OSS Distributionsinstall-vm/fault_throughput: vm/fault_throughput 1423*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1424*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm/fault_throughput $(INSTALLDIR)/vm/ 1425*f6217f89SApple OSS Distributions 1426*f6217f89SApple OSS Distributions$(SYMROOT)/vm/fault_throughput.lua: $(SRCROOT)/vm/fault_throughput.lua 1427*f6217f89SApple OSS Distributions mkdir -p $(SYMROOT)/vm 1428*f6217f89SApple OSS Distributions cp $< $@ 1429*f6217f89SApple OSS Distributions chmod +x $@ 1430*f6217f89SApple OSS Distributions 1431*f6217f89SApple OSS Distributions.PHONY: install-fault_throughput_benchrun 1432*f6217f89SApple OSS Distributionsinstall-$(SYMROOT)/vm/fault_throughput.lua: $(SYMROOT)/vm/fault_throughput.lua 1433*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1434*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm/fault_throughput.lua $(INSTALLDIR)/vm/ 1435*f6217f89SApple OSS Distributions chmod +x $(INSTALLDIR)/vm/fault_throughput.lua 1436*f6217f89SApple OSS Distributions 1437*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += vm/fault_throughput.plist 1438*f6217f89SApple OSS Distributions 1439*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/vm/fault_throughput.lua vm/fault_throughput 1440*f6217f89SApple OSS Distributions 1441*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 1442*f6217f89SApple OSS Distributionsmixed_pagesize: vm/mixed_pagesize.c 1443*f6217f89SApple OSS Distributions mkdir -p $(SYMROOT)/vm 1444*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/vm/$@ 1445*f6217f89SApple OSS Distributions 1446*f6217f89SApple OSS Distributionsinstall-mixed_pagesize: mixed_pagesize 1447*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1448*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm/mixed_pagesize $(INSTALLDIR)/vm/ 1449*f6217f89SApple OSS Distributions 1450*f6217f89SApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/mixed_pagesize.plist 1451*f6217f89SApple OSS Distributions 1452*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += vm/mixed_pagesize.c vm/mixed_pagesize.plist 1453*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += mixed_pagesize 1454*f6217f89SApple OSS Distributionselse 1455*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += vm/mixed_pagesize.c vm/mixed_pagesize.plist 1456*f6217f89SApple OSS Distributionsendif 1457*f6217f89SApple OSS Distributions 1458*f6217f89SApple OSS Distributionsmanual_wq_cooperative: manual_wq_cooperative.c 1459*f6217f89SApple OSS Distributions mkdir -p $(SYMROOT) 1460*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 1461*f6217f89SApple OSS Distributions 1462*f6217f89SApple OSS Distributionsinstall-manual_wq_cooperative: manual_wq_cooperative 1463*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1464*f6217f89SApple OSS Distributions cp $(SYMROOT)/manual_wq_cooperative $(INSTALLDIR) 1465*f6217f89SApple OSS Distributions 1466*f6217f89SApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/workqueue.plist 1467*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += manual_wq_cooperative.c workqueue.plist 1468*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += manual_wq_cooperative 1469*f6217f89SApple OSS Distributions 1470*f6217f89SApple OSS Distributions# VM madvise(2) benchmark 1471*f6217f89SApple OSS Distributions 1472*f6217f89SApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/perf_madvise.plist 1473*f6217f89SApple OSS Distributions 1474*f6217f89SApple OSS Distributionsvm/perf_madvise: OTHER_CFLAGS += benchmark/helpers.c 1475*f6217f89SApple OSS Distributions 1476*f6217f89SApple OSS Distributions.PHONY: install-vm/perf_madvise 1477*f6217f89SApple OSS Distributionsinstall-vm/perf_madvise: vm/perf_madvise 1478*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1479*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm/perf_madvise $(INSTALLDIR)/vm/ 1480*f6217f89SApple OSS Distributions 1481*f6217f89SApple OSS Distributions$(SYMROOT)/vm/perf_madvise.lua: $(SRCROOT)/vm/perf_madvise.lua 1482*f6217f89SApple OSS Distributions mkdir -p $(SYMROOT)/vm 1483*f6217f89SApple OSS Distributions cp $< $@ 1484*f6217f89SApple OSS Distributions chmod +x $@ 1485*f6217f89SApple OSS Distributions 1486*f6217f89SApple OSS Distributions.PHONY: install-perf_madvise_benchrun 1487*f6217f89SApple OSS Distributionsinstall-$(SYMROOT)/vm/perf_madvise.lua: $(SYMROOT)/vm/perf_madvise.lua 1488*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1489*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm/perf_madvise.lua $(INSTALLDIR)/vm 1490*f6217f89SApple OSS Distributions chmod +x $(INSTALLDIR)/vm/perf_madvise.lua 1491*f6217f89SApple OSS Distributions 1492*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/vm/perf_madvise.lua vm/perf_madvise 1493*f6217f89SApple OSS Distributions 1494*f6217f89SApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/perf_compressor.plist 1495*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += vm/perf_compressor.plist 1496*f6217f89SApple OSS Distributions 1497*f6217f89SApple OSS Distributionsvm/perf_compressor: OTHER_CFLAGS += benchmark/helpers.c 1498*f6217f89SApple OSS Distributions 1499*f6217f89SApple OSS Distributions.PHONY: install-vm/perf_compressor 1500*f6217f89SApple OSS Distributionsinstall-vm/perf_compressor: vm/perf_compressor 1501*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1502*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm/perf_compressor $(INSTALLDIR)/vm/ 1503*f6217f89SApple OSS Distributions 1504*f6217f89SApple OSS Distributions$(SYMROOT)/vm/perf_compressor.lua: $(SRCROOT)/vm/perf_compressor.lua 1505*f6217f89SApple OSS Distributions mkdir -p $(SYMROOT)/vm 1506*f6217f89SApple OSS Distributions cp $< $@ 1507*f6217f89SApple OSS Distributions chmod +x $@ 1508*f6217f89SApple OSS Distributions 1509*f6217f89SApple OSS Distributions.PHONY: install-$(SYMROOT)/vm/perf_compressor_benchrun 1510*f6217f89SApple OSS Distributionsinstall-$(SYMROOT)/vm/perf_compressor.lua: $(SYMROOT)/vm/perf_compressor.lua 1511*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1512*f6217f89SApple OSS Distributions cp $(SYMROOT)/vm/perf_compressor.lua $(INSTALLDIR)/vm/ 1513*f6217f89SApple OSS Distributions chmod +x $(INSTALLDIR)/vm/perf_compressor.lua 1514*f6217f89SApple OSS Distributions 1515*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/vm/perf_compressor.lua vm/perf_compressor 1516*f6217f89SApple OSS Distributions 1517*f6217f89SApple OSS Distributionsioconnectasyncmethod_57641955: OTHER_LDFLAGS += -framework IOKit 1518*f6217f89SApple OSS Distributions 1519*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),BridgeOS) 1520*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += ipsec.m 1521*f6217f89SApple OSS Distributionselse 1522*f6217f89SApple OSS Distributionsipsec: OTHER_LDFLAGS += -framework Foundation -framework CoreFoundation -framework NetworkExtension 1523*f6217f89SApple OSS Distributionsipsec: CODE_SIGN_ENTITLEMENTS = ipsec.entitlements 1524*f6217f89SApple OSS Distributionsendif 1525*f6217f89SApple OSS Distributions 1526*f6217f89SApple OSS Distributionstest_sysctl_kern_procargs_25397314: OTHER_LDFLAGS += -framework Foundation -ldarwintest_utils 1527*f6217f89SApple OSS Distributions 1528*f6217f89SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += counter 1529*f6217f89SApple OSS Distributions 1530*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += counter/common.c 1531*f6217f89SApple OSS Distributionscounter/counter: OTHER_CFLAGS += counter/common.c test_utils.c 1532*f6217f89SApple OSS Distributionscounter/counter: OTHER_LDFLAGS += -ldarwintest_utils -ldarwintest 1533*f6217f89SApple OSS Distributions 1534*f6217f89SApple OSS Distributionscounter/benchmark: OTHER_CFLAGS += counter/common.c benchmark/helpers.c 1535*f6217f89SApple OSS Distributions 1536*f6217f89SApple OSS Distributions.PHONY: install-counter/benchmark 1537*f6217f89SApple OSS Distributionsinstall-counter/benchmark: counter/benchmark 1538*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/counter 1539*f6217f89SApple OSS Distributions cp $(SYMROOT)/counter/benchmark $(INSTALLDIR)/counter/ 1540*f6217f89SApple OSS Distributions 1541*f6217f89SApple OSS Distributions$(SYMROOT)/counter/benchmark.lua: $(SRCROOT)/counter/benchmark.lua 1542*f6217f89SApple OSS Distributions mkdir -p $(SYMROOT)/counter 1543*f6217f89SApple OSS Distributions cp $< $@ 1544*f6217f89SApple OSS Distributions chmod +x $@ 1545*f6217f89SApple OSS Distributions 1546*f6217f89SApple OSS Distributions.PHONY: install-counter_benchrun 1547*f6217f89SApple OSS Distributionsinstall-$(SYMROOT)/counter/benchmark.lua: $(SYMROOT)/counter/benchmark.lua 1548*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/counter 1549*f6217f89SApple OSS Distributions cp $(SYMROOT)/counter/benchmark.lua $(INSTALLDIR)/counter/ 1550*f6217f89SApple OSS Distributions chmod +x $(INSTALLDIR)/counter/benchmark.lua 1551*f6217f89SApple OSS Distributions 1552*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/counter/benchmark.lua counter/benchmark 1553*f6217f89SApple OSS Distributions 1554*f6217f89SApple OSS Distributionsifneq ($(PLATFORM),MacOSX) 1555*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += vm/page_size_globals.c 1556*f6217f89SApple OSS Distributionselse 1557*f6217f89SApple OSS Distributionsvm/page_size_globals: INVALID_ARCHS = arm64 arm64e 1558*f6217f89SApple OSS Distributionsendif 1559*f6217f89SApple OSS Distributions 1560*f6217f89SApple OSS Distributions# Same helper used in execperf, different build system. 1561*f6217f89SApple OSS Distributionsstatic_binary: ../tools/tests/execperf/exit-asm.S 1562*f6217f89SApple 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 1563*f6217f89SApple OSS Distributions CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/static_binary 1564*f6217f89SApple OSS Distributions 1565*f6217f89SApple OSS Distributionsinstall-static_binary: static_binary 1566*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1567*f6217f89SApple OSS Distributions cp $(SYMROOT)/static_binary $(INSTALLDIR) 1568*f6217f89SApple OSS Distributions 1569*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += static_binary 1570*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += static_binary.c 1571*f6217f89SApple OSS Distributions 1572*f6217f89SApple OSS Distributionstest_static_binary_csflags: static_binary 1573*f6217f89SApple OSS Distributionstest_static_binary_csflags: OTHER_LDFLAGS += -ldarwintest_utils 1574*f6217f89SApple OSS Distributions 1575*f6217f89SApple OSS Distributions 1576*f6217f89SApple OSS Distributionslibmalloc_apple_array: CODE_SIGN_ENTITLEMENTS = entitlements/libmalloc_apple_array.entitlements 1577*f6217f89SApple OSS Distributionslibmalloc_apple_array: OTHER_CFLAGS += -DENTITLED=1 drop_priv.c test_utils.c 1578*f6217f89SApple OSS Distributionslibmalloc_apple_array: OTHER_LDFLAGS += -ldarwintest_utils 1579*f6217f89SApple OSS Distributionslibmalloc_apple_array: libmalloc_apple_array.c print_apple_array print_apple_array_HR1 print_apple_array_HR2 print_apple_array_hardened_proc print_apple_array_hardened_proc_security print_apple_array_hardened_heap print_apple_array_hardened_heap_security 1580*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 1581*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 1582*f6217f89SApple OSS Distributions 1583*f6217f89SApple OSS Distributionslibmalloc_apple_array_unentitled: OTHER_CFLAGS += drop_priv.c test_utils.c 1584*f6217f89SApple OSS Distributionslibmalloc_apple_array_unentitled: OTHER_LDFLAGS += -ldarwintest_utils 1585*f6217f89SApple OSS Distributionslibmalloc_apple_array_unentitled: libmalloc_apple_array.c print_apple_array print_apple_array_HR1 print_apple_array_HR2 print_apple_array_hardened_proc print_apple_array_hardened_heap 1586*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $(OTHER_CFLAGS) $< -o $(SYMROOT)/$@ 1587*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1588*f6217f89SApple OSS Distributions 1589*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array 1590*f6217f89SApple OSS Distributionsprint_apple_array: print_apple_array.c 1591*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1592*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1593*f6217f89SApple OSS Distributions 1594*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_HR1 1595*f6217f89SApple OSS Distributionsprint_apple_array_HR1: CODE_SIGN_ENTITLEMENTS=entitlements/enhanced-security-binary-entitlements-1.plist 1596*f6217f89SApple OSS Distributionsprint_apple_array_HR1: print_apple_array.c 1597*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1598*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1599*f6217f89SApple OSS Distributions 1600*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_HR2 1601*f6217f89SApple OSS Distributionsprint_apple_array_HR2: CODE_SIGN_ENTITLEMENTS=entitlements/enhanced-security-binary-entitlements-2.plist 1602*f6217f89SApple OSS Distributionsprint_apple_array_HR2: print_apple_array.c 1603*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1604*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1605*f6217f89SApple OSS Distributions 1606*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_hardened_proc 1607*f6217f89SApple OSS Distributionsprint_apple_array_hardened_proc: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-proc.entitlements 1608*f6217f89SApple OSS Distributionsprint_apple_array_hardened_proc: print_apple_array.c 1609*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1610*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1611*f6217f89SApple OSS Distributions 1612*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_hardened_proc_security 1613*f6217f89SApple OSS Distributionsprint_apple_array_hardened_proc_security: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-proc-security.entitlements 1614*f6217f89SApple OSS Distributionsprint_apple_array_hardened_proc_security: print_apple_array.c 1615*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1616*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1617*f6217f89SApple OSS Distributions 1618*f6217f89SApple OSS Distributions 1619*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_hardened_heap 1620*f6217f89SApple OSS Distributionsprint_apple_array_hardened_heap: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-heap.entitlements 1621*f6217f89SApple OSS Distributionsprint_apple_array_hardened_heap: print_apple_array.c 1622*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1623*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1624*f6217f89SApple OSS Distributions 1625*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_hardened_heap_security 1626*f6217f89SApple OSS Distributionsprint_apple_array_hardened_heap_security: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-heap-security.entitlements 1627*f6217f89SApple OSS Distributionsprint_apple_array_hardened_heap_security: print_apple_array.c 1628*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1629*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1630*f6217f89SApple OSS Distributions 1631*f6217f89SApple OSS Distributionsinstall-print_apple_array: print_apple_array 1632*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1633*f6217f89SApple OSS Distributions cp $(SYMROOT)/print_apple_array $(INSTALLDIR)/tools/ 1634*f6217f89SApple OSS Distributions 1635*f6217f89SApple OSS Distributionsinstall-print_apple_array_HR1: print_apple_array_HR1 1636*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1637*f6217f89SApple OSS Distributions cp $(SYMROOT)/print_apple_array_HR1 $(INSTALLDIR)/tools/ 1638*f6217f89SApple OSS Distributions 1639*f6217f89SApple OSS Distributionsinstall-print_apple_array_HR2: print_apple_array_HR2 1640*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1641*f6217f89SApple OSS Distributions cp $(SYMROOT)/print_apple_array_HR2 $(INSTALLDIR)/tools/ 1642*f6217f89SApple OSS Distributions 1643*f6217f89SApple OSS Distributionsinstall-print_apple_array_hardened_proc: print_apple_array_hardened_proc 1644*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1645*f6217f89SApple OSS Distributions cp $(SYMROOT)/print_apple_array_hardened_proc $(INSTALLDIR)/tools/ 1646*f6217f89SApple OSS Distributions 1647*f6217f89SApple OSS Distributionsinstall-print_apple_array_hardened_proc_security: print_apple_array_hardened_proc_security 1648*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1649*f6217f89SApple OSS Distributions cp $(SYMROOT)/print_apple_array_hardened_proc_security $(INSTALLDIR)/tools/ 1650*f6217f89SApple OSS Distributions 1651*f6217f89SApple OSS Distributionsinstall-print_apple_array_hardened_heap: print_apple_array_hardened_heap 1652*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1653*f6217f89SApple OSS Distributions cp $(SYMROOT)/print_apple_array_hardened_heap $(INSTALLDIR)/tools/ 1654*f6217f89SApple OSS Distributions 1655*f6217f89SApple OSS Distributions 1656*f6217f89SApple OSS Distributionsinstall-print_apple_array_hardened_heap_security: print_apple_array_hardened_heap_security 1657*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1658*f6217f89SApple OSS Distributions cp $(SYMROOT)/print_apple_array_hardened_heap_security $(INSTALLDIR)/tools/ 1659*f6217f89SApple OSS Distributions 1660*f6217f89SApple OSS Distributionspersona: CODE_SIGN_ENTITLEMENTS = persona.entitlements 1661*f6217f89SApple OSS Distributionspersona_adoption: CODE_SIGN_ENTITLEMENTS = persona_adoption.entitlements 1662*f6217f89SApple OSS Distributions 1663*f6217f89SApple OSS DistributionsOTHER_TEST_TARGETS += libmalloc_apple_array libmalloc_apple_array_unentitled 1664*f6217f89SApple OSS Distributions 1665*f6217f89SApple OSS Distributionsentropy: OTHER_CFLAGS += -framework perfdata 1666*f6217f89SApple OSS Distributions 1667*f6217f89SApple OSS Distributionsdebug_enable_syscall_rejection: OTHER_LDFLAGS += -ldarwintest_utils 1668*f6217f89SApple OSS Distributions 1669*f6217f89SApple OSS Distributionsthread_set_state_arm64_cpsr: CODE_SIGN_ENTITLEMENTS = entitlements/thread_set_state.entitlement 1670*f6217f89SApple OSS Distributions 1671*f6217f89SApple OSS Distributionsvm/app_swap: OTHER_LDFLAGS += -ldarwintest_utils 1672*f6217f89SApple OSS Distributions 1673*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += debug_syscall_rejection_helper 1674*f6217f89SApple OSS Distributionsdebug_syscall_rejection_helper: debug_syscall_rejection_helper.c 1675*f6217f89SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@; \ 1676*f6217f89SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 1677*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1678*f6217f89SApple OSS Distributions 1679*f6217f89SApple OSS Distributions 1680*f6217f89SApple OSS Distributionsinstall-debug_syscall_rejection_helper: debug_syscall_rejection_helper 1681*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1682*f6217f89SApple OSS Distributions cp $(SYMROOT)/debug_syscall_rejection_helper $(INSTALLDIR)/ 1683*f6217f89SApple OSS Distributions 1684*f6217f89SApple OSS Distributionsfile_leases: OTHER_CFLAGS += test_utils.c 1685*f6217f89SApple OSS Distributionsfile_leases: OTHER_LDFLAGS += -ldarwintest_utils 1686*f6217f89SApple OSS Distributionsfile_leases: CODE_SIGN_ENTITLEMENTS = file_leases.entitlements 1687*f6217f89SApple OSS Distributions 1688*f6217f89SApple OSS Distributionsiopolicy: OTHER_LDFLAGS += -ldarwintest_utils 1689*f6217f89SApple OSS Distributionsiopolicy: CODE_SIGN_ENTITLEMENTS = iopolicy.entitlements 1690*f6217f89SApple OSS Distributions 1691*f6217f89SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += vfs 1692*f6217f89SApple OSS Distributionsvfs/freeable_vnodes: OTHER_LDFLAGS += -ldarwintest_utils 1693*f6217f89SApple OSS Distributionsvfs/sandbox_fstat: OTHER_LDFLAGS += -lsandbox 1694*f6217f89SApple OSS Distributionsvfs/named_fork_path: OTHER_LDFLAGS += -lsandbox 1695*f6217f89SApple OSS Distributionsvfs/sandbox_type_error: OTHER_LDFLAGS += -lsandbox 1696*f6217f89SApple OSS Distributionsvfs/sandbox_appledouble_write: OTHER_LDFLAGS += -lsandbox 1697*f6217f89SApple OSS Distributions 1698*f6217f89SApple OSS Distributions# tests/vm/configurator_*.c use the VM configurator 1699*f6217f89SApple OSS Distributions 1700*f6217f89SApple OSS DistributionsVM_CONFIGURATOR_SRCS = $(wildcard vm/configurator_*.c) 1701*f6217f89SApple OSS DistributionsVM_CONFIGURATOR_TARGETS = $(VM_CONFIGURATOR_SRCS:%.c=%) 1702*f6217f89SApple OSS Distributions 1703*f6217f89SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): vm/configurator/vm_configurator.c 1704*f6217f89SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): vm/configurator/vm_configurator.h vm/configurator/vm_configurator_tests.h 1705*f6217f89SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): OTHER_CFLAGS += -Wall -Wextra -g 1706*f6217f89SApple OSS Distributions 1707*f6217f89SApple OSS Distributions# exception handling helpers 1708*f6217f89SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): exc_guard_helper.c try_read_write.c exc_helpers.c test_utils.c excserver 1709*f6217f89SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1710*f6217f89SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): OTHER_LDFLAGS += -ldarwintest_utils 1711*f6217f89SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1712*f6217f89SApple OSS Distributions 1713*f6217f89SApple OSS Distributions# Convenience target to build all tests that use vm_configurator.c 1714*f6217f89SApple OSS Distributions.PHONY: all-vm-configurator-tests 1715*f6217f89SApple OSS Distributionsall-vm-configurator-tests: $(VM_CONFIGURATOR_TARGETS) 1716*f6217f89SApple OSS Distributions 1717*f6217f89SApple OSS Distributions# Convenience target to list all test executables that use vm_configurator.c 1718*f6217f89SApple OSS Distributions.PHONY: list-all-vm-configurator-executables 1719*f6217f89SApple OSS Distributionslist-all-vm-configurator-executables: 1720*f6217f89SApple OSS Distributions @ echo $(addprefix $(SYMROOT)/,$(VM_CONFIGURATOR_TARGETS)) 1721*f6217f89SApple OSS Distributions 1722*f6217f89SApple OSS Distributionsvm/corpse_footprint: OTHER_LDFLAGS += -ldarwintest_utils 1723*f6217f89SApple OSS Distributions 1724*f6217f89SApple OSS DistributionsEXCLUDED_SOURCES += constrained_ctypes_tests.c 1725*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += constrained_ctypes_tests_enabled constrained_ctypes_tests_enacted constrained_ctypes_tests_disabled 1726*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_enabled: OTHER_CFLAGS += -D__CCT_TEST_ENABLED 1727*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_enabled: OTHER_LDFLAGS += -ldarwintest_utils 1728*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_enabled: constrained_ctypes_tests.c 1729*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) constrained_ctypes_tests.c -o $(SYMROOT)/constrained_ctypes_tests_enabled 1730*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/constrained_ctypes_tests_enabled; 1731*f6217f89SApple OSS Distributions 1732*f6217f89SApple OSS Distributionsinstall-constrained_ctypes_tests_enabled: constrained_ctypes_tests_enabled 1733*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1734*f6217f89SApple OSS Distributions cp $(SYMROOT)/constrained_ctypes_tests_enabled $(INSTALLDIR)/ 1735*f6217f89SApple OSS Distributions 1736*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_CFLAGS += -D__CCT_TEST_ENABLED 1737*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_CFLAGS += -D__CCT_TEST_ENACTED 1738*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_CFLAGS += -fbounds-safety 1739*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_LDFLAGS += -ldarwintest_utils 1740*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_enacted: constrained_ctypes_tests.c 1741*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) constrained_ctypes_tests.c -o $(SYMROOT)/constrained_ctypes_tests_enacted 1742*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/constrained_ctypes_tests_enacted; 1743*f6217f89SApple OSS Distributions 1744*f6217f89SApple OSS Distributionsinstall-constrained_ctypes_tests_enacted: constrained_ctypes_tests_enacted 1745*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1746*f6217f89SApple OSS Distributions cp $(SYMROOT)/constrained_ctypes_tests_enacted $(INSTALLDIR)/ 1747*f6217f89SApple OSS Distributions 1748*f6217f89SApple OSS Distributions 1749*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_disabled: OTHER_LDFLAGS += -ldarwintest_utils 1750*f6217f89SApple OSS Distributionsconstrained_ctypes_tests_disabled: constrained_ctypes_tests.c 1751*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) constrained_ctypes_tests.c -o $(SYMROOT)/constrained_ctypes_tests_disabled 1752*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/constrained_ctypes_tests_disabled; 1753*f6217f89SApple OSS Distributions 1754*f6217f89SApple OSS Distributionsinstall-constrained_ctypes_tests_disabled: constrained_ctypes_tests_disabled 1755*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1756*f6217f89SApple OSS Distributions cp $(SYMROOT)/constrained_ctypes_tests_disabled $(INSTALLDIR)/ 1757*f6217f89SApple OSS Distributions 1758*f6217f89SApple OSS Distributionstask_suspend_stats: OTHER_LDFLAGS += -ldarwintest_utils 1759*f6217f89SApple OSS Distributionstask_suspend_stats: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 1760*f6217f89SApple OSS Distributions 1761*f6217f89SApple OSS Distributionsexec_set_proc_name: OTHER_LDFLAGS += -ldarwintest_utils 1762*f6217f89SApple OSS Distributions 1763*f6217f89SApple OSS Distributions 1764*f6217f89SApple OSS Distributionsinclude $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets 1765*f6217f89SApple OSS Distributions 1766*f6217f89SApple OSS Distributionsexception_ports_info: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1767*f6217f89SApple OSS Distributions 1768*f6217f89SApple OSS Distributionsvfs/longpaths: vfs/longpaths.c 1769*f6217f89SApple OSS Distributionsvfs/longpaths: OTHER_LDFLAGS += -ldarwintest_utils 1770*f6217f89SApple OSS Distributionsvfs/longpaths: CODE_SIGN_ENTITLEMENTS = vfs/longpaths.entitlements 1771*f6217f89SApple OSS Distributions 1772*f6217f89SApple OSS Distributionsvfs/devfd_access: vfs/devfd_access.c 1773*f6217f89SApple OSS Distributionsvfs/devfd_access: CODE_SIGN_ENTITLEMENTS = vfs/devfd_access.entitlements 1774*f6217f89SApple OSS Distributions 1775*f6217f89SApple OSS Distributionsvfs/openbyid_stress: vfs/openbyid_stress.c 1776*f6217f89SApple OSS Distributionsvfs/openbyid_stress: CODE_SIGN_ENTITLEMENTS = vfs/openbyid_stress.entitlements 1777*f6217f89SApple OSS Distributions 1778*f6217f89SApple OSS DistributionsOTHER_TEST_TARGETS += trial_experiment_factors_entitled 1779*f6217f89SApple OSS Distributionstrial_experiment_factors_entitled: OTHER_CFLAGS += -DENTITLED=1 1780*f6217f89SApple OSS Distributionstrial_experiment_factors_entitled: CODE_SIGN_ENTITLEMENTS=kern-trial.entitlements 1781*f6217f89SApple OSS Distributionstrial_experiment_factors_entitled: trial_experiment_factors.c 1782*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1783*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 1784*f6217f89SApple OSS Distributions 1785*f6217f89SApple OSS Distributionsmemorystatus_experiment_factors: CODESIGN_ENTITLEMENTS=./memorystatus/memorystatus_experiment_factors.entitlements 1786*f6217f89SApple OSS Distributionsmemorystatus_experiment_factors: memorystatus/memorystatus_experiment_factors.c 1787*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1788*f6217f89SApple OSS Distributions $(ENV) CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODESIGN_ENTITLEMENTS) $(SYMROOT)/$@; 1789*f6217f89SApple OSS Distributions 1790*f6217f89SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 1791*f6217f89SApple OSS DistributionsCUSTOM_TARGETS += nox86exec_helper 1792*f6217f89SApple OSS Distributions 1793*f6217f89SApple OSS Distributionsnox86exec_helper: INVALID_ARCHS = arm64e arm64 1794*f6217f89SApple OSS Distributionsnox86exec_helper: nox86exec_helper.c 1795*f6217f89SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1796*f6217f89SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1797*f6217f89SApple OSS Distributions 1798*f6217f89SApple OSS Distributionsinstall-posix_spawn_alt_rosetta_helper: nox86exec_helper 1799*f6217f89SApple OSS Distributions mkdir -p $(INSTALLDIR) 1800*f6217f89SApple OSS Distributions cp $(SYMROOT)/nox86exec_helper $(INSTALLDIR)/ 1801*f6217f89SApple OSS Distributionsendif 1802*f6217f89SApple OSS Distributions 1803*f6217f89SApple OSS Distributionsvm/memorystatus_rearm: excserver 1804*f6217f89SApple OSS Distributionsvm/memorystatus_rearm: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1805*f6217f89SApple OSS Distributionsvm/memorystatus_rearm: CODE_SIGN_ENTITLEMENTS = vm/memorystatus_rearm.entitlements 1806