summaryrefslogtreecommitdiff
path: root/tools/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/Makefile')
-rw-r--r--tools/Makefile73
1 files changed, 73 insertions, 0 deletions
diff --git a/tools/Makefile b/tools/Makefile
new file mode 100644
index 000000000..a53759f70
--- /dev/null
+++ b/tools/Makefile
@@ -0,0 +1,73 @@
+# Tools
+
+# testament rules
+
+clean-testament:
+ $(VQ)echo " CLEAN: testament.h"
+ $(Q)$(RM) $(OBJROOT)/testament.h
+CLEANS += clean-testament
+
+.PHONY: testament
+
+testament $(OBJROOT)/testament.h:
+ $(Q)$(PERL) tools/git-testament.pl $(CURDIR) $(OBJROOT)/testament.h
+
+
+# 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: tools/xxd.c $(TOOLROOT)/created
+ $(VQ)echo "BUILD CC: $@"
+ $(Q)$(BUILD_CC) $(BUILD_CFLAGS) -o $@ $< $(BUILD_LDFLAGS)
+
+
+# Build tool to filter messages
+#
+$(TOOLROOT)/split-messages: tools/split-messages.c $(TOOLROOT)/created
+ $(VQ)echo "BUILD CC: $@"
+ $(Q)$(BUILD_CC) $(BUILD_CFLAGS) -I. -o $@ $< $(BUILD_LDFLAGS) -lz
+
+
+# Build tool to convert image bitmaps to source code.
+#
+$(TOOLROOT)/convert_image: tools/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: tools/convert_font.c $(TOOLROOT)/created
+ $(VQ)echo "BUILD CC: $@"
+ $(Q)$(BUILD_CC) $(BUILD_CFLAGS) -o $@ $<
+
+# idna
+#
+IDNA_UNICODE_MAJOR=11
+
+tools/DerivedJoiningType.txt:
+ curl -o $@ "https://www.unicode.org/Public/$(IDNA_UNICODE_MAJOR).0.0/ucd/extracted/DerivedJoiningType.txt"
+
+tools/IdnaMappingTable.txt:
+ curl -o $@ "https://www.unicode.org/Public/idna/$(IDNA_UNICODE_MAJOR).0.0/IdnaMappingTable.txt"
+
+tools/idna-tables-properties.csv:
+ curl -o $@ "https://www.iana.org/assignments/idna-tables-$(IDNA_UNICODE_MAJOR).0.0/idna-tables-properties.csv"
+
+
+utils/idna_props.h: tools/DerivedJoiningType.txt tools/idna-tables-properties.csv
+ $(VQ)echo " IDNA: $@"
+ $(Q)$(PERL) tools/idna-derived-props-gen.pl -o $@ -p tools/idna-tables-properties.csv -j tools/DerivedJoiningType.txt