aboutsummaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 0000000..d9b319d
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,25 @@
+# See LICENSE file for copyright and license details.
+
+NAME = tests
+CC = cc
+SRC != find * -name '*.c'
+OBJ = ${SRC:.c=.o}
+
+LIB = x11 utils log
+
+CFLAGS != pkg-config --cflags ${LIB}
+LFLAGS != pkg-config --libs ${LIB}
+
+CFLAGS += -I../build/include
+LFLAGS += ../build/debug/static/libcherry.a
+
+all: init-lib ${OBJ} ${NAME}
+
+.c.o:
+ ${CC} ${CFLAGS} -c $< -o $@
+
+init-lib:
+ cd ../ && make debug-static
+
+${NAME}:
+ ${CC} ${LFLAGS} ${OBJ} -o $@