aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authors-over-42023-06-16 00:56:35 -0400
committers-over-42023-06-16 00:56:35 -0400
commitcd42ebee104483235d4ad0da9f06cbc381443f44 (patch)
treeee0136d2460762e5d8a8c657ef7ba86b0f6b607f /Makefile
parente398038b94efc2144bb6941f5e95e6557b8ac7f4 (diff)
added some tests, will find a better way to do this in the future :P
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 03085c6..2a1c7f4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+.PHONY: install uninstall clean me a sandwich dev
+
name := halk
cc := cc
flags := -s
@@ -5,6 +7,7 @@ devflags := -g
sources := $(wildcard src/*.c)
sources := $(filter-out src/parser.c, $(sources)) # exclude the incomplete parser for now.
objects := $(sources:.c=.o)
+tests := tests
$(name): $(objects)
$(cc) $(objects) $(flags) -o ./$(name).out
@@ -25,10 +28,13 @@ uninstall:
clean:
rm -f ./$(name).out ./src/*.o
+test:
+ @$(foreach file, $(wildcard $(tests)/*.test.sh), $(file);)
+
+# fun
me:
@[ "$(USER)" = "root" ] && echo "Okay." || echo "What? Make it yourself."
a sandwich:
@exit
-.PHONY: install uninstall clean me a sandwich dev