commit 594aedf2b7f995b1d0264f3dfa7bde3aff96f56b
Author: jtothebell <j.to.the.bell@gmail.com>
AuthorDate: Sat Aug 22 19:33:14 2020 -0600
Commit: jtothebell <j.to.the.bell@gmail.com>
CommitDate: Tue Sep 15 17:09:08 2020 -0600
Clean up tests makefile
---
.gitignore | 3 ++-
test/Makefile | 35 +++++++++++++++++++++++------------
2 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
index 07ec38b..c8924f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,5 @@ bin/
.vscode/
build/
-test/testexec.a
+test/testrunner.a
+test/*.o
diff --git a/test/Makefile b/test/Makefile
index 4829e85..e518f6d 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,14 +1,25 @@
- .PHONY: all buildtests runtests clean
-
- all: buildtests runtests
-
- buildtests:
- g++ testroot.cpp \
- fontdatatests.cpp ../source/fontdata.cpp \
- -o testexec.a
-
-runtests:
- ./testexec.a
+CFLAGS := -Wall -g -c
+
+
+all: runtests
+
+
+testrunner.a: testroot.o fontdatatests.o
+ g++ testroot.o \
+ fontdata.o fontdatatests.o \
+ -o testrunner.a
+
+testroot.o: testroot.cpp
+ g++ $(CFLAGS) testroot.cpp
+
+fontdatatests.o: fontdatatests.cpp ../source/fontdata.cpp
+ g++ $(CFLAGS) fontdatatests.cpp ../source/fontdata.cpp
+
+
+runtests: testrunner.a
+ ./testrunner.a
clean:
- rm testexec.a
\ No newline at end of file
+ -rm -f testrunner.a *.o
+
+.PHONY: all buildtests runtests clean
\ No newline at end of file