Makefile 599 B

123456789101112131415161718192021222324252627282930
  1. TARGET = pspawn_payload.dylib
  2. OUTDIR ?= bin
  3. CC = xcrun -sdk appletvos cc -arch arm64
  4. # it is injected into trust cache by code
  5. # which only supports sha-256 signatures
  6. LDID = ldid2
  7. CFLAGS = -Wall -I./apple_include
  8. .PHONY: all clean
  9. all: $(OUTDIR)/$(TARGET)
  10. DEBUG ?= 1
  11. ifeq ($(DEBUG), 1)
  12. CFLAGS += -DPSPAWN_PAYLOAD_DEBUG
  13. else
  14. CFLAGS += -O2
  15. endif
  16. $(OUTDIR):
  17. mkdir -p $(OUTDIR)
  18. $(OUTDIR)/$(TARGET): mach/jailbreak_daemonUser.c pspawn_payload.m fishhook.c | $(OUTDIR)
  19. $(CC) -dynamiclib -o $@ $^ -framework Foundation $(CFLAGS)
  20. $(LDID) -S $@
  21. clean:
  22. rm -f $(OUTDIR)/$(TARGET)