From 54e06e7d582b36b8aca463cac5f63e0501c898dc Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 22 Jun 2020 10:06:35 +0100 Subject: move all the build tools to utils move the source and make rules of the convert image and font tools to the utils directory. This puts all the rules for build tools together. --- utils/Makefile | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'utils/Makefile') diff --git a/utils/Makefile b/utils/Makefile index 7b20978ca..a6d2f1248 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -25,14 +25,44 @@ S_UTILS := \ S_UTILS := $(addprefix utils/,$(S_UTILS)) -# Host tool to convert file to comiled data + +# lib png build compiler flags +ifeq ($(HOST),OpenBSD) + BUILD_LIBPNG_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpng) + BUILD_LIBPNG_LDFLAGS += $(shell $(PKG_CONFIG) --libs libpng) +else + ifeq ($(HOST),FreeBSD) + BUILD_LIBPNG_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpng) + BUILD_LIBPNG_LDFLAGS += $(shell $(PKG_CONFIG) --libs libpng) + else + BUILD_LIBPNG_CFLAGS += + BUILD_LIBPNG_LDFLAGS += -lpng + endif +endif + + +# Build tool to convert file to comiled data # $(TOOLROOT)/xxd: utils/xxd.c $(TOOLROOT)/created $(VQ)echo "BUILD CC: $@" $(Q)$(BUILD_CC) $(BUILD_CFLAGS) -o $@ $< $(BUILD_LDFLAGS) -# Host tool to convert file to comiled data + +# Build tool to filter messages # $(TOOLROOT)/split-messages: utils/split-messages.c $(TOOLROOT)/created $(VQ)echo "BUILD CC: $@" $(Q)$(BUILD_CC) $(BUILD_CFLAGS) -o $@ $< $(BUILD_LDFLAGS) -lz + + +# Build tool to convert image bitmaps to source code. +# +$(TOOLROOT)/convert_image: utils/convert_image.c $(TOOLROOT)/created + $(VQ)echo "BUILD CC: $@" + $(Q)$(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_LIBPNG_CFLAGS) -o $@ $< $(BUILD_LDFLAGS) $(BUILD_LIBPNG_LDFLAGS) + + +# Build too to perform font conversion +$(TOOLROOT)/convert_font: utils/convert_font.c $(TOOLROOT)/created + $(VQ)echo "BUILD CC: $@" + $(Q)$(BUILD_CC) $(BUILD_CFLAGS) -o $@ $< -- cgit v1.2.3