aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/make/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/make/Makefile')
-rw-r--r--googletest/make/Makefile18
1 files changed, 6 insertions, 12 deletions
diff --git a/googletest/make/Makefile b/googletest/make/Makefile
index b62da67a..91eb68b5 100644
--- a/googletest/make/Makefile
+++ b/googletest/make/Makefile
@@ -16,9 +16,6 @@
# Remember to tweak this if you move this file.
GTEST_DIR = ..
-# Points to the location of the Google Test libraries
-GTEST_LIB_DIR = .
-
# Where to find user code.
USER_DIR = ../samples
@@ -30,9 +27,6 @@ CPPFLAGS += -isystem $(GTEST_DIR)/include
# Flags passed to the C++ compiler.
CXXFLAGS += -g -Wall -Wextra -pthread -std=c++11
-# Google Test libraries
-GTEST_LIBS = libgtest.a libgtest_main.a
-
# All tests produced by this Makefile. Remember to add new tests you
# created to the list.
TESTS = sample1_unittest
@@ -44,10 +38,10 @@ GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \
# House-keeping build targets.
-all : $(GTEST_LIBS) $(TESTS)
+all : $(TESTS)
clean :
- rm -f $(GTEST_LIBS) $(TESTS) *.o
+ rm -f $(TESTS) gtest.a gtest_main.a *.o
# Builds gtest.a and gtest_main.a.
@@ -67,10 +61,10 @@ gtest_main.o : $(GTEST_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c \
$(GTEST_DIR)/src/gtest_main.cc
-libgtest.a : gtest-all.o
+gtest.a : gtest-all.o
$(AR) $(ARFLAGS) $@ $^
-libgtest_main.a : gtest-all.o gtest_main.o
+gtest_main.a : gtest-all.o gtest_main.o
$(AR) $(ARFLAGS) $@ $^
# Builds a sample test. A test should link with either gtest.a or
@@ -84,5 +78,5 @@ sample1_unittest.o : $(USER_DIR)/sample1_unittest.cc \
$(USER_DIR)/sample1.h $(GTEST_HEADERS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample1_unittest.cc
-sample1_unittest : sample1.o sample1_unittest.o $(GTEST_LIBS)
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -L$(GTEST_LIB_DIR) -lgtest_main -lpthread $^ -o $@
+sample1_unittest : sample1.o sample1_unittest.o gtest_main.a
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@