]>
Commit | Line | Data |
---|---|---|
db335b3d | 1 | include common/Makefile.common |
2 | ||
bd846386 | 3 | GZIP=gzip |
4 | ||
a79e330d | 5 | all clean: %: bootrom/% armsrc/% client/% recovery/% |
db335b3d | 6 | |
64b81198 | 7 | bootrom/%: FORCE |
8 | $(MAKE) -C bootrom $(patsubst bootrom/%,%,$@) | |
9 | armsrc/%: FORCE | |
10 | $(MAKE) -C armsrc $(patsubst armsrc/%,%,$@) | |
d5be6f7c | 11 | client/%: FORCE |
12 | $(MAKE) -C client $(patsubst client/%,%,$@) | |
a79e330d | 13 | recovery/%: FORCE |
14 | $(MAKE) -C recovery $(patsubst recovery/%,%,$@) | |
64b81198 | 15 | FORCE: # Dummy target to force remake in the subdirectories, even if files exist (this Makefile doesn't know about the prerequisites) |
16 | ||
17 | ||
c2686a49 | 18 | .PHONY: all clean help _test flash-bootrom flash-os flash-fpga flash-both flash-all FORCE |
db335b3d | 19 | help: |
20 | @echo Multi-OS Makefile, you are running on $(DETECTED_OS) | |
21 | @echo Possible targets: | |
64b81198 | 22 | @echo + all - Make bootrom, armsrc and the OS-specific host directory |
33bf54cf | 23 | @echo + client - Make only the OS-specific host directory |
64b81198 | 24 | @echo + flash-bootrom - Make bootrom and flash it |
25 | @echo + flash-os - Make armsrc and flash os | |
c2686a49 | 26 | @echo + flash-fpga - Make armsrc and flash fpga |
64b81198 | 27 | @echo + flash-both - Make armsrc and flash os and fpga image |
28 | @echo + flash-all - Make bootrom and armsrc and flash bootrom, os and fpga image | |
29 | @echo + clean - Clean in bootrom, armsrc and the OS-specific host directory | |
30 | ||
33bf54cf | 31 | client: client/all |
32 | ||
70b1a685 | 33 | flash-bootrom: bootrom/obj/bootrom.elf $(FLASH_TOOL) |
c2686a49 | 34 | $(FLASH_TOOL) -b $(subst /,$(PATHSEP),$<) |
64b81198 | 35 | |
70b1a685 | 36 | flash-os: armsrc/obj/osimage.elf $(FLASH_TOOL) |
c2686a49 | 37 | $(FLASH_TOOL) $(subst /,$(PATHSEP),$<) |
38 | ||
39 | flash-fpga: armsrc/obj/fpgaimage.elf $(FLASH_TOOL) | |
40 | $(FLASH_TOOL) $(subst /,$(PATHSEP),$<) | |
64b81198 | 41 | |
70b1a685 | 42 | flash-both: armsrc/obj/osimage.elf armsrc/obj/fpgaimage.elf $(FLASH_TOOL) |
c2686a49 | 43 | $(FLASH_TOOL) $(subst /,$(PATHSEP),$(filter-out $(FLASH_TOOL),$^)) |
64b81198 | 44 | |
70b1a685 | 45 | flash-all: bootrom/obj/bootrom.elf armsrc/obj/osimage.elf armsrc/obj/fpgaimage.elf $(FLASH_TOOL) |
c2686a49 | 46 | $(FLASH_TOOL) -b $(subst /,$(PATHSEP),$(filter-out $(FLASH_TOOL),$^)) |
52b3d184 | 47 | |
bd846386 | 48 | newtarbin: |
49 | $(DELETE) proxmark3-$(platform)-bin.tar proxmark3-$(platform)-bin.tar.gz | |
50 | @touch proxmark3-$(platform)-bin.tar | |
51 | ||
52 | tarbin: newtarbin client/tarbin armsrc/tarbin bootrom/tarbin | |
53 | $(GZIP) proxmark3-$(platform)-bin.tar | |
54 | ||
52b3d184 | 55 | # Dummy target to test for GNU make availability |
56 | _test: |