mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
fix make 3.81
the shell newline capture doesnt work in 3.81, so that's gone
This commit is contained in:
parent
ea8aaeb8e3
commit
346a6f8dcb
28
Makefile
28
Makefile
@ -52,34 +52,26 @@ tools:
|
|||||||
$(MAKE) -C tools/
|
$(MAKE) -C tools/
|
||||||
|
|
||||||
|
|
||||||
# Prevents $(shell) from filtering out newlines.
|
$(crystal11_obj): RGBASMFLAGS = -D CRYSTAL11
|
||||||
define shell2 =
|
|
||||||
$(foreach line,\
|
# The dep rules have to be explicit or else missing files won't be reported.
|
||||||
$(shell $1 | sed "s/ /{space}/g"),\
|
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
|
||||||
$(info $(shell echo $(line) | sed "s/{space}/ /g")))
|
# It doesn't look like $(shell) can be deferred so there might not be a better way.
|
||||||
|
define DEP
|
||||||
|
$1: $2 $$(shell tools/scan_includes $2)
|
||||||
|
$$(RGBASM) $$(RGBASMFLAGS) -o $$@ $$<
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Build tools when building the rom.
|
# Build tools when building the rom.
|
||||||
# This has to happen before the rules are processed, since that's when scan_includes is run.
|
# This has to happen before the rules are processed, since that's when scan_includes is run.
|
||||||
ifeq (,$(filter clean tools,$(MAKECMDGOALS)))
|
ifeq (,$(filter clean tools,$(MAKECMDGOALS)))
|
||||||
$(call shell2, $(MAKE) -C tools/)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
$(info $(shell $(MAKE) -C tools))
|
||||||
|
|
||||||
# The dep rules have to be explicit or else missing files won't be reported.
|
|
||||||
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
|
|
||||||
# It doesn't look like $(shell) can be deferred so there might not be a better way.
|
|
||||||
define DEP =
|
|
||||||
$1: $$(shell tools/scan_includes $2)
|
|
||||||
endef
|
|
||||||
$(foreach obj, $(crystal11_obj), $(eval $(call DEP,$(obj),$(obj:11.o=.asm))))
|
$(foreach obj, $(crystal11_obj), $(eval $(call DEP,$(obj),$(obj:11.o=.asm))))
|
||||||
$(foreach obj, $(crystal_obj), $(eval $(call DEP,$(obj),$(obj:.o=.asm))))
|
$(foreach obj, $(crystal_obj), $(eval $(call DEP,$(obj),$(obj:.o=.asm))))
|
||||||
|
|
||||||
%11.o: %.asm
|
endif
|
||||||
$(RGBASM) -D CRYSTAL11 -o $@ $<
|
|
||||||
|
|
||||||
%.o: %.asm
|
|
||||||
$(RGBASM) -o $@ $<
|
|
||||||
|
|
||||||
|
|
||||||
pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
|
pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
|
||||||
|
Loading…
Reference in New Issue
Block a user