Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Commit

Permalink
apps,litenes,Makefile: add rules for generating ROM source files
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
sashimi-yzh committed Sep 8, 2019
1 parent 08f7b63 commit 20d65e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/litenes/Makefile
Original file line number Diff line number Diff line change
@@ -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
.PHONY: rom
rom: $(ROMS)
@cd src/roms && python3 build-roms.py

0 comments on commit 20d65e7

Please sign in to comment.