Makefile 531 B

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