1 include ..
/..
/configure.mk
3 CXXFLAGS
+= -I
${GTEST}/include
6 SOURCES
= $(shell find ..
/..
-name
'*.cpp' ! -name
'main.cpp' |
sort)
7 OBJECTS
= $(SOURCES
:.
cpp=.o
)
8 EXECUTABLE
= test_purplehaze
10 .PHONY
: all test clean
12 all: $(SOURCES
) $(EXECUTABLE
)
14 $(EXECUTABLE
): libgtest.a
$(OBJECTS
)
15 $(CXX
) $(CXXFLAGS
) -o
$@
$(OBJECTS
) libgtest.a
18 $(CXX
) $(CXXFLAGS
) -c
-o
$@
$<
21 curl
-s
-C
- http
://googletest.googlecode.com
/files
/$(GTEST
).zip
> $(GTEST
).zip
23 $(CXX
) -I
${GTEST}/include -I
${GTEST} $(CXXFLAGS
) -c
${GTEST}/src
/gtest-all.
cc
24 $(AR
) -rv libgtest.a gtest-all.o
30 $(RM
) $(OBJECTS
) $(EXECUTABLE
)