From 46addff198a13e733578842ad54142f6d9d53863 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Tue, 27 Aug 2019 19:57:52 +0000 Subject: [PATCH] Add Makefile --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..88b26a2 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +all: neatvnc + +DEPENDENCIES := pixman-1 libpng libuv + +CFLAGS := -g -O0 -std=gnu11 -D_GNU_SOURCE -Iinc \ + $(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 $@ + +src/%.o: src/%.c + $(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $@.deps + +.PHONY: clean +clean: + rm -f neatvnc + rm -f src/*.o src/*.deps + +-include src/*.deps + +.SUFFIXES: +.SECONDARY: