Clean up construction of compiler flags
- Flatten
$FSLDIR/config
directory by movingconfig/common/*
intoconfig/
. - Set default C/C++ standards as
-std=c99
/-std=c++11
. - Honour
CC
,CXX
,CFLAGS
,CXXFLAGS
, andLDFLAGS
set by the environment - if unset, use defaults defined inbuildSettings.mk
. - Formalise and document construction of final
CFLAGS
/CXXFLAGS
/LDFLAGS
used in compilation of C/C++ projects:-
USRCFLAGS
/USRCXXFLAGS
/USRLDFLAGS
are defined in project specific Makefiles, and have the highest precedence -
ARCHCFLAGS
/ARCHCXXFLAGS
/ARCHLDFLAGS
are defined inbuildSettings.mk
, and have higher precedence over the environment -
CFLAGS
/CXXFLAGS
/LDFLAGS
are provided by the environment (with fallback defaults inbuildSettings.mk
), and have the lowest precedence.
-
- Do not set any C++ ABI compatibility flags - these can be provided by the environment
- Honour
CPPFLAGS
, and allow projects to setUSRCPPFLAGS
, to control C/C++ preprocessor. Will probably never get used, but added for completeness.