Skip to content

Commit

Permalink
Make CXX/FLAGS overridable, use standard CXXFLAGS variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Jul 1, 2016
1 parent 7599519 commit d63dc3c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CXX = clang++
CXX_FLAGS = -Wall -Wextra -std=c++14 -O3 # -fsanitize=address -fsanitize=undefined
CXX ?= clang++
CXXFLAGS ?= -O3
CXXFLAGS += -Wall -Wextra -std=c++14

SOURCES:=$(wildcard *.cxx)
HEADERS:=$(wildcard *.hxx)
Expand All @@ -9,7 +10,7 @@ OUTPUTS:=$(patsubst tests/%.in,tests/%.out,$(TESTS))
tests: $(OUTPUTS)

main: $(SOURCES) $(HEADERS)
$(CXX) $(CXX_FLAGS) -o $@ $(SOURCES)
$(CXX) $(CXXFLAGS) -o $@ $(SOURCES)

%.out: %.in main
./main <$< | tee $@
Expand Down

0 comments on commit d63dc3c

Please sign in to comment.