Browse Source

Make debug compile options platform-specific

doc_update_sequoia
Damiano Boppart 5 years ago
parent
commit
5feb299a69
3 changed files with 47 additions and 22 deletions
  1. +23
    -0
      build-config/Darwin.conf
  2. +22
    -0
      build-config/Linux.conf
  3. +2
    -22
      build-config/common.conf

+ 23
- 0
build-config/Darwin.conf View File

@ -8,9 +8,32 @@ TARGET=libpEpEngine.dylib
######### C #########
CC=clang -std=c99 -pthread
# FIXME I think -fPIC is not available in clang
CFLAGS= -fPIC -fstrict-aliasing
ifdef WARN
CFLAGS+= -Wall -pedantic -Wstrict-aliasing=3
else
CFLAGS+= -w
endif
ifdef DEBUG
CFLAGS+= -O0 -g -DDEBUG_ERRORSTACK
else
CFLAGS+= -O3 -DNDEBUG
endif
######### C++ #########
CXX=clang -std=c++11
CXXFLAGS=
ifdef WARN
CXXFLAGS+=
else
CXXFLAGS+= -w
endif
ifdef DEBUG
CXXFLAGS+= -O0 -g
else
CXXFLAGS+= -O3 -DNDEBUG
endif
######### C and C++ #########


+ 22
- 0
build-config/Linux.conf View File

@ -8,9 +8,31 @@ TARGET=libpEpEngine.so
######### C #########
CC=gcc -std=c99
CFLAGS= -fPIC -fstrict-aliasing
ifdef WARN
CFLAGS+= -Wall -pedantic -Wstrict-aliasing=3
else
CFLAGS+= -w
endif
ifdef DEBUG
CFLAGS+= -Og -ggdb -DDEBUG_ERRORSTACK
else
CFLAGS+= -O3 -DNDEBUG
endif
######### C++ #########
CXX=g++ -std=gnu++11 -pthread
CXXFLAGS=
ifdef WARN
CXXFLAGS+=
else
CXXFLAGS+= -w
endif
ifdef DEBUG
CXXFLAGS+= -Og -ggdb
else
CXXFLAGS+= -O3 -DNDEBUG
endif
######### C and C++ #########


+ 2
- 22
build-config/common.conf View File

@ -20,31 +20,11 @@ WARN=
######### C #########
#CC This option is platform-specific
CPPFLAGS=
CFLAGS= -fPIC -fstrict-aliasing
ifdef WARN
CFLAGS+= -Wall -pedantic -Wstrict-aliasing=3
else
CFLAGS+= -w
endif
ifdef DEBUG
CFLAGS+= -O0 -g -DNDEBUG -DDEBUG_ERRORSTACK
else
CFLAGS+= -O3
endif
#CFLAGS This option is platform-specific
######### C++ #########
#CXX This option is platform-specific
CXXFLAGS=
ifdef WARN
CXXFLAGS+=
else
CXXFLAGS+= -w
endif
ifdef DEBUG
CXXFLAGS+= -O0 -g -DNDEBUG
else
CXXFLAGS+= -O3
endif
#CXXFLAGS This option is platform-specific
######### C and C++ #########
#LD=


Loading…
Cancel
Save