From 1414a2690bb85d2e544e7720ff261572d0f96072 Mon Sep 17 00:00:00 2001 From: Lucas Cimon Date: Thu, 31 Dec 2015 09:20:31 +0100 Subject: [PATCH] Definining __STDC_FORMAT_MACROS to support old gcc versions + explicitly raising an error when Brotli submodule is not initialized - cf. issue #19 --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4620278..8776089 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CPPFLAGS = -I./brotli/dec/ -I./brotli/enc/ -I./src CC ?= gcc CXX ?= g++ -COMMON_FLAGS = -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN +COMMON_FLAGS = -fno-omit-frame-pointer -no-canonical-prefixes -DFONT_COMPRESSION_BIN -D __STDC_FORMAT_MACROS ifeq ($(OS), Darwin) CPPFLAGS += -DOS_MACOSX @@ -30,6 +30,10 @@ EXECUTABLES=woff2_compress woff2_decompress EXE_OBJS=$(patsubst %, $(SRCDIR)/%.o, $(EXECUTABLES)) +ifeq (,$(wildcard $(BROTLI)/*)) + $(error Brotli dependency not found : you must initialize the Git submodule) +endif + all : $(OBJS) $(EXECUTABLES) $(EXECUTABLES) : $(EXE_OBJS) deps