From 0330796a5a2eed9038c9d32ed719fffa11303d03 Mon Sep 17 00:00:00 2001 From: Elias Kohout Date: Wed, 15 Mar 2023 16:15:50 +0100 Subject: [PATCH] Added makefile. --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5c6e9df --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +test: target/test + ./target/test + +build: target/build/tensor.o + +target/test: target/build/tests/test_tensor.o target/build/tests/main.o target/build/tensor.o + cc $^ -o target/test + +target/build/tests/main.o: tests/main.c + cc -c $? -o $@ -pedantic -Wall -Wextra + +target/build/tests/test_tensor.o: tests/test_tensor.c + cc -c $? -o $@ -pedantic -Wall -Wextra + +target/build/tensor.o: tensor.c + cc -c $? -o $@ -pedantic -Wall -Wextra + +init: + mkdir -p ./target/build/tests + +clean: + rm -f ./target/build/*.o + rm -f ./target/test