X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcom%2Fdogcows%2Fresources%2FC%2B%2BMakefile;h=84ed692d9d4ed9234664e36ad7583a3b55705931;hb=7361761f9b934298d326e9bae3109e8de335db37;hp=b1cb4eda00f3e301948fcba922c4cbea7bb8a5ac;hpb=8a2b2bbbe6e13cee2f5118e1ce814bf17f058299;p=chaz%2Fvimcoder diff --git a/src/com/dogcows/resources/C++Makefile b/src/com/dogcows/resources/C++Makefile index b1cb4ed..84ed692 100644 --- a/src/com/dogcows/resources/C++Makefile +++ b/src/com/dogcows/resources/C++Makefile @@ -1,17 +1,44 @@ -CXX := g++ -CXXFLAGS := -O0 -g -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 + +# 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 "" + + +ifeq ($(OS),Windows_NT) +EXEEXT = .exe +endif + + +all: driver$(EXEEXT) + +clean: + rm -f driver$(EXEEXT) + +distclean: clean + rm -f $CLASSNAME$ -all: driver - run: all - ./driver - + ./driver$(EXEEXT) + test: all - ./driver -exit_on_fail + ./driver$(EXEEXT) --abort-on-fail + +prove: all + $(PROVE) $(PROVEFLAGS) ./driver$(EXEEXT) + + +%$(EXEEXT): %.cc + $(LINK.cc) $< $(LOADLIBES) $(LDLIBS) -o $@ -driver: driver.o - $(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(LIBS) +driver$(EXEEXT): $CLASSNAME$.cc -.PHONY: all run test +.PHONY: all clean distclean run test prove +# vim:ft=make:noet:ts=8