Fix parallelisation issues in Makefile

Introduces a minor hack, in order to ensure that the tools are built before the Makefile attempts to use any of the tools, even when using ‘make -j’.
This commit is contained in:
Ben10do 2017-06-10 18:21:38 +01:00
parent 848b3ba3ec
commit fc300ab0ee
No known key found for this signature in database
GPG Key ID: DFBC5B504E8D20B9

View File

@ -29,8 +29,15 @@ crystal11_obj := $(crystal_obj:.o=11.o)
roms := pokecrystal.gbc pokecrystal11.gbc roms := pokecrystal.gbc pokecrystal11.gbc
all: crystal all: crystal
crystal: tools pokecrystal.gbc crystal: pokecrystal.gbc
crystal11: tools pokecrystal11.gbc crystal11: pokecrystal11.gbc
# Ensure that the tools are built when making the ROM
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),tools)
Makefile: tools
endif
endif
clean: clean:
rm -f $(roms) $(crystal_obj) $(crystal11_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rm -f $(roms) $(crystal_obj) $(crystal11_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym)