Makefile 547 B

123456789101112131415161718192021222324252627282930
  1. TARGET = inject_criticald
  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
  8. .PHONY: all clean
  9. DEBUG ?= 0
  10. ifeq ($(DEBUG), 1)
  11. CFLAGS += -DINJECT_CRITICALD_DEBUG
  12. else
  13. CFLAGS += -O2
  14. endif
  15. all: $(OUTDIR)/$(TARGET)
  16. $(OUTDIR):
  17. mkdir -p $(OUTDIR)
  18. $(OUTDIR)/$(TARGET): *.m | $(OUTDIR)
  19. $(CC) -o $@ $^ -framework Foundation -framework IOKit $(CFLAGS) -F../
  20. $(LDID) -SEnt.plist $@
  21. clean:
  22. rm -f $(OUTDIR)/$(TARGET)