Use miniz instead of zlib
parent
12849af748
commit
f7ed6b6fce
11
Makefile
11
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
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
#include "util.h"
|
||||
#include "vec.h"
|
||||
#include "zrle.h"
|
||||
#include "miniz.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <endian.h>
|
||||
#include <assert.h>
|
||||
#include <zlib.h>
|
||||
#include <uv.h>
|
||||
#include <pixman.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue