about summary refs log tree commit diff stats
path: root/tests/Makefile
diff options
context:
space:
mode:
authorlatex <latex@disroot.org>2023-01-26 00:46:22 +0100
committerlatex <latex@disroot.org>2023-01-26 00:46:22 +0100
commitb5325740444bcc8bfcd5a02f2ef9026589ba8d49 (patch)
tree20b62c0455fb9946e6244088d47641398039e1aa /tests/Makefile
parent170025ac5d96f1c46483a88ca4372254a5da6161 (diff)
downloadlibumumble-b5325740444bcc8bfcd5a02f2ef9026589ba8d49.tar.gz
fix API, fix Makefile, add unit tests
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..bc757bf
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,19 @@
+include ../config.mk
+INCLUDES = -I../include
+
+SRC = $(shell find -type f -name '*.c')
+BIN = $(SRC:%.c=%)
+
+LDLIBS = -luv -l:libumumble.a
+LDFLAGS = -L..
+
+.PHONY: all
+
+all: $(BIN)
+
+$(BIN): $(SRC)
+	mkdir -p '$(BUILD_DIR)'
+	$(CC) -o $(BUILD_DIR)/$@ $(CFLAGS) $(INCLUDES) $(@:%=%.c) $(LDFLAGS) $(LDLIBS)
+
+clean:
+	rm -rf $(BUILD_DIR)