2015-01-17 20:53:19 -05:00
|
|
|
CXX ?= g++
|
2015-05-11 04:44:26 -04:00
|
|
|
CXXFLAGS =
|
|
|
|
CXX_FLAGS = -Wall -Wshadow -Wextra -pedantic -std=c++11 -pthread -I../include
|
|
|
|
CXX_RELEASE_FLAGS = -O3 -march=native
|
|
|
|
CXX_DEBUG_FLAGS= -g
|
2014-02-20 14:39:58 -05:00
|
|
|
|
|
|
|
|
2014-12-18 11:48:42 -05:00
|
|
|
all: example bench
|
|
|
|
debug: example-debug bench-debug
|
2014-10-13 22:16:16 -04:00
|
|
|
|
2014-12-18 11:48:42 -05:00
|
|
|
example: example.cpp
|
2015-05-11 04:44:26 -04:00
|
|
|
$(CXX) example.cpp -o example $(CXX_FLAGS) $(CXX_RELEASE_FLAGS) $(CXXFLAGS)
|
2014-10-13 22:16:16 -04:00
|
|
|
|
2014-12-18 11:48:42 -05:00
|
|
|
bench: bench.cpp
|
2015-05-11 04:44:26 -04:00
|
|
|
$(CXX) bench.cpp -o bench $(CXX_FLAGS) $(CXX_RELEASE_FLAGS) $(CXXFLAGS)
|
2014-02-20 14:39:58 -05:00
|
|
|
|
|
|
|
|
2015-05-11 04:44:26 -04:00
|
|
|
example-debug: example.cpp
|
|
|
|
$(CXX) example.cpp -o example-debug $(CXX_FLAGS) $(CXX_DEBUG_FLAGS) $(CXXFLAGS)
|
2014-02-20 14:39:58 -05:00
|
|
|
|
2015-05-11 04:44:26 -04:00
|
|
|
bench-debug: bench.cpp
|
|
|
|
$(CXX) bench.cpp -o bench-debug $(CXX_FLAGS) $(CXX_DEBUG_FLAGS) $(CXXFLAGS)
|
2014-02-20 14:39:58 -05:00
|
|
|
|
|
|
|
clean:
|
2015-05-11 04:44:26 -04:00
|
|
|
rm -f *.o logs/*.txt example example-debug bench bench-debug
|
2014-03-22 08:03:09 -04:00
|
|
|
|
|
|
|
|
2014-02-20 14:39:58 -05:00
|
|
|
rebuild: clean all
|
|
|
|
rebuild-debug: clean debug
|