Last active
December 14, 2015 10:59
-
-
Save vaiorabbit/5076143 to your computer and use it in GitHub Desktop.
Zopfli (https://code.google.com/p/zopfli/) User API Header and Makefile to build libzopfli.a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# makefile_libzopfli : builds libzopfli.a from library codes. | |
# Usage : | |
# $ make -> libzopfli.a | |
# $ make command -> ./zopfli (test command) | |
SRCS = \ | |
blocksplitter.c \ | |
cache.c \ | |
deflate.c \ | |
gzip_container.c \ | |
hash.c \ | |
katajainen.c \ | |
lz77.c \ | |
squeeze.c \ | |
tree.c \ | |
util.c \ | |
zlib_container.c | |
OBJS = $(SRCS:.c=.o) | |
TARGET = libzopfli.a | |
.c.o: | |
gcc -c -O2 -W -Wall -Wextra -ansi -pedantic -o $@ $< | |
$(TARGET): $(OBJS) | |
ar rsv $@ $^ | |
clean: | |
rm $(OBJS) $(TARGET) | |
command: | |
gcc -c -O2 -W -Wall -Wextra -ansi -pedantic zopfli.c | |
gcc -o zopfli zopfli.o -L. -lzopfli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef ZOPFLI_H_INCLUDED | |
#define ZOPFLI_H_INCLUDED | |
#include "util.h" | |
#include "deflate.h" | |
#include "gzip_container.h" | |
#include "zlib_container.h" | |
#endif /* ZOPFLI_H_INCLUDED */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment