Change the way standard conformance is specified
This commit is contained in:
parent
11093b9e66
commit
4cabbde4b4
|
@ -23,10 +23,8 @@
|
|||
#------------------------------------------------------------------------------
|
||||
|
||||
CC= gcc
|
||||
CC99= $(CC) -std=gnu99
|
||||
CXX= g++
|
||||
CXX11= $(CXX) -std=gnu++11
|
||||
LD= $(CC)
|
||||
LD= $(CXX)
|
||||
CPP= $(CC) -E
|
||||
PYTHON= python
|
||||
AR= ar -rcs
|
||||
|
@ -39,6 +37,9 @@ INSTALL= install
|
|||
# Compilation flags
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
CFLAGS_STD=$(CC_STD:%=-std=%)
|
||||
CXXFLAGS_STD=$(CXX_STD:%=-std=%)
|
||||
|
||||
CFLAGS_debug= -g -Wall -fno-inline
|
||||
CFLAGS_opt= -g -O3 -Wall
|
||||
CFLAGS_release= -O3 -Wall
|
||||
|
|
13
config.mk
13
config.mk
|
@ -58,6 +58,14 @@ PREFIX_DLL?=$(PREFIX_LIB)
|
|||
# Compilation flags
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Standard specification (use GCC standard names)
|
||||
# For a compiler that is not GCC compatible, please state options corresponding
|
||||
# to the relevant GNU option names as follows:
|
||||
# CCFLAGS_STD=$(CC_FLAGS_STD_$(CC_STD))
|
||||
# CCFLAGS_STD_gnu11=[whatever option is needed here]
|
||||
CC_STD=gnu11
|
||||
CXX_STD=gnu++14
|
||||
|
||||
# Compilation flags
|
||||
DEFINES_debug= DEBUG
|
||||
DEFINES_opt= DEBUG OPTIMIZED
|
||||
|
@ -69,11 +77,6 @@ CXXFLAGS_opt= $(CFLAGS_opt)
|
|||
CXXFLAGS_release= $(CFLAGS_release)
|
||||
CXXFLAGS_extra= $(CFLAGS_extra)
|
||||
|
||||
# We want to use C++11 for variadic templates
|
||||
# (Replacing old, unsafe printf-style variadics with C++ objects)
|
||||
CXX=$(CXX11)
|
||||
CC=$(CC99)
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Toools we use
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#******************************************************************************
|
||||
# config.vs2013.mk Recorder project
|
||||
# config.vs2013.mk Recorder project
|
||||
#******************************************************************************
|
||||
#
|
||||
# File Description:
|
||||
|
@ -27,9 +27,7 @@
|
|||
# -TC: C mode
|
||||
# -TP: C++ mode
|
||||
CC= cl -nologo -TC
|
||||
CC99= cl -nologo -TC
|
||||
CXX= cl -nologo -TP -EHsc
|
||||
CXX11= cl -nologo -TP -EHsc
|
||||
CPP= cl -nologo -E
|
||||
LD= link -nologo
|
||||
MSLIB= lib -nologo
|
||||
|
|
6
rules.mk
6
rules.mk
|
@ -25,9 +25,9 @@ include $(BUILD)config.mk
|
|||
XINCLUDES= $(INCLUDES) $(INCLUDES_$(BUILDENV)) $(INCLUDES_$(TARGET)) $(INCLUDES_EXTRA)
|
||||
XDEFINES= $(DEFINES) $(DEFINES_$(BUILDENV)) $(DEFINES_$(TARGET)) $(DEFINES_EXTRA)
|
||||
CPPFLAGS+= $(CPPFLAGS_$(BUILDENV)) $(CPPFLAGS_$(TARGET)) $(CPPFLAGS_EXTRA) $(XDEFINES:%=-D%) $(XINCLUDES:%=-I%)
|
||||
CFLAGS+= $(CPPFLAGS) $(CFLAGS_$(BUILDENV)) $(CFLAGS_$(TARGET)) $(CFLAGS_EXTRA) $(C99FLAGS_EXTRA)
|
||||
CXXFLAGS+= $(CPPFLAGS) $(CXXFLAGS_$(BUILDENV)) $(CXXFLAGS_$(TARGET)) $(CFLAGS_EXTRA) $(CXXFLAGS_EXTRA)
|
||||
LDFLAGS+= $(LDFLAGS_$(BUILDENV)) $(LDFLAGS_$(TARGET)) $(CFLAGS_EXTRA) $(LDFLAGS_EXTRA)
|
||||
CFLAGS+= $(CPPFLAGS) $(CFLAGS_STD) $(CFLAGS_$(BUILDENV)) $(CFLAGS_$(TARGET)) $(CFLAGS_EXTRA)
|
||||
CXXFLAGS+= $(CPPFLAGS) $(CXXFLAGS_STD) $(CXXFLAGS_$(BUILDENV)) $(CXXFLAGS_$(TARGET)) $(CFLAGS_EXTRA) $(CXXFLAGS_EXTRA)
|
||||
LDFLAGS+= $(CFLAGS_STD) $(CXXFLAGS_STD) $(LDFLAGS_$(BUILDENV)) $(LDFLAGS_$(TARGET)) $(CFLAGS_EXTRA) $(LDFLAGS_EXTRA)
|
||||
|
||||
|
||||
# Get BUILDOBJ from the BUILD_OBJECTS environment variable if set
|
||||
|
|
Loading…
Reference in New Issue