merged in default ENGINE-214
authorKrista Bennett <krista@pep-project.org>
Tue, 19 Sep 2017 15:59:55 +0200
branchENGINE-214
changeset 20791e94912983c5
parent 2078 12571364b016
parent 2076 2aadece6fcf4
child 2092 926e2e53967d
child 2094 c9f59ec9b192
merged in default
     1.1 --- a/Makefile.conf	Tue Sep 19 15:59:42 2017 +0200
     1.2 +++ b/Makefile.conf	Tue Sep 19 15:59:55 2017 +0200
     1.3 @@ -3,14 +3,17 @@
     1.4  # This file may be used under the terms of the GNU General Public License version 3
     1.5  # see LICENSE.txt
     1.6  
     1.7 -# This file assembles all the make variables that a maintainer or dev may want to taylor to his or her needs on a given platform.
     1.8 +# This file assembles all the make variables that a maintainer or dev may want to adapt for a distribution.
     1.9  
    1.10 -# To use custom build configuration variables, put them in a new file with the path `build-config/<name>.conf`. Execute `export PLATFORM_OVERRIDE=<name>` before running make. If this environment variable is not set, make will load a default configuration for your platform.
    1.11 +# To use custom build configuration variables, put them in a new file with the path `build-config/<name>.conf`.
    1.12 +# Execute `export PLATFORM_OVERRIDE=<name>` before running make.
    1.13 +# If this environment variable is not set, make will load a default configuration for your platform.
    1.14  
    1.15  BUILD_CONFIG:=$(dir $(lastword $(MAKEFILE_LIST)))build-config
    1.16  
    1.17  include $(BUILD_CONFIG)/common.conf
    1.18 -# cross-compiling is currently not supported, but maybe you can hack something with `PLATFORM_OVERRIDE`
    1.19 +# Cross-compiling is currently not supported.
    1.20 +# Maybe you can hack something with `PLATFORM_OVERRIDE`
    1.21  ifeq ($(BUILD_ON),$(BUILD_FOR))
    1.22      include $(BUILD_CONFIG)/$(BUILD_ON).conf
    1.23  else
     2.1 --- a/build-config/common.conf	Tue Sep 19 15:59:42 2017 +0200
     2.2 +++ b/build-config/common.conf	Tue Sep 19 15:59:55 2017 +0200
     2.3 @@ -4,7 +4,8 @@
     2.4  # see LICENSE.txt
     2.5  
     2.6  # General remark: to use (only) system libraries, set all the *_INC and *_LIB variables to the empty string.
     2.7 -# All the *_INC and *_LIB variables are command line flags, not paths. Thus, all *_INC variables' values must start with "-I", and all *_LIB variables' values must start with "-L".
     2.8 +# All the *_INC and *_LIB variables are command line flags, not paths.
     2.9 +# Thus, all *_INC variables' values must start with "-I", and all *_LIB variables' values must start with "-L".
    2.10  
    2.11  ######### General #########
    2.12  BUILD_ON:=$(shell uname)
    2.13 @@ -16,25 +17,32 @@
    2.14  SYSTEM_DB=/usr/local/share/pEp/system.db
    2.15  # Filename of the pEpEngine library
    2.16  #TARGET This option is platform-specific
    2.17 -# If not empty, create a debug build. This variable is ineffective in your PLATFORM_OVERRIDE.conf file.
    2.18 +# If not empty, create a debug build.
    2.19 +# This variable is ineffective in your PLATFORM_OVERRIDE.conf file.
    2.20  DEBUG=
    2.21 -# If not empty, print compiler warnings. This variable is ineffective in your PLATFORM_OVERRIDE.conf file.
    2.22 +# If not empty, print compiler warnings.
    2.23 +# This variable is ineffective in your PLATFORM_OVERRIDE.conf file.
    2.24  WARN=placeholder
    2.25  
    2.26  ######### C #########
    2.27  #CC This option is platform-specific
    2.28  CPPFLAGS=
    2.29 +# The flag -DNDEBUG will always be removed from CFLAGS for compiling tests.
    2.30 +# The tests do not work properly, if compiled with -DNDEBUG
    2.31  #CFLAGS This option is platform-specific
    2.32  # Additional CFLAGS used for compiling ASN1C-generated code
    2.33  #CFLAGS_GENERATED This option is platform-specific
    2.34  
    2.35  ######### C++ #########
    2.36  #CXX This option is platform-specific
    2.37 +# The flag -DNDEBUG will always be removed from CXXFLAGS for compiling tests.
    2.38 +# The tests do not work properly, if compiled with -DNDEBUG
    2.39  #CXXFLAGS This option is platform-specific
    2.40  
    2.41  ######### C and C++ #########
    2.42  TARGET_ARCH=
    2.43 -# The following two variables will be appended to. You can thus not set them to a fixed value here.
    2.44 +# The following two variables will be appended to.
    2.45 +# You can thus not set them to a fixed value here.
    2.46  #LDFLAGS= This option is platform-specific
    2.47  LDLIBS=
    2.48  
    2.49 @@ -57,7 +65,8 @@
    2.50  ETPAN_INC=-I$(PREFIX)/include
    2.51  
    2.52  ######### sqlite3 #########
    2.53 -# If empty (or undefined), compile sqlite3 from the sources shipped with the pEp distribution. Otherwise, use an sqlite3 implementation found in the OS's include/library paths.
    2.54 +# If empty (or undefined), compile sqlite3 from the sources shipped with the pEp distribution.
    2.55 +# Otherwise, use an sqlite3 implementation found in the OS's include/library paths.
    2.56  SQLITE3_FROM_OS=placeholder
    2.57  
    2.58  ######### OpenPGP #########
    2.59 @@ -87,5 +96,6 @@
    2.60  EXTRA_MACROS=
    2.61  
    2.62  ######### Misc #########
    2.63 -# FIXME Maybe include these variables here. Check how they are used throughout the project before setting them here
    2.64 +# FIXME Maybe include these variables here.
    2.65 +# Check how they are used throughout the project before setting them here
    2.66  #LLDB_BIN
     3.1 --- a/test/Makefile	Tue Sep 19 15:59:42 2017 +0200
     3.2 +++ b/test/Makefile	Tue Sep 19 15:59:55 2017 +0200
     3.3 @@ -57,12 +57,20 @@
     3.4  UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
     3.5  UNIT_TESTS_RUN=$(subst .cc,_run,$(UNIT_TESTS_SOURCE))
     3.6  
     3.7 +CFLAGS:=$(filter-out -DNDEBUG,$(CFLAGS))
     3.8  ifneq ($(MAKECMDGOALS),clean)
     3.9      ifneq (,$(findstring -DNDEBUG,$(CFLAGS)))
    3.10          $(error The macro NDEBUG must not be defined for test compilation.)
    3.11      endif
    3.12  endif
    3.13  
    3.14 +CXXFLAGS:=$(filter-out -DNDEBUG,$(CXXFLAGS))
    3.15 +ifneq ($(MAKECMDGOALS),clean)
    3.16 +    ifneq (,$(findstring -DNDEBUG,$(CXXFLAGS)))
    3.17 +        $(error The macro NDEBUG must not be defined for test compilation.)
    3.18 +    endif
    3.19 +endif
    3.20 +
    3.21  .PHONY: all
    3.22  all: $(TARGET) $(UNIT_TESTS)
    3.23