+vm_phys_footprint: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface
+
+vm_kern_count_wired_kernelcache: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders/mach
+
+debug_control_port_for_pid: CODE_SIGN_ENTITLEMENTS = ./debug_control_port_for_pid_entitlement.plist
+
+prng: OTHER_LDFLAGS += -ldarwintest_utils
+
+preoslog: OTHER_LDFLAGS += -ldarwintest_utils
+preoslog: OTHER_CFLAGS += test_utils.c
+
+task_policy: CODE_SIGN_ENTITLEMENTS = ./task_policy_entitlement.plist
+
+OTHER_TEST_TARGETS += task_policy_unentitled
+task_policy_unentitled: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist
+task_policy_unentitled: OTHER_CFLAGS += -DUNENTITLED
+task_policy_unentitled: task_policy.c
+ $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
+ $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@
+
+
+EXCLUDED_SOURCES += get_shared_cache_address.c
+ifeq ($(PLATFORM),iPhoneOS)
+CUSTOM_TARGETS += get_shared_cache_address
+get_shared_cache_address: INVALID_ARCHS = arm64
+get_shared_cache_address: get_shared_cache_address.c
+ $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/get_shared_cache_address
+
+install-get_shared_cache_address: get_shared_cache_address
+ $(CODESIGN) --force --sign - --timestamp=none --identifier=com.apple.get_shared_cache_address $(SYMROOT)/get_shared_cache_address
+ mkdir -p $(INSTALLDIR)
+ cp $(SYMROOT)/get_shared_cache_address $(INSTALLDIR)/
+endif
+
+ifneq ($(PLATFORM),MacOSX)
+EXCLUDED_SOURCES += hvtest_x86.m hvtest_x86_guest.c hvtest_x86_asm.s
+else
+EXCLUDED_SOURCES += hvtest_x86_guest.c hvtest_x86_asm.s
+hvtest_x86: CODE_SIGN_ENTITLEMENTS = hv_public.entitlements
+hvtest_x86: INVALID_ARCHS += arm64e arm64 i386
+hvtest_x86: OTHER_CFLAGS += hvtest_x86_guest.c hvtest_x86_asm.s -framework Hypervisor -framework Foundation
+endif
+
+OTHER_TEST_TARGETS += io_catalog_send_data vm_memory_share_tests
+
+vm_memory_share_tests: INVALID_ARCHS = i386
+vm_memory_share_tests: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
+vm_memory_share_tests: vm_memory_tests_src/main.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c
+ $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@
+ echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
+ env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@;
+
+# build the mach server as individual helper which does not use libdarwintest
+CUSTOM_TARGETS += vm_memory_share_tests_server
+vm_memory_share_tests_server: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist
+vm_memory_share_tests_server: vm_memory_tests_src/server.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c
+ $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/vm_memory_share_tests_server
+ echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@;
+ env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@;
+
+install-vm_memory_share_tests_server: vm_memory_share_tests_server
+ mkdir -p $(INSTALLDIR)
+ cp $(SYMROOT)/vm_memory_share_tests_server $(INSTALLDIR)/
+
+io_catalog_send_data: INVALID_ARCHS = i386
+io_catalog_send_data: OTHER_CFLAGS += -DTEST_UNENTITLED -framework IOKit -framework CoreFoundation -framework Foundation
+
+io_catalog_send_data: iokit/io_catalog_send_data.m
+ $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
+
+ifeq ($(PLATFORM),MacOSX)
+EXCLUDED_SOURCES += vm/kern_max_task_pmem.c
+endif
+
+EXCLUDED_SOURCES += benchmark/helpers.c
+
+perf_vmfault: OTHER_CFLAGS += benchmark/helpers.c
+
+fault_throughput: vm/fault_throughput.c
+ mkdir -p $(SYMROOT)/vm
+ $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/vm/$@
+fault_throughput: OTHER_CFLAGS += benchmark/helpers.c
+
+install-fault_throughput: fault_throughput
+ mkdir -p $(INSTALLDIR)/vm
+ cp $(SYMROOT)/vm/fault_throughput $(INSTALLDIR)/vm/
+
+BATS_PLISTS += $(SRCROOT)/vm/fault_throughput.plist
+
+fault_throughput_benchrun:
+ mkdir -p $(SYMROOT)/vm
+ cp $(SRCROOT)/vm/fault_throughput.lua $(SYMROOT)/vm/fault_throughput.lua
+ chmod +x $(SYMROOT)/vm/fault_throughput.lua
+
+install-fault_throughput_benchrun: fault_throughput_benchrun
+ mkdir -p $(INSTALLDIR)/vm
+ cp $(SYMROOT)/vm/fault_throughput.lua $(INSTALLDIR)/vm
+ chmod +x $(INSTALLDIR)/vm/fault_throughput.lua
+
+CUSTOM_TARGETS += fault_throughput fault_throughput_benchrun
+EXCLUDED_SOURCES += vm/fault_throughput.plist vm/fault_throughput.c
+
+perf_madvise: vm/perf_madvise.c
+ mkdir -p $(SYMROOT)/vm
+ $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/vm/$@
+perf_madvise: OTHER_CFLAGS += benchmark/helpers.c
+install-perf_madvise: perf_madvise
+ mkdir -p $(INSTALLDIR)/vm
+ cp $(SYMROOT)/vm/perf_madvise $(INSTALLDIR)/vm/
+perf_madvise_benchrun:
+ mkdir -p $(SYMROOT)/vm
+ cp $(SRCROOT)/vm/perf_madvise.lua $(SYMROOT)/vm/perf_madvise.lua
+ chmod +x $(SYMROOT)/vm/perf_madvise.lua
+install-perf_madvise_benchrun: perf_madvise_benchrun
+ mkdir -p $(INSTALLDIR)/vm
+ cp $(SYMROOT)/vm/perf_madvise.lua $(INSTALLDIR)/vm
+ chmod +x $(INSTALLDIR)/vm/perf_madvise.lua
+
+CUSTOM_TARGETS += perf_madvise perf_madvise_benchrun
+EXCLUDED_SOURCES += vm/perf_madvise.c
+
+task_create_suid_cred: CODE_SIGN_ENTITLEMENTS = ./task_create_suid_cred_entitlement.plist
+
+OTHER_TEST_TARGETS += task_create_suid_cred_unentitled
+task_create_suid_cred_unentitled: OTHER_CFLAGS += -DUNENTITLED
+task_create_suid_cred_unentitled: task_create_suid_cred.c
+ $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
+
+ioconnectasyncmethod_57641955: OTHER_LDFLAGS += -framework IOKit
+
+ifeq ($(PLATFORM),BridgeOS)
+EXCLUDED_SOURCES += ipsec.m
+else
+ipsec: OTHER_LDFLAGS += -framework Foundation -framework CoreFoundation -framework NetworkExtension
+ipsec: CODE_SIGN_ENTITLEMENTS = ipsec.entitlements
+endif
+
+test_sysctl_kern_procargs_25397314: OTHER_LDFLAGS += -framework Foundation -ldarwintest_utils
+
+INCLUDED_TEST_SOURCE_DIRS += counter
+
+EXCLUDED_SOURCES += counter/common.c
+counter/counter: OTHER_CFLAGS += counter/common.c test_utils.c
+counter/counter: OTHER_LDFLAGS += -ldarwintest_utils -ldarwintest
+
+counter/benchmark: counter/benchmark.c
+ mkdir -p $(SYMROOT)/counter
+ $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@
+ env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@;
+
+counter/benchmark: OTHER_CFLAGS += counter/common.c benchmark/helpers.c
+
+install-counter/benchmark: counter/benchmark
+ mkdir -p $(INSTALLDIR)/counter
+ cp $(SYMROOT)/counter/benchmark $(INSTALLDIR)/counter/
+
+counter/benchmark_benchrun:
+ mkdir -p $(SYMROOT)/counter
+ cp $(SRCROOT)/counter/benchmark.lua $(SYMROOT)/counter/benchmark.lua
+ chmod +x $(SYMROOT)/counter/benchmark.lua
+
+install-counter/benchmark_benchrun: counter/benchmark_benchrun
+ mkdir -p $(INSTALLDIR)/counter
+ cp $(SYMROOT)/counter/benchmark.lua $(INSTALLDIR)/counter/
+ chmod +x $(INSTALLDIR)/counter/benchmark.lua
+
+CUSTOM_TARGETS += counter/benchmark counter/benchmark_benchrun
+EXCLUDED_SOURCES += counter/benchmark.c
+
+ifneq ($(PLATFORM),MacOSX)
+EXCLUDED_SOURCES += vm/page_size_globals.c
+else
+vm/page_size_globals: INVALID_ARCHS = arm64 arm64e
+endif
+
+INCLUDED_TEST_SOURCE_DIRS += lockf_uaf_poc
+