diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2019-07-19 20:54:02 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2019-07-19 20:54:02 -0400 |
commit | 4a239c4604e42c838e0b0b68f7f59eb4562484a2 (patch) | |
tree | 37c806bc670669a2aac92e95a1e0f4fb4ca21b63 | |
parent | 20863ac85bcf047feeeba8295d0f9bcecef6f636 (diff) |
Deprecate build_tools.sh
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | INSTALL.md | 6 | ||||
-rw-r--r-- | Makefile | 22 |
3 files changed, 20 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml index bb03c0600..1ff0ad2c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ matrix: - g++-7 env: _="Build" script: - - ./build_tools.sh g++-7 + - make -j2 tools CXX=g++-7 - make -j2 compare - make -j2 modern after_success: diff --git a/INSTALL.md b/INSTALL.md index df7b28354..a76175862 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -13,12 +13,6 @@ Then get the compiler from https://github.com/pret/agbcc and run the following c ./install.sh PATH_OF_POKEEMERALD_DIRECTORY ``` -Then in the pokeemerald directory, build the tools. - -``` -./build_tools.sh -``` - Finally, build the rom. ``` @@ -88,7 +88,7 @@ JSONPROC := tools/jsonproc/jsonproc$(EXE) # Secondary expansion is required for dependency variables in object rules. .SECONDEXPANSION: -.PHONY: rom clean compare tidy +.PHONY: rom clean compare tidy tools mostlyclean clean-tools C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c) C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS)) @@ -112,15 +112,31 @@ SUBDIRS := $(sort $(dir $(OBJS))) AUTO_GEN_TARGETS := +TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*)) +TOOLBASE = $(TOOLDIRS:tools/%=%) +TOOLS = $(foreach tool,$(TOOLBASE),tools/%(tool)/$(tool)$(EXE)) + $(shell mkdir -p $(SUBDIRS)) +all: tools rom + +tools: $(TOOLS) + +$(TOOLS): + @$(foreach tooldir,$(TOOLDIRS),$(MAKE) -C $(tooldir);) + rom: $(ROM) # For contributors to make sure a change didn't affect the contents of the ROM. -compare: $(ROM) +compare: all @$(SHA1) rom.sha1 -clean: tidy +clean: mostlyclean clean-tools + +clean-tools: + @$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);) + +mostlyclean: tidy rm -f sound/direct_sound_samples/*.bin rm -f $(MID_SUBDIR)/*.s find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} + |