neatvnc/Makefile

32 lines
742 B
Makefile
Raw Normal View History

2019-08-27 19:57:52 +00:00
all: neatvnc
DEPENDENCIES := pixman-1 libpng libuv
2019-08-27 22:29:46 +00:00
CFLAGS := -g -O3 -DNDEBUG -std=gnu11 -D_GNU_SOURCE -Iinc \
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)))
neatvnc: src/server.o src/util.o src/vec.o src/zrle.o src/pngfb.o
$(CC) $^ $(LDFLAGS) -o $@
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-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-27 19:57:52 +00:00
.PHONY: clean
clean:
rm -f neatvnc
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: