Use miniz instead of zlib

tight-png
Andri Yngvason 2019-08-31 15:50:23 +00:00
parent 12849af748
commit f7ed6b6fce
2 changed files with 9 additions and 4 deletions

View File

@ -2,12 +2,14 @@ all: libneatvnc.so
DEPENDENCIES := pixman-1 libpng libuv 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))) $(foreach dep,$(DEPENDENCIES),$(shell pkg-config --cflags $(dep)))
LDFLAGS := $(foreach dep,$(DEPENDENCIES),$(shell pkg-config --libs $(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 $@ $(CC) -fPIC -shared $^ $(LDFLAGS) -o $@
libneatvnc.so.0: libneatvnc.so.0.0 libneatvnc.so.0: libneatvnc.so.0.0
@ -17,7 +19,7 @@ libneatvnc.so: libneatvnc.so.0
ln -s $^ $@ ln -s $^ $@
zrle-bench: bench/zrle-bench.o src/server.o src/util.o src/vec.o src/zrle.o \ 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 $@ $(CC) $^ $(LDFLAGS) -o $@
examples/png-server: examples/png-server.o src/pngfb.o libneatvnc.so 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 src/%.o: src/%.c
$(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps $(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 bench/%.o: bench/%.c
$(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps $(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps

View File

@ -3,13 +3,13 @@
#include "util.h" #include "util.h"
#include "vec.h" #include "vec.h"
#include "zrle.h" #include "zrle.h"
#include "miniz.h"
#include <stdint.h> #include <stdint.h>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <endian.h> #include <endian.h>
#include <assert.h> #include <assert.h>
#include <zlib.h>
#include <uv.h> #include <uv.h>
#include <pixman.h> #include <pixman.h>