2014-03-01 20:38:12 +08:00
|
|
|
CXX = g++
|
2014-02-21 03:39:58 +08:00
|
|
|
CXXFLAGS = -march=native -Wall -Wextra -Wshadow -pedantic -std=c++11 -pthread -I../include
|
2014-03-17 01:51:43 +08:00
|
|
|
CXX_RELEASE_FLAGS = -O3 -flto -g
|
2014-02-21 03:39:58 +08:00
|
|
|
CXX_DEBUG_FLAGS= -g
|
|
|
|
|
2014-02-21 04:52:22 +08:00
|
|
|
OUTBIN = example
|
2014-02-21 03:39:58 +08:00
|
|
|
|
2014-02-21 04:52:22 +08:00
|
|
|
all: example.cpp
|
|
|
|
$(CXX) example.cpp -o $(OUTBIN) $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
2014-02-21 03:39:58 +08:00
|
|
|
|
|
|
|
|
2014-02-21 04:52:22 +08:00
|
|
|
debug: example.cpp
|
|
|
|
$(CXX) example.cpp -o $(OUTBIN)-debug $(CXXFLAGS) $(CXX_DEBUG_FLAFS)
|
2014-02-21 03:39:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2014-02-21 04:52:22 +08:00
|
|
|
rm -f *.txt $(OUTBIN) $(OUTBIN)-debug
|
2014-02-21 03:39:58 +08:00
|
|
|
|
|
|
|
rebuild: clean all
|
|
|
|
rebuild-debug: clean debug
|
|
|
|
|
|
|
|
|