aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-02-28 13:05:24 -0500
committerSam Anthony <sam@samanthony.xyz>2025-02-28 13:05:24 -0500
commit1ff716ddb9b2ad508e583a10b0c0090ce8d1634d (patch)
treed34aac66fbcd954554fdf93f18355f7c1e353e5c /Makefile
parentd8b658e75bc6165e059a13cb2fef5474fa9ff4f5 (diff)
downloadvolute-1ff716ddb9b2ad508e583a10b0c0090ce8d1634d.zip
angular speed tests
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 7e99a41..ec8d58b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
-CFLAGS = -std=c99 -Wall -Wextra -pedantic -Wno-deprecated-declarations
+CFLAGS = -std=c99 -Wall -Wextra -pedantic -Wno-deprecated-declarations -D_XOPEN_SOURCE=700L
LDFLAGS = -lSDL2 -lSDL2_ttf
-SRC = main.c microui.c renderer.c widget.c ui.c
+SRC = main.c microui.c renderer.c widget.c ui.c unit.c
OBJ = ${SRC:.c=.o}
all: volute
@@ -9,10 +9,18 @@ all: volute
clean:
rm -f volute *.o
+test: test_unit
+ for t in $^; do \
+ ./$$t; \
+ done
+
+test_unit: test_unit.o unit.o
+ ${CC} -o $@ $^ ${LDFLAGS}
+
volute: ${OBJ}
${CC} -o $@ $^ ${LDFLAGS}
%.o: %.c
${CC} -c ${CFLAGS} $<
-${OBJ}: microui.h renderer.h widget.h ui.h
+${OBJ}: microui.h renderer.h widget.h ui.h unit.h