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