mirror of
https://github.com/aantron/better-enums.git
synced 2025-12-08 01:36:44 +08:00
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.
33 lines
446 B
Makefile
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
|