2015-01-18 09:53:19 +08:00
|
|
|
CXX ?= g++
|
2015-05-11 16:44:26 +08: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-21 03:39:58 +08:00
|
|
|
|
|
|
|
|
2014-12-19 00:48:42 +08:00
|
|
|
all: example bench
|
|
|
|
debug: example-debug bench-debug
|
2014-10-14 10:16:16 +08:00
|
|
|
|
2014-12-19 00:48:42 +08:00
|
|
|
example: example.cpp
|
2015-05-11 16:44:26 +08:00
|
|
|
$(CXX) example.cpp -o example $(CXX_FLAGS) $(CXX_RELEASE_FLAGS) $(CXXFLAGS)
|
2014-10-14 10:16:16 +08:00
|
|
|
|
2014-12-19 00:48:42 +08:00
|
|
|
bench: bench.cpp
|
2015-05-11 16:44:26 +08:00
|
|
|
$(CXX) bench.cpp -o bench $(CXX_FLAGS) $(CXX_RELEASE_FLAGS) $(CXXFLAGS)
|
2014-02-21 03:39:58 +08:00
|
|
|
|
|
|
|
|
2015-05-11 16:44:26 +08:00
|
|
|
example-debug: example.cpp
|
|
|
|
$(CXX) example.cpp -o example-debug $(CXX_FLAGS) $(CXX_DEBUG_FLAGS) $(CXXFLAGS)
|
2014-02-21 03:39:58 +08:00
|
|
|
|
2015-05-11 16:44:26 +08:00
|
|
|
bench-debug: bench.cpp
|
|
|
|
$(CXX) bench.cpp -o bench-debug $(CXX_FLAGS) $(CXX_DEBUG_FLAGS) $(CXXFLAGS)
|
2014-02-21 03:39:58 +08:00
|
|
|
|
|
|
|
clean:
|
2015-05-11 16:44:26 +08:00
|
|
|
rm -f *.o logs/*.txt example example-debug bench bench-debug
|
2014-03-22 20:03:09 +08:00
|
|
|
|
|
|
|
|
2014-02-21 03:39:58 +08:00
|
|
|
rebuild: clean all
|
|
|
|
rebuild-debug: clean debug
|