-
Notifications
You must be signed in to change notification settings - Fork 71
/
Makefile.gmock
32 lines (20 loc) · 867 Bytes
/
Makefile.gmock
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
30
31
32
# Google-Mock targets
.PHONY: clean-gmock check-gmock
#clean-local: clean-gmock
clean-gmock: clean-gtest
-$(RM) -f $(builddir)/libgmock.a $(builddir)/gmock-all.o
clean-gtest:
-$(RM) -f $(builddir)/gtest-all.o
if HAVE_GMOCK
build-gmock: $(builddir)/libgmock.a
$(builddir)/libgmock.a: $(builddir)/gtest-all.o
$(CXX) -I$(GMOCK_INCLUDEDIR) -I$(GMOCK_SRCDIR) -c $(GMOCK_SRCDIR)/src/gmock-all.cc -o $(builddir)/gmock-all.o
$(AR) -rv $(builddir)/libgmock.a $(builddir)/gmock-all.o $(abs_builddir)/gtest-all.o
build-gtest: $(builddir)/gtest-all.o
$(builddir)/gtest-all.o:
$(CXX) -I$(GTEST_INCLUDEDIR) -I$(GTEST_SRCDIR) -c $(GTEST_SRCDIR)/src/gtest-all.cc -o $(builddir)/gtest-all.o
check-gmock: build-gmock
$(MAKE) $(AM_MAKEFLAGS) -k check
GMOCK_LDFLAGS = $(builddir)/libgmock.a
GMOCK_CLFAGS = -I$(GMOCK_INCLUDEDIR) -I$(GTEST_INCLUDEDIR)
endif # HAVE_GMOCK