X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..cb3231590a3c94ab4375e2228bd5e86b0cf1ad7e:/tools/tests/personas/Makefile diff --git a/tools/tests/personas/Makefile b/tools/tests/personas/Makefile index d2c718f39..ba66220c8 100644 --- a/tools/tests/personas/Makefile +++ b/tools/tests/personas/Makefile @@ -1,6 +1,8 @@ include ../Makefile.common CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc) +CODESIGN:=$(shell xcrun -sdk "$(SDKROOT)" -find codesign) +CODESIGN_ALLOCATE:=$(shell xcrun -sdk "$(SDKROOT)" -find codesign_allocate) SYMROOT?=$(shell /bin/pwd) @@ -30,15 +32,21 @@ ARCH_FLAGS := $(if $(ARCH_64), $(ARCH_64_FLAGS)) $(if $(ARCH_32), $(ARCH_32_FLAG DSTROOT?=$(shell /bin/pwd) -TARGETS := persona_mgr persona_spawn persona_test_run.sh +TARGETS := persona_mgr persona_spawn persona_test_run.sh persona_spawn_unentitled all: $(addprefix $(DSTROOT)/, $(TARGETS)) -$(DSTROOT)/persona_%: persona_%.c persona_test.h Makefile +$(DSTROOT)/persona_%: persona_%.c persona_test.h Makefile persona-entitlements.plist ${CC} ${CFLAGS} ${ARCH_FLAGS} -o $(SYMROOT)/$(notdir $@) $< + env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) \ + $(CODESIGN) -s - --entitlements persona-entitlements.plist $(SYMROOT)/$(notdir $@) if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi -$(DSTROOT)/persona_test_run.sh: persona_test_run.sh +$(DSTROOT)/persona_spawn_unentitled: persona_spawn.c persona_test.h Makefile + ${CC} ${CFLAGS} ${ARCH_FLAGS} -o $(SYMROOT)/$(notdir $@) $< + if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi + +$(DSTROOT)/persona_test_run.sh: persona_test_run_src.sh cp $? $@ chmod +x $@