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.
Benjamin Beasley authored 3 years ago
Paride Legovini committed 1 year, 10 months ago
16 | 16 | # with the empty string to avoid finding bundled Zopfli headers. |
17 | 17 | ZOPFLI_CFLAGS=-Izopfli |
18 | 18 | |
19 | ZLIB_LIBS=-lz | |
20 | ZLIB_CFLAGS= | |
21 | ||
19 | 22 | FILES=woff.c |
20 | 23 | |
21 | 24 | all: sfnt2woff-zopfli woff2sfnt-zopfli |
22 | 25 | |
23 | 26 | sfnt2woff-zopfli: sfnt2woff.c $(FILES) Makefile |
24 | $(CC) $(CPPFLAGS) $(CFLAGS) $(ZOPFLI_CFLAGS) \ | |
27 | $(CC) $(CPPFLAGS) $(CFLAGS) $(ZOPFLI_CFLAGS) $(ZLIB_CFLAGS) \ | |
25 | 28 | $(FILES) $< -o $@ \ |
26 | $(LDFLAGS) $(ZOPFLI_LIBS) -lz -lm | |
29 | $(LDFLAGS) $(ZOPFLI_LIBS) $(ZLIB_LIBS) -lm | |
27 | 30 | |
28 | 31 | woff2sfnt-zopfli: woff2sfnt.c $(FILES) Makefile |
29 | $(CC) $(CPPFLAGS) $(CFLAGS) $(ZOPFLI_CFLAGS) \ | |
32 | $(CC) $(CPPFLAGS) $(CFLAGS) $(ZOPFLI_CFLAGS) $(ZLIB_CFLAGS) \ | |
30 | 33 | $(FILES) $< -o $@ \ |
31 | $(LDFLAGS) $(ZOPFLI_LIBS) -lz -lm | |
34 | $(LDFLAGS) $(ZOPFLI_LIBS) $(ZLIB_LIBS) -lm | |
32 | 35 | |
33 | 36 | clean: |
34 | 37 | $(RM) -r *.o *.dSYM sfnt2woff-zopfli woff2sfnt-zopfli *.gch *.out |