mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[ion][escher] Revert previous commit: move inliner back to escher
This commit is contained in:
committed by
EmilieNumworks
parent
4ae39f56fd
commit
ad1ef783ce
@@ -91,3 +91,34 @@ escher_src += $(addprefix escher/src/,\
|
||||
tests_src += $(addprefix escher/test/,\
|
||||
layout_field.cpp\
|
||||
)
|
||||
|
||||
$(eval $(call rule_for, \
|
||||
HOSTCC, \
|
||||
escher/image/inliner, \
|
||||
escher/image/inliner.c $(addprefix ion/src/external/lz4/, lz4.c lz4hc.c), \
|
||||
$$(HOSTCC) -std=c99 `libpng-config --cflags` $$^ `libpng-config --ldflags` -o $$@, \
|
||||
global \
|
||||
))
|
||||
|
||||
INLINER := $(BUILD_DIR)/escher/image/inliner
|
||||
|
||||
.PRECIOUS: $(BUILD_DIR)/%.h $(BUILD_DIR)/%.cpp
|
||||
$(eval $(call rule_for, \
|
||||
INLINER, \
|
||||
%.h %.cpp, \
|
||||
%.png $$(INLINER), \
|
||||
$$(INLINER) $$< $$(basename $$@).h $$(basename $$@).cpp, \
|
||||
global \
|
||||
))
|
||||
|
||||
# Mark a .cpp file as depending on a .png one
|
||||
# This is called with $1 = code.cpp and $2 = image.png
|
||||
# First, we mark code.o as requiring image.o. Rules will take care of inlining
|
||||
# the PNG and building the inlined cpp file. Second, we add the directory
|
||||
# corresponding to the one of code.cpp in the output dir as a header search
|
||||
# path. Since $1 can be a list, we have to map with foreach.
|
||||
define depends_on_image
|
||||
$(call object_for,$(1)): $(call object_for,$(2))
|
||||
$(call object_for,$(1)): SFLAGS += $(foreach d,$(sort $(dir $(call object_for,$(1)))),-I$(d))
|
||||
escher_src += $(2)
|
||||
endef
|
||||
|
||||
32
ion/Makefile
32
ion/Makefile
@@ -11,38 +11,6 @@ ifndef ION_KEYBOARD_LAYOUT
|
||||
endif
|
||||
SFLAGS += -Iion/include/ion/keyboard/$(ION_KEYBOARD_LAYOUT)
|
||||
|
||||
# Image inliner
|
||||
$(eval $(call rule_for, \
|
||||
HOSTCC, \
|
||||
ion/image/inliner, \
|
||||
ion/image/inliner.c $(addprefix ion/src/external/lz4/, lz4.c lz4hc.c), \
|
||||
$$(HOSTCC) -std=c99 `libpng-config --cflags` $$^ `libpng-config --ldflags` -o $$@, \
|
||||
global \
|
||||
))
|
||||
|
||||
INLINER := $(BUILD_DIR)/ion/image/inliner
|
||||
|
||||
.PRECIOUS: $(BUILD_DIR)/%.h $(BUILD_DIR)/%.cpp
|
||||
$(eval $(call rule_for, \
|
||||
INLINER, \
|
||||
%.h %.cpp, \
|
||||
%.png $$(INLINER), \
|
||||
$$(INLINER) $$< $$(basename $$@).h $$(basename $$@).cpp, \
|
||||
global \
|
||||
))
|
||||
|
||||
# Mark a .cpp file as depending on a .png one
|
||||
# This is called with $1 = code.cpp and $2 = image.png
|
||||
# First, we mark code.o as requiring image.o. Rules will take care of inlining
|
||||
# the PNG and building the inlined cpp file. Second, we add the directory
|
||||
# corresponding to the one of code.cpp in the output dir as a header search
|
||||
# path. Since $1 can be a list, we have to map with foreach.
|
||||
define depends_on_image
|
||||
$(call object_for,$(1)): $(call object_for,$(2))
|
||||
$(call object_for,$(1)): SFLAGS += $(foreach d,$(sort $(dir $(call object_for,$(1)))),-I$(d))
|
||||
ion_src += $(2)
|
||||
endef
|
||||
|
||||
include ion/src/$(PLATFORM)/Makefile
|
||||
-include ion/test/$(PLATFORM)/Makefile
|
||||
include ion/src/shared/tools/Makefile
|
||||
|
||||
@@ -26,11 +26,5 @@ ion_src += $(addprefix ion/src/simulator/shared/, \
|
||||
timing.cpp \
|
||||
)
|
||||
|
||||
$(eval $(call depends_on_image,ion/src/simulator/shared/layout.cpp,ion/src/simulator/assets/key_layouts/horizontal_arrow.png))
|
||||
$(eval $(call depends_on_image,ion/src/simulator/shared/layout.cpp,ion/src/simulator/assets/key_layouts/large_squircle.png))
|
||||
$(eval $(call depends_on_image,ion/src/simulator/shared/layout.cpp,ion/src/simulator/assets/key_layouts/round.png))
|
||||
$(eval $(call depends_on_image,ion/src/simulator/shared/layout.cpp,ion/src/simulator/assets/key_layouts/small_squircle.png))
|
||||
$(eval $(call depends_on_image,ion/src/simulator/shared/layout.cpp,ion/src/simulator/assets/key_layouts/vertical_arrow.png))
|
||||
|
||||
include ion/src/simulator/$(TARGET)/Makefile
|
||||
include ion/src/simulator/external/Makefile
|
||||
|
||||
Reference in New Issue
Block a user