summaryrefslogtreecommitdiffhomepage
path: root/tests/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 78097ce..1f912c3 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,5 +1,8 @@
include ../common.mk
+UNITTESTS=test-config.cpp \
+ test-storage.cpp
+
CXXFLAGS+=\
-I/usr/src/googletest/googletest/include \
-I/usr/src/googletest/googlemock/include \
@@ -10,11 +13,11 @@ CXXFLAGS+=\
test: unittests
./unittests
-unittests: libgmock.a unittests.o ../config.o ../file.o ../storage.o
+unittests: libgmock.a $(UNITTESTS:.cpp=.o) ../config.o ../file.o ../storage.o
$(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@
-unittests.o: unittests.cpp
- $(CXX) $(CXXFLAGS) -o $@ -c unittests.cpp
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -o $@ -c $<
libgmock.a:
$(CXX) $(CXXFLAGS) -c /usr/src/googletest/googletest/src/gtest-all.cc