neatvnc/Makefile

44 lines
1.1 KiB
Makefile
Raw Normal View History

2019-08-29 22:07:04 +00:00
all: libneatvnc.so
2019-08-27 19:57:52 +00:00
DEPENDENCIES := pixman-1 libpng libuv
2019-08-28 22:46:47 +00:00
CFLAGS := -g -O3 -mavx2 -DNDEBUG -std=gnu11 -D_GNU_SOURCE -Iinc -fvisibility=hidden \
2019-08-27 19:57:52 +00:00
$(foreach dep,$(DEPENDENCIES),$(shell pkg-config --cflags $(dep)))
LDFLAGS := $(foreach dep,$(DEPENDENCIES),$(shell pkg-config --libs $(dep)))
2019-08-28 22:46:47 +00:00
libneatvnc.so.0.0: src/server.o src/util.o src/vec.o src/zrle.o src/pngfb.o
$(CC) -fPIC -shared $^ $(LDFLAGS) -o $@
2019-08-27 19:57:52 +00:00
2019-08-29 22:07:04 +00:00
libneatvnc.so.0: libneatvnc.so.0.0
ln -s $^ $@
libneatvnc.so: libneatvnc.so.0
ln -s $^ $@
2019-08-27 22:29:46 +00:00
zrle-bench: bench/zrle-bench.o src/server.o src/util.o src/vec.o src/zrle.o \
src/pngfb.o
$(CC) $^ $(LDFLAGS) -o $@
2019-08-29 22:07:04 +00:00
examples/png-server: examples/png-server.o src/pngfb.o libneatvnc.so
$(CC) $^ $(LDFLAGS) -L. -lneatvnc -Wl,-rpath=$(shell pwd) -o $@
2019-08-27 19:57:52 +00:00
src/%.o: src/%.c
$(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps
2019-08-27 22:29:46 +00:00
bench/%.o: bench/%.c
$(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps
2019-08-29 22:07:04 +00:00
examples/%.o: examples/%.c
$(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps
2019-08-27 19:57:52 +00:00
.PHONY: clean
clean:
2019-08-29 22:07:04 +00:00
rm -f libneatvnc.so*
2019-08-27 22:29:46 +00:00
rm -f src/*.o src/*.deps bench/*.o bench/*.deps
2019-08-27 19:57:52 +00:00
-include src/*.deps
.SUFFIXES:
.SECONDARY: