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