2 CXXFLAGS = -std=gnu++11 -Wall -Wextra -pedantic -O2
5 SRCS = sliding_tile.cc sliding_tile_lib.cc
8 TESTLIBS = -lgtest_main -lgtest -lgmock
11 TEST_SRCS=$(wildcard *_test.cc)
12 TESTS=$(subst .cc,,$(TEST_SRCS))
14 .PHONY: depend clean test
15 .INTERMEDIATE: $(OBJS)
20 for t in $(TESTS); do if ! ./$$t; then exit 1; fi ;done
23 rm -f *.o $(MAIN) $(TESTS) Makefile.bak
26 $(CXX) $(CXXFLAGS) -o $@ $^ $(LFLAGS) $(LIBS)
29 $(CXX) $(CXXFLAGS) -o $@ $^ $(LFLAGS) $(LIBS) $(TESTLIBS)
34 # DO NOT DELETE THIS LINE -- make depend depends on it.
36 sliding_tile.o: sliding_tile_lib.h