diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 15:03:42 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 15:03:42 -0500 |
| commit | 24f0677b76ba5be7114031f2d6d6746dcb64ce55 (patch) | |
| tree | 8db568429667f9b6637916267a8ee484e87020a1 /Makefile | |
| parent | 4835ce7a09dc9012539c33b602e581057d945151 (diff) | |
| download | volute-24f0677b76ba5be7114031f2d6d6746dcb64ce55.zip | |
refactor tests
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -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 |