aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar Michael Stapelberg <stapelbergusersnoreplygithubcom>2016-07-02 19:16:42 +0200
committerLibravatarLarge Libravatar GitHub <noreplygithubcom>2016-07-02 19:16:42 +0200
commit3ec64d1bf41ddbb63ec52016c5d33697f700e342 (patch)
tree5472ed78fe9a4fb9872e16aa6935faa8cda01fb4 /Makefile
parent34124c104895c5efeceae88d9febc1e7731bb047 (diff)
downloadsfnt2woff-zopfli-3ec64d1bf41ddbb63ec52016c5d33697f700e342.tar.gz
sfnt2woff-zopfli-3ec64d1bf41ddbb63ec52016c5d33697f700e342.tar.bz2
sfnt2woff-zopfli-3ec64d1bf41ddbb63ec52016c5d33697f700e342.tar.lz
sfnt2woff-zopfli-3ec64d1bf41ddbb63ec52016c5d33697f700e342.zip

Link with -lm for log()

Without this change, I’m getting the following error:

cc  blocksplitter.c cache.c deflate.c gzip_container.c hash.c katajainen.c lz77.c squeeze.c tree.c util.c zlib_container.c zopfli_lib.c woff.c sfnt2woff.c -o sfnt2woff-zopfli -lz
/tmp/ccMWhalm.o: In function `ZopfliCalculateEntropy':
tree.c:(.text+0x290): undefined reference to `log'
tree.c:(.text+0x2c7): undefined reference to `log'
tree.c:(.text+0x375): undefined reference to `log'
collect2: error: ld returned 1 exit status
Makefile:6: recipe for target 'sfnt2woff-zopfli' failed
make: *** [sfnt2woff-zopfli] Error 1

The manpage log(3) mentions “Link with -lm.”, which this change does.

Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8d04e29..cb2577a 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,10 @@ FILES=blocksplitter.c cache.c deflate.c gzip_container.c hash.c katajainen.c lz7
all: sfnt2woff-zopfli woff2sfnt-zopfli
sfnt2woff-zopfli: sfnt2woff.c $(FILES) Makefile
- $(CC) $(LDFLAGS) $(FILES) $< -o $@ -lz
+ $(CC) $(LDFLAGS) $(FILES) $< -o $@ -lz -lm
woff2sfnt-zopfli: woff2sfnt.c $(FILES) Makefile
- $(CC) $(LDFLAGS) $(FILES) $< -o $@ -lz
+ $(CC) $(LDFLAGS) $(FILES) $< -o $@ -lz -lm
clean:
$(RM) -r *.o *.dSYM sfnt2woff-zopfli woff2sfnt-zopfli *.gch *.out