aboutsummaryrefslogtreecommitdiff
path: root/src/test/Makefile
diff options
context:
space:
mode:
authorYour Name <you@example.com>2022-02-18 20:35:38 -0500
committerYour Name <you@example.com>2022-02-18 20:35:38 -0500
commit55d58a16e2511741cc625e203205dec86144faf3 (patch)
tree311be7e5fbaf1bc8ece47dd4261af053f2da1c7c /src/test/Makefile
parentaa9dabdeaead3c8b1b11f9d4f321265c439bfbfc (diff)
downloadlibbible-55d58a16e2511741cc625e203205dec86144faf3.tar.gz
libbible-55d58a16e2511741cc625e203205dec86144faf3.tar.bz2
libbible-55d58a16e2511741cc625e203205dec86144faf3.zip
Reorganized repository layout
Diffstat (limited to 'src/test/Makefile')
-rw-r--r--src/test/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/Makefile b/src/test/Makefile
new file mode 100644
index 0000000..1f8bc8b
--- /dev/null
+++ b/src/test/Makefile
@@ -0,0 +1,20 @@
+LIBS = sword minizip
+override CXXFLAGS += -MMD -Wall -fPIC -std=c++20 `pkg-config $(LIBS) --cflags`
+override LDFLAGS += -lstdc++fs `pkg-config $(LIBS) --libs` -lcppunit ../../libbible.so
+SOURCES = $(wildcard *.cc)
+OBJECTS = $(SOURCES:.cc=.o)
+DEPS = $(OBJECTS:.o=.d)
+TEST = testLibbible
+
+$(TEST): $(OBJECTS)
+ $(CXX) $(OBJECTS) -o $@ $(LDFLAGS)
+
+-include $(DEPS)
+
+.PHONY: test
+test: $(TEST)
+ ./$(TEST)
+
+.PHONY: clean
+clean:
+ $(RM) $(OBJECTS) $(DEPS) $(TEST)