diff --git a/Makefile b/Makefile index 9a5ed39..c306ede 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,14 @@ all: libneatvnc.so DEPENDENCIES := pixman-1 libpng libuv -CFLAGS := -g -O3 -mavx2 -DNDEBUG -std=gnu11 -D_GNU_SOURCE -Iinc -fvisibility=hidden \ +CFLAGS := -g -O3 -mavx -DNDEBUG -std=gnu11 -D_GNU_SOURCE -Iinc \ + -fvisibility=hidden -Icontrib/miniz \ $(foreach dep,$(DEPENDENCIES),$(shell pkg-config --cflags $(dep))) LDFLAGS := $(foreach dep,$(DEPENDENCIES),$(shell pkg-config --libs $(dep))) -libneatvnc.so.0.0: src/server.o src/util.o src/vec.o src/zrle.o src/pngfb.o +libneatvnc.so.0.0: src/server.o src/util.o src/vec.o src/zrle.o src/pngfb.o \ + src/miniz.o $(CC) -fPIC -shared $^ $(LDFLAGS) -o $@ libneatvnc.so.0: libneatvnc.so.0.0 @@ -17,7 +19,7 @@ libneatvnc.so: libneatvnc.so.0 ln -s $^ $@ zrle-bench: bench/zrle-bench.o src/server.o src/util.o src/vec.o src/zrle.o \ - src/pngfb.o + src/pngfb.o src/miniz.o $(CC) $^ $(LDFLAGS) -o $@ examples/png-server: examples/png-server.o src/pngfb.o libneatvnc.so @@ -26,6 +28,9 @@ examples/png-server: examples/png-server.o src/pngfb.o libneatvnc.so src/%.o: src/%.c $(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps +src/miniz.o: contrib/miniz/miniz.c + $(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps + bench/%.o: bench/%.c $(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps diff --git a/src/zrle.c b/src/zrle.c index c4297b7..2ca9e55 100644 --- a/src/zrle.c +++ b/src/zrle.c @@ -3,13 +3,13 @@ #include "util.h" #include "vec.h" #include "zrle.h" +#include "miniz.h" #include #include #include #include #include -#include #include #include