blob: 1f912c343c1a07c35ba5c780f54922d4c5a321ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
include ../common.mk
UNITTESTS=test-config.cpp \
test-storage.cpp
CXXFLAGS+=\
-I/usr/src/googletest/googletest/include \
-I/usr/src/googletest/googlemock/include \
-I/usr/src/googletest/googletest \
-I/usr/src/googletest/googlemock \
-I..
test: unittests
./unittests
unittests: libgmock.a $(UNITTESTS:.cpp=.o) ../config.o ../file.o ../storage.o
$(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@
%.o: %.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
libgmock.a:
$(CXX) $(CXXFLAGS) -c /usr/src/googletest/googletest/src/gtest-all.cc
$(CXX) $(CXXFLAGS) -c /usr/src/googletest/googlemock/src/gmock-all.cc
$(CXX) $(CXXFLAGS) -c /usr/src/googletest/googlemock/src/gmock_main.cc
ar -rv libgmock.a gmock-all.o gtest-all.o gmock_main.o
clean:
-rm -f *.o *.a unittests
|