make: require PM_HEADER_REBUILD=1 to watch header files

This commit is contained in:
Alex Bates 2020-08-15 00:12:41 +01:00
parent eb3ef759d7
commit c5d43629f3
2 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,11 @@ STAR_ROD_STRUCT_DIRS := tools/star-rod/database/structs/ram tools/star-rod/datab
# Source code files
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c))
S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s))
H_FILES := $(foreach dir,$(INCLUDE_DIRS),$(wildcard $(dir)/*.h))
ifdef PM_HEADER_REBUILD
H_FILES := $(foreach dir,$(INCLUDE_DIRS),$(wildcard $(dir)/*.h))
else
H_FILES := []
endif
DATA_FILES := $(foreach dir,$(DATA_DIRS),$(wildcard $(dir)/*.bin))
COMPRESSED_FILES := $(foreach dir,$(COMPRESSED_DIRS),$(wildcard $(dir)/*.yay0))
MAP_FILES := $(foreach dir,$(MAP_DIRS),$(wildcard $(dir)/*.FS))

View File

@ -30,6 +30,7 @@ run `make setup` to set up tools and extract the rom
### Make
run `make` to rebuild the rom. Get `OK`? If so, you're all set! Otherwise, please feel free to reach out to us in the discord.
Use `PM_HEADER_REBUILD=1 make` to rebuild C sources when any header files change.
## FAQ
* If you received the following error when running `make setup`: