-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to doing all the compile configuration in Makefile.inc.
It was getting to be really bad to have each directory have its own settings for the compilers. Now everything should use the same include file with CC, CXX, CFLAGS, CXXFLAGS, etc. At least that will be true for these Makefiles and will have to be done differently when there are other build systems present. #65
- Loading branch information
Showing
7 changed files
with
61 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- makefile -*- | ||
|
||
CC := clang | ||
CXX := clang++ | ||
|
||
WARN := | ||
WARN := -Wall | ||
WARN += -Wextra | ||
|
||
ifdef ERROR | ||
WARN += -Werror | ||
endif | ||
|
||
CFLAGS := ${WARN} | ||
|
||
CXXFLAGS += -std=c++11 | ||
# CXXFLAGS += -pthread | ||
CXXFLAGS += ${WARN} | ||
|
||
DBG := -g | ||
DBG += -O0 | ||
|
||
OPT := -O3 | ||
OPT += -funroll-loops | ||
# Not supposed by clang. | ||
# OPT += -fexpensive-optimizations | ||
OPT += -ffast-math | ||
OPT += -DNDEBUG | ||
|
||
ifdef OPTIMIZE | ||
CFLAGS += ${OPT} | ||
CXXFLAGS += ${OPT} | ||
else | ||
CFLAGS += ${DBG} | ||
CXXFLAGS += ${DBG} | ||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters