[build] rule_for now takes both "local" and "global" parameters

Previous the build would fail on macOS if you had an epsilon.elf file in
at the root of the project. Indeed, the %.elf -> %.bin rule would get
triggered, but this rule should only operate on generated (intermediate)
elf file.
This commit is contained in:
Romain Goyet
2020-04-05 20:20:19 -04:00
committed by LeaNumworks
parent 7d5cad32b1
commit 84f6b179de
6 changed files with 41 additions and 22 deletions

View File

@@ -38,7 +38,8 @@ $(eval $(call rule_for, \
HOSTCC, \
kandinsky/fonts/rasterizer, \
kandinsky/fonts/rasterizer.c $(addprefix ion/src/external/lz4/, lz4.c lz4hc.c), \
$$(HOSTCC) $$(RASTERIZER_CFLAGS) $$^ $$(RASTERIZER_LDFLAGS) -o $$@ \
$$(HOSTCC) $$(RASTERIZER_CFLAGS) $$^ $$(RASTERIZER_LDFLAGS) -o $$@, \
global \
))
RASTERIZER := $(BUILD_DIR)/kandinsky/fonts/rasterizer
@@ -49,7 +50,8 @@ $(call rule_for, \
RASTER, \
kandinsky/fonts/$(1).cpp, \
kandinsky/fonts/$(1).ttf $$(RASTERIZER), \
$$(RASTERIZER) $$< $(2) $(2) $(3) $(4) $(1) $$@ $(if $(HAS_LIBPNG),$$(basename $$@).png) \
$$(RASTERIZER) $$< $(2) $(2) $(3) $(4) $(1) $$@ $(if $(HAS_LIBPNG),$$(basename $$@).png), \
global \
)
endef