????????????
????>echo $(gtest-config --cppflags --cxxflags)
??????
????echo $(gtest-config --ldflags --libs)
??????????gtest?????????·????????·????
????cxy-/home/chenxueyou/gtest$ echo $(gtest-config --cppflags --cxxflags)
????-I/usr/include -pthread
????cxy-/home/chenxueyou/gtest$ echo $(gtest-config --ldflags --libs)
????-L/usr/lib64 -lgtest -pthread
?????????????Makefile??????????????????????????
??????????Makefile????????????·????????·????Makefile?
????TARGET=test_main
????all:
????gtest-config --min-version=1.0 || echo "Insufficient Google Test version."
????g++  -I/usr/include -pthread -o $(TARGET).o -c test_main.cpp
????g++ -L/usr/lib64 -lgtest -pthread -o $(TARGET) $(TARGET).o
????clean:
????rm -rf *.o $(TARGET)
???????????????????gtest?????????????????
???????
????1.Makefile??????е??????????????????????????2???
????2.gtest?????????????????project????????????????????λ??
????3.gtest-config??????????????????????·??