From 6b63776f3d03f8b88d23cedb6fe2a9bd2947d93d Mon Sep 17 00:00:00 2001 From: Benjamin Beasley Date: Tue, 20 Oct 2020 18:05:40 -0400 Subject: Add ZLIB_LIBS and ZLIB_CFLAGS variables to the Makefile to make it easy to control linking against zlib, just as we added ZOPFLI_LIBS and ZOPFLI_CFLAGS for the Zopfli library. --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c377015..4fd80b1 100644 --- a/Makefile +++ b/Makefile @@ -17,19 +17,22 @@ ZOPFLI_LIBS=zopfli/blocksplitter.c \ # with the empty string to avoid finding bundled Zopfli headers. ZOPFLI_CFLAGS=-Izopfli +ZLIB_LIBS=-lz +ZLIB_CFLAGS= + FILES=woff.c all: sfnt2woff-zopfli woff2sfnt-zopfli sfnt2woff-zopfli: sfnt2woff.c $(FILES) Makefile - $(CC) $(CPPFLAGS) $(CFLAGS) $(ZOPFLI_CFLAGS) \ + $(CC) $(CPPFLAGS) $(CFLAGS) $(ZOPFLI_CFLAGS) $(ZLIB_CFLAGS) \ $(FILES) $< -o $@ \ - $(LDFLAGS) $(ZOPFLI_LIBS) -lz -lm + $(LDFLAGS) $(ZOPFLI_LIBS) $(ZLIB_LIBS) -lm woff2sfnt-zopfli: woff2sfnt.c $(FILES) Makefile - $(CC) $(CPPFLAGS) $(CFLAGS) $(ZOPFLI_CFLAGS) \ + $(CC) $(CPPFLAGS) $(CFLAGS) $(ZOPFLI_CFLAGS) $(ZLIB_CFLAGS) \ $(FILES) $< -o $@ \ - $(LDFLAGS) $(ZOPFLI_LIBS) -lz -lm + $(LDFLAGS) $(ZOPFLI_LIBS) $(ZLIB_LIBS) -lm clean: $(RM) -r *.o *.dSYM sfnt2woff-zopfli woff2sfnt-zopfli *.gch *.out -- cgit v1.2.3