Makefile 581 B

1234567891011121314151617181920212223242526272829
  1. TARGET = basebinaries.tar
  2. OUTDIR ?= bin
  3. .PHONY: all clean
  4. SUBPRJ = amfid_payload inject_criticald jailbreakd jailbreakd_client pspawn_payload libjailbreak_mig helloworld createSnapshot
  5. all: $(OUTDIR)/$(TARGET)
  6. MFLAGS = OUTDIR=$(abspath $(OUTDIR))
  7. DEBUG ?= 0
  8. ifeq ($(DEBUG), 1)
  9. MFLAGS += DEBUG=1
  10. endif
  11. $(OUTDIR):
  12. mkdir -p $(OUTDIR)
  13. $(OUTDIR)/$(TARGET): $(addprefix $(OUTDIR)/, $(SUBPRJ)) | $(OUTDIR)
  14. #tar -cvf $@ $^
  15. rm -f $@
  16. cd $(OUTDIR); gtar -pcvf $(abspath $@) $(notdir bin/*)
  17. $(OUTDIR)/%: | $(OUTDIR)
  18. $(MAKE) -C $(notdir $@) $(MFLAGS)
  19. clean:
  20. rm -rf $(OUTDIR)