[escher] Use the inliner to convert PNGs to .h/.cpp

Change-Id: Iabf6850e6a413f8c02768776887d1566c2ecb48c
This commit is contained in:
Romain Goyet
2016-09-27 14:03:29 +02:00
parent 4101110f20
commit 93784423ef
2 changed files with 18 additions and 1 deletions

View File

@@ -61,8 +61,8 @@ endif
include ion/Makefile
include kandinsky/Makefile
include poincare/Makefile
include escher/Makefile
include apps/Makefile
include escher/Makefile # Escher should be included after apps as it needs to know which images to inline
include quiz/Makefile # Quiz should be included at the end
dependencies = $(objs:.o=.d)

View File

@@ -27,3 +27,20 @@ objs += $(addprefix escher/src/,\
view_controller.o\
window.o\
)
INLINER := escher/image/inliner
$(INLINER): escher/image/inliner.c
@echo "HOSTCC $@"
@$(HOSTCC) `libpng-config --cflags` `libpng-config --ldflags` $< -o $@
inline_image_headers := $(inline_images:.png=.h)
inline_image_sources := $(inline_images:.png=.cpp)
inline_image_objs := $(inline_images:.png=.o)
$(inline_image_sources) : %.cpp : %.png $(INLINER)
@echo "INLINER $@"
@$(INLINER) $<
objs += $(inline_image_objs)
products += $(INLINER) $(inline_image_headers) $(inline_image_sources)