blob: cdff584637b7a6e9df1fa43ce8f588c43815e561 [file] [log] [blame]
# A Makefile for fusing Google Test and building a sample test against it.
# make [all] - makes everything.
# make TARGET - makes the given target.
# make check - makes everything and runs the built sample test.
# make clean - removes all files generated by make.
# Points to the root of fused Google Test, relative to where this file is.
# Paths to the fused gtest files.
FUSED_GTEST_H = $(FUSED_GTEST_DIR)/gtest/gtest.h
# Where to find the sample test.
SAMPLE_DIR = ../../samples
# Where to find
GTEST_MAIN_CC = ../../src/
# Flags passed to the preprocessor.
# We have no idea here whether pthreads is available in the system, so
# disable its use.
# Flags passed to the C++ compiler.
all : sample1_unittest
check : all
clean :
rm -rf $(FUSED_GTEST_DIR) sample1_unittest *.o
gtest-all.o : $(FUSED_GTEST_H) $(FUSED_GTEST_ALL_CC)
gtest_main.o : $(FUSED_GTEST_H) $(GTEST_MAIN_CC)
sample1.o : $(SAMPLE_DIR)/ $(SAMPLE_DIR)/sample1.h
sample1_unittest.o : $(SAMPLE_DIR)/ \
$(SAMPLE_DIR)/sample1.h $(FUSED_GTEST_H)
sample1_unittest : sample1.o sample1_unittest.o gtest-all.o gtest_main.o
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@