X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcom%2Fdogcows%2Fresources%2FC%2B%2BMakefile;h=5b58356abb781a4cf2ec96723cc5a1c309ad9376;hb=4afcc19722d6dde23c36f9491ebab9f7b6e38e8b;hp=3b0a60bfdc4729e8248f73c7fddc08e5dc30a916;hpb=9117819d0764d40f6c352e509169b5e4053b5882;p=chaz%2Fvimcoder diff --git a/src/com/dogcows/resources/C++Makefile b/src/com/dogcows/resources/C++Makefile index 3b0a60b..5b58356 100644 --- a/src/com/dogcows/resources/C++Makefile +++ b/src/com/dogcows/resources/C++Makefile @@ -1,25 +1,44 @@ -CXX = g++ -CXXFLAGS = -O0 -ggdb -Wall +# Set the command for your C++ compiler, and specify any compiler flags you want to use (e.g. -g +# -Werror). +CXX = g++ +CXXFLAGS = -ggdb -Wall -all: driver +# The driver outputs TAP (Test Anything Protocol), so it can also be used with any TAP test harness +# (e.g. prove). Set the path to your test harness here, then use the `prove' target to run the +# tests with that harness. +PROVE = prove +PROVEFLAGS = -e "" -run: all - ./driver -test: all - ./driver -exit_on_fail +ifeq ($(OS),Windows_NT) +EXEEXT = .exe +endif -driver.o: $CLASSNAME$.o -driver: driver.o - $(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS) +all: driver$(EXEEXT) clean: - rm -f $CLASSNAME$.o driver.o driver + rm -f driver$(EXEEXT) distclean: clean rm -f $CLASSNAME$ -.PHONY: all run test clean distclean +run: all + ./driver$(EXEEXT) + +test: all + ./driver$(EXEEXT) --abort-on-fail + +prove: all + $(PROVE) $(PROVEFLAGS) ./driver$(EXEEXT) + + +%$(EXEEXT): %.cc + $(LINK.cc) $< $(LOADLIBES) $(LDLIBS) -o $@ + +driver$(EXEEXT): $CLASSNAME$.cc + +.PHONY: all clean distclean run test prove +# vim:ft=make:noet:ts=8