updated example makefiles
This commit is contained in:
@@ -3,19 +3,27 @@ CXXFLAGS = -march=native -Wall -Wextra -Wshadow -pedantic -std=c++11 -pthread -I
|
||||
CXX_RELEASE_FLAGS = -O3 -flto
|
||||
CXX_DEBUG_FLAGS= -g
|
||||
|
||||
OUTBIN = example
|
||||
|
||||
all: example.cpp
|
||||
$(CXX) example.cpp -o $(OUTBIN) $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
||||
all: example bench
|
||||
debug: example-debug bench-debug
|
||||
|
||||
example: example.cpp
|
||||
$(CXX) example.cpp -o example $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
||||
|
||||
bench: bench.cpp
|
||||
$(CXX) bench.cpp -o bench $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
||||
|
||||
|
||||
debug: example.cpp
|
||||
$(CXX) example.cpp -o $(OUTBIN)-debug $(CXXFLAGS) $(CXX_DEBUG_FLAGS)
|
||||
example-debug: example.cpp
|
||||
$(CXX) example.cpp -o example-debug $(CXXFLAGS) $(CXX_DEBUG_FLAGS)
|
||||
|
||||
bench-debug: bench.cpp
|
||||
$(CXX) bench.cpp -o bench-debug $(CXXFLAGS) $(CXX_DEBUG_FLAGS)
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.txt $(OUTBIN) $(OUTBIN)-debug
|
||||
rm -f *.o *.txt example example-debug bench bench-debug
|
||||
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
Reference in New Issue
Block a user