Makefile 791 B

1234567891011121314151617181920212223242526272829303132333435
  1. TARGET = jailbreakd
  2. OUTDIR ?= bin
  3. CC = xcrun -sdk appletvos cc -arch arm64
  4. LDID = ldid
  5. CFLAGS = -Wall -Wno-unused-variable -Wno-unused-function
  6. .PHONY: all clean
  7. all: $(OUTDIR)/$(TARGET)
  8. DEBUG ?= 1
  9. ifeq ($(DEBUG), 1)
  10. CFLAGS += -DJAILBREAKDDEBUG
  11. else
  12. CFLAGS += -O2
  13. endif
  14. mach/jailbreak_daemonServer.c:
  15. rm -f mach/jailbreak_daemonServer.c
  16. rm -f mach/jailbreak_daemonUser.c
  17. mig -sheader mach/jailbreak_daemonServer.h -header mach/jailbreak_daemonUser.h mach/mig.defs
  18. mv jailbreak_daemonServer.c mach/
  19. mv jailbreak_daemonUser.c mach/
  20. $(OUTDIR):
  21. mkdir -p $(OUTDIR)
  22. $(OUTDIR)/$(TARGET): mach/jailbreak_daemonServer.c *.c *.m | $(OUTDIR)
  23. $(CC) -o $@ $^ -framework Foundation -framework IOKit $(CFLAGS) -F..
  24. $(LDID) -SEnt.plist $@
  25. clean:
  26. rm -f $(OUTDIR)/$(TARGET)