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