Anton Bachin 3a316e6f79 Made the test script use only the system compiler by default and extended some
support to VC++.

The unit test is currently not being run on VC++ due to a problem with CxxTest,
Cygwin, and paths. However, the examples are being compiled and having their
output checked, and the multiple translation unit test is being run.

Running "(cd test ; ./test.py)" should now run tests only using the default
compiler, on a Unix-like system. test.py --all runs tests on the full array of
compilers that I have installed and symlinked on my development machines.
2015-05-27 18:40:39 -05:00

33 lines
446 B
Makefile

ifndef CXX
CXX := c++
endif
ifndef CXXFLAGS
CXXFLAGS := -std=c++11 -Wall -I .. -o
endif
SOURCES := $(wildcard *.cc)
BINARIES := $(SOURCES:.cc=.exe)
.PHONY : default
default : run
@:
.PHONY : all
all : $(BINARIES)
%.exe : %.cc ../*.h Makefile
$(CXX) $(CXXFLAGS) $@ $<
.PHONY : clean
clean :
rm -rf *.exe *.obj
.PHONY : run
run : all
@for BINARY in $(BINARIES) ; \
do \
echo ./$$BINARY ; \
./$$BINARY | sed -e "s/^/ /" ; \
done