aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 11 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 37303d1..485a08a 100644
--- a/Makefile
+++ b/Makefile
@@ -3,24 +3,23 @@ LDFLAGS = -lSDL2 -lSDL2_ttf
SRC = main.c microui.c renderer.c widget.c ui.c unit.c engine.c
OBJ = ${SRC:.c=.o}
+HDR = microui.h renderer.h widget.h ui.h unit.h engine.h
-all: volute
+TEST_SRC = test.c test_angular_speed.c test_volume.c unit.c
+TEST_OBJ = ${TEST_SRC:.c=.o}
-clean:
- rm -f volute *.o
-
-test: test_unit
- for t in $^; do \
- ./$$t; \
- done
-
-test_unit: test_unit.o unit.o
+volute: ${OBJ}
${CC} -o $@ $^ ${LDFLAGS}
-volute: ${OBJ}
+test: ${TEST_OBJ}
${CC} -o $@ $^ ${LDFLAGS}
+ ./$@
+
+clean:
+ rm -f volute test *.o
%.o: %.c
${CC} -c ${CFLAGS} $<
-${OBJ}: microui.h renderer.h widget.h ui.h unit.h engine.h
+${OBJ}: ${HDR}
+${TEST_OBJ}: ${HDR} test.h