diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-02-12 15:40:39 -0800 |
---|---|---|
committer | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-02-13 10:38:56 -0800 |
commit | 742360812845743f6eb67813fbb97ee60029c45c (patch) | |
tree | e3718d6af2bd3a6b534567e42dd58d27a2e3adec | |
parent | 8601cd3c6555b95698495dd122e2edd9ea031a9f (diff) |
Create standalone target which copies metal source
Don't include .git* files in the copied metal sources.
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
-rw-r--r-- | Makefile | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -171,8 +171,30 @@ $(STANDALONE_DEST): $(STANDALONE_DEST)/%: mkdir -p $@ -# We have to use $$(shell ls ...) in this recipe instead of $$(wildcard) so that we -# pick up $$(BSP_DIR)/install +ifneq ($(INCLUDE_METAL_SOURCES),) + +standalone: \ + $(STANDALONE_DEST) \ + $(STANDALONE_DEST)/bsp \ + $(STANDALONE_DEST)/src \ + $(SRC_DIR) \ + freedom-metal \ + scripts/standalone.mk \ + scripts/libmetal.mk + cp -r $(addprefix $(BSP_DIR)/,$(filter-out build,$(shell ls $(BSP_DIR)))) $</bsp/ + + cp -r freedom-metal $</ + + find $</freedom-metal -name ".git*" | xargs rm + + $(MAKE) -C $(SRC_DIR) clean + cp -r $(SRC_DIR)/* $</src/ + + echo "PROGRAM = $(PROGRAM)" > $</Makefile + cat scripts/standalone.mk >> $</Makefile + cat scripts/libmetal.mk >> $</Makefile + +else standalone: \ $(STANDALONE_DEST) \ $(STANDALONE_DEST)/bsp \ @@ -190,6 +212,7 @@ standalone: \ cat scripts/standalone.mk >> $</Makefile endif endif +endif ############################################################# # MEE Software Compilation |