From f3dd5def39fb42ebddba52507a4aa1fd7eaa2e1e Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Sun, 8 Sep 2019 16:33:06 +0800 Subject: [PATCH] apps,litenes,Makefile: add rules for generating ROM source files * The shell commands are evaluated before rule execution. If we run `make` for the first time, the `$SRCS` will not include the ROM source files, which leads to linking error. * Now we add a rule to first manually generate the ROM source files. --- apps/litenes/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/litenes/Makefile b/apps/litenes/Makefile index 6b4993f6..5a9d47ae 100644 --- a/apps/litenes/Makefile +++ b/apps/litenes/Makefile @@ -1,8 +1,9 @@ NAME := litenes SRCS := $(shell find -L ./src/ -name "*.c") ROMS := $(shell find -L ./src/ -name "*.nes") -PREBUILD := src/roms/gen/roms.h +PREBUILD := rom include $(AM_HOME)/Makefile.app -src/roms/gen/roms.h: $(ROMS) - @cd src/roms && python3 build-roms.py \ No newline at end of file +.PHONY: rom +rom: $(ROMS) + @cd src/roms && python3 build-roms.py