]> Dogcows Code - chaz/vimcoder/blobdiff - src/com/dogcows/resources/C++Makefile
make the C++ driver depend on the solution source code
[chaz/vimcoder] / src / com / dogcows / resources / C++Makefile
index 062a464470b19c0ca563cb1e628a87c030fd3213..79332f1d570ebab878357045eb73d44472a44663 100644 (file)
@@ -1,19 +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.o: $CLASSNAME$.o
+       ./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
This page took 0.026994 seconds and 4 git commands to generate.