Merge functionality in default.conf and Makefile.conf make-cleanup
authorDamiano Boppart <damiano.boppart@pep.security>
Fri, 21 Dec 2018 16:05:05 +0100
branchmake-cleanup
changeset 3201105b50dfaf15
parent 3200 329005a93c6a
child 3202 3f440e46823c
Merge functionality in default.conf and Makefile.conf
Makefile
Makefile.conf
asn.1/Makefile
db/Makefile
default.conf
src/Makefile
sync/Makefile
test/Makefile
     1.1 --- a/Makefile	Fri Dec 21 11:14:10 2018 +0100
     1.2 +++ b/Makefile	Fri Dec 21 16:05:05 2018 +0100
     1.3 @@ -5,7 +5,7 @@
     1.4  
     1.5  HERE_REL := $(notdir $(CURDIR))
     1.6  
     1.7 -include default.conf
     1.8 +include Makefile.conf
     1.9  
    1.10  ifneq ($(wildcard local.conf),)
    1.11      $(info ================================================)
     2.1 --- a/Makefile.conf	Fri Dec 21 11:14:10 2018 +0100
     2.2 +++ b/Makefile.conf	Fri Dec 21 16:05:05 2018 +0100
     2.3 @@ -5,116 +5,269 @@
     2.4  
     2.5  # See `doc/build-<your platform>.md` for documentation on how to build, and customize your build.
     2.6  
     2.7 +# This file sets all the make variables that allow you to customize a build.
     2.8 +# There are 3 ways in which you can customize your build:
     2.9 +# 1) Edit the variable assignments in this file (this is a tracked file, so your repository will be dirty)
    2.10 +# 2) Create `local.conf` and fill it with variable assignments.
    2.11 +# 3) Set the environment variable `BUILD_CONFIG` to an absolute path.
    2.12 +#    The variable assignments found in the make file at the path indicated by `BUILD_CONFIG` will be evaluated.
    2.13 +# Customization options are applied in the order given above. Later variable assignments take precedence over earlier ones.
    2.14 +# It is possible to use multiple variants simultaniously.
    2.15 +# If nothing is changed according to these 3 methods, a default configuration for your platform (specified below) will be used for the build.
    2.16 +
    2.17 +
    2.18 +######### Header #########
    2.19 +HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
    2.20 +
    2.21 +
    2.22  ######### General #########
    2.23  # To use (only) system libraries, set all the *_INC and *_LIB variables to the empty string.
    2.24  # All the *_INC and *_LIB variables are command line flags, not paths.
    2.25  # Thus, all *_INC variables' values must start with "-I", and all *_LIB variables' values must start with "-L".
    2.26  
    2.27 -#BUILD_ON:=$(shell uname)
    2.28 +BUILD_ON:=$(shell uname)
    2.29  
    2.30  # This variable specifies the platform that the engine should be cross-compiled for.
    2.31 -#BUILD_FOR=$(BUILD_ON)
    2.32 +BUILD_FOR=$(BUILD_ON)
    2.33 +
    2.34 +# Cross-compiling is currently not supported.
    2.35 +# Maybe you can hack something with `local.conf`.
    2.36 +ifneq ($(BUILD_ON),$(BUILD_FOR))
    2.37 +    $(error I don't know how to build for $(BUILD_FOR) on $(BUILD_ON).)
    2.38 +endif
    2.39  
    2.40  # Installation path prefix for libraries and binaries, except for system.db
    2.41 -#PREFIX=$(HOME)
    2.42 +PREFIX=$(HOME)
    2.43  
    2.44  # Installation path for system.db
    2.45 -#SYSTEM_DB=/usr/local/share/pEp/system.db
    2.46 +SYSTEM_DB=/usr/local/share/pEp/system.db
    2.47  
    2.48  # Filename of the pEpEngine library
    2.49 -#TARGET=libpEpEngine.so
    2.50 +ifeq ($(BUILD_FOR),Linux)
    2.51 +    TARGET=libpEpEngine.so
    2.52 +else ifeq ($(BUILD_FOR),Darwin)
    2.53 +    TARGET=libpEpEngine.dylib
    2.54 +endif
    2.55 +
    2.56 +# If empty, create a release build.
    2.57 +# Otherwise, create a debug build.
    2.58 +# This variable is ineffective in your local.conf file.
    2.59 +DEBUG=placeholder
    2.60 +
    2.61 +# If empty, suppress compiler warnings.
    2.62 +# Otherwise, print warnings.
    2.63 +# This variable is ineffective in your local.conf file.
    2.64 +WARN=placeholder
    2.65  
    2.66  
    2.67  ######### C and C++ #########
    2.68 -#TARGET_ARCH=
    2.69 +TARGET_ARCH=
    2.70  
    2.71  # The following two variables will be appended to.
    2.72  # You can thus not set them to a fixed value here.
    2.73 -#LDFLAGS=
    2.74 +ifeq ($(BUILD_FOR),Linux)
    2.75 +    LDFLAGS=
    2.76 +else ifeq ($(BUILD_FOR),Darwin)
    2.77 +    # "-bind_at_load" helps find symbol resolution errors faster
    2.78 +    LDFLAGS=-bind_at_load
    2.79 +endif
    2.80  
    2.81 -#LDLIBS=
    2.82 +LDLIBS=
    2.83  
    2.84  
    2.85  ######### C #########
    2.86 -#CC=
    2.87 +ifeq ($(BUILD_FOR),Linux)
    2.88 +    CC=gcc -std=c99 -pthread
    2.89 +else ifeq ($(BUILD_FOR),Darwin)
    2.90 +    # clang issues a warning when "-pthread" is used for linking.
    2.91 +    # So, include it in CFLAGS, and not in CC
    2.92 +    CC=clang -std=c99
    2.93 +endif
    2.94  
    2.95 -#CFLAGS=-fPIC -fstrict-aliasing -fdiagnostics-color=always
    2.96 +ifeq ($(BUILD_FOR),Linux)
    2.97 +    CFLAGS=-fPIC -fstrict-aliasing -fdiagnostics-color=always
    2.98 +else ifeq ($(BUILD_FOR),Darwin)
    2.99 +    CFLAGS=-pthread -fPIC -fstrict-aliasing -fcolor-diagnostics
   2.100 +endif
   2.101  
   2.102 -#CPPFLAGS=
   2.103 -
   2.104 -#CFLAGS+= -w -O3 -DNDEBUG
   2.105 +# The flag -DNDEBUG will always be removed from CFLAGS for compiling tests.
   2.106 +# The tests do not work properly, if compiled with -DNDEBUG
   2.107 +ifeq ($(BUILD_FOR),Linux)
   2.108 +    ifdef WARN
   2.109 +        CFLAGS+= -Wall -pedantic -Wstrict-aliasing=3
   2.110 +    else
   2.111 +        CFLAGS+= -w
   2.112 +    endif
   2.113 +    ifdef DEBUG
   2.114 +        CFLAGS+= -g -ggdb -DDEBUG_ERRORSTACK
   2.115 +    else
   2.116 +        CFLAGS+= -O3 -DNDEBUG
   2.117 +    endif
   2.118 +else ifeq ($(BUILD_FOR),Darwin)
   2.119 +    ifdef WARN
   2.120 +        # FIXME Remove 'no-extended-offsetof' after ENGINE-236 is closed.
   2.121 +        CFLAGS+= -Wall -pedantic -Wno-extended-offsetof
   2.122 +    else
   2.123 +        CFLAGS+= -w
   2.124 +    endif
   2.125 +    ifdef DEBUG
   2.126 +        CFLAGS+= -O0 -g -DDEBUG_ERRORSTACK
   2.127 +    else
   2.128 +        CFLAGS+= -O3 -DNDEBUG
   2.129 +    endif
   2.130 +endif
   2.131  
   2.132  # Additional CFLAGS used for compiling ASN1C-generated code
   2.133 -#CFLAGS_GENERATED=-D_DEFAULT_SOURCE
   2.134 +ifeq ($(BUILD_FOR),Linux)
   2.135 +    # The '_DEFAULT_SOURCE' feature test macro is required to suppress the warning
   2.136 +    #   _BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE
   2.137 +    # otherwise printed during the compilation of every asn1c-generated C file.
   2.138 +    # It's a glibc specific warning, only present in few versions around ~2.19.
   2.139 +    # See https://lwn.net/Articles/590381/ for a discussion.
   2.140 +    CFLAGS_GENERATED=-D_DEFAULT_SOURCE
   2.141 +else ifeq ($(BUILD_FOR),Darwin)
   2.142 +    CFLAGS_GENERATED=
   2.143 +endif
   2.144  
   2.145  
   2.146  ######### C++ #########
   2.147 -#CXX=g++ -std=gnu++11 -pthread
   2.148 +ifeq ($(BUILD_FOR),Linux)
   2.149 +    CXX=g++ -std=gnu++11 -pthread
   2.150 +else ifeq ($(BUILD_FOR),Darwin)
   2.151 +    # clang issues a warning when "-pthread" is used for linking. So, include it in CXXFLAGS, and not in CXX
   2.152 +    CXX=clang -std=c++11
   2.153 +endif
   2.154  
   2.155 -#CXXFLAGS=-fdiagnostics-color=always -I../src -I../asn.1 $(ETPAN_INC) -w -O3 -DNDEBUG
   2.156 +# The flag -DNDEBUG will always be removed from CXXFLAGS for compiling tests.
   2.157 +# The tests do not work properly, if compiled with -DNDEBUG
   2.158 +ifeq ($(BUILD_FOR),Linux)
   2.159 +    CXXFLAGS=-fdiagnostics-color=always -I../src -I../asn.1 $(ETPAN_INC)
   2.160 +    ifdef WARN
   2.161 +        CXXFLAGS+=
   2.162 +    else
   2.163 +        CXXFLAGS+= -w
   2.164 +    endif
   2.165 +    ifdef DEBUG
   2.166 +        CXXFLAGS+= -g -ggdb
   2.167 +    else
   2.168 +        CXXFLAGS+= -O3 -DNDEBUG
   2.169 +    endif
   2.170 +else ifeq ($(BUILD_FOR),Darwin)
   2.171 +    CXXFLAGS=-pthread -fcolor-diagnostics -I../src -I../asn.1 $(ETPAN_INC)
   2.172 +    ifdef WARN
   2.173 +        CXXFLAGS+=
   2.174 +    else
   2.175 +        CXXFLAGS+= -w
   2.176 +    endif
   2.177 +    ifdef DEBUG
   2.178 +        CXXFLAGS+= -O0 -g
   2.179 +    else
   2.180 +        CXXFLAGS+= -O3 -DNDEBUG
   2.181 +    endif
   2.182 +endif
   2.183 +
   2.184 +
   2.185 +######### C and C++ #########
   2.186 +CPPFLAGS=
   2.187  
   2.188  
   2.189  ######### YML2 #########
   2.190 -#YML2_PATH=$(HOME)/yml2
   2.191 +YML2_PATH=$(HOME)/yml2
   2.192  
   2.193 -#YML2_PROC=$(YML2_PATH)/yml2proc
   2.194 +YML2_PROC=$(YML2_PATH)/yml2proc
   2.195  
   2.196 -#YML2_OPTS=--encoding=utf8
   2.197 +YML2_OPTS=--encoding=utf8
   2.198  
   2.199  
   2.200  ######### asn1c #########
   2.201  # asn1c binary
   2.202 -#ASN1C=asn1c
   2.203 +ASN1C=asn1c
   2.204  
   2.205  # asn1c include search flag
   2.206 -#ASN1C_INC=-I$(HOME)/include
   2.207 +ASN1C_INC=
   2.208 +#ASN1C_INC=-I$(PREFIX)/include
   2.209  
   2.210  
   2.211  ######### libetpan #########
   2.212  # libetpan library search flag
   2.213 +ETPAN_LIB=
   2.214  #ETPAN_LIB=-L$(PREFIX)/lib
   2.215  
   2.216  # libetpan include search flag
   2.217 +ETPAN_INC=
   2.218  #ETPAN_INC=-I$(PREFIX)/include
   2.219  
   2.220  
   2.221  ######### sqlite3 #########
   2.222  # If empty (or undefined), compile sqlite3 from the sources shipped with the pEp distribution.
   2.223  # Otherwise, use an sqlite3 implementation found in the OS's include/library paths.
   2.224 -#SQLITE3_FROM_OS=placeholder
   2.225 +SQLITE3_FROM_OS=placeholder
   2.226  
   2.227  
   2.228  ######### OpenPGP #########
   2.229  # Path of GPG binary
   2.230  # gpgconf is not available for old version of GPG, for example GPG 2.0.30. Override this variable, if you compile the engine for such an old version.
   2.231 -#GPG_CMD:=$(shell gpgconf --list-components | awk -F: '/^gpg:/ { print $$3; exit 0; }')
   2.232 +GPG_CMD:=$(shell gpgconf --list-components | awk -F: '/^gpg:/ { print $$3; exit 0; }')
   2.233  
   2.234  # Selects OpenPGP implementation. must be either `GPG` or `NETPGP`
   2.235 -#OPENPGP=GPG
   2.236 +OPENPGP=GPG
   2.237  
   2.238 -# Path of libGPGME binary
   2.239 -#LIBGPGME=libgpgme.so.11
   2.240 +# libGPGME filename
   2.241 +ifeq ($(BUILD_FOR),Linux)
   2.242 +    LIBGPGME=libgpgme.so.11
   2.243 +else ifeq ($(BUILD_FOR),Darwin)
   2.244 +    LIBGPGME=libgpgme.11.dylib
   2.245 +endif
   2.246  
   2.247  # libGPGME library search flag
   2.248 -#GPGME_LIB=
   2.249 +GPGME_LIB=
   2.250 +#GPGME_LIB=-L$(HOME)/lib
   2.251  
   2.252  # libGPGME include search flag
   2.253 -#GPGME_INC=
   2.254 +GPGME_INC=
   2.255 +#GPGME_INC=-I$(HOME)/include
   2.256  
   2.257  # NETPGP library search flag
   2.258 +NETPGP_LIB=
   2.259  #NETPGP_LIB=-L$(PREFIX)/lib
   2.260  
   2.261  # libGPGME include search flag
   2.262 +NETPGP_INC=
   2.263  #NETPGP_INC=-I$(PREFIX)/include
   2.264  
   2.265  
   2.266 +######### CppUnit #########
   2.267 +# CppUnit library search flag
   2.268 +CPPUNIT_LIB=
   2.269 +#CPPUNIT_LIB=-L$(HOME)/local/lib
   2.270 +
   2.271 +# CppUnit include search flag
   2.272 +CPPUNIT_INC=
   2.273 +#CPPUNIT_INC=-I$(HOME)/local/inc
   2.274 +
   2.275 +
   2.276  ######### Engine internals #########
   2.277  # C macros (not environment variables) that can be overridden:
   2.278  # DEFAULT_KEYSERVER - string with default keyserver
   2.279  # CRASHDUMP_DEFAULT_LINES - number of log lines to deliver for crashdumps
   2.280  # Example:
   2.281  #    EXTRA_MACROS=-DDEFAULT_KEYSERVER=\"default-server.org\" -DCRASHDUMP_DEFAULT_LINES=23
   2.282 -#EXTRA_MACROS=
   2.283 +EXTRA_MACROS=
   2.284 +
   2.285 +
   2.286 +######### Misc #########
   2.287 +#LLDB_BIN
   2.288  
   2.289  # add this for running tests in debugger
   2.290  #TEST_DEBUGGER=lldb --batch -o r
   2.291 +
   2.292 +
   2.293 +######### Footer #########
   2.294 +-include $(HERE)/local.conf
   2.295 +
   2.296 +ifdef BUILD_CONFIG
   2.297 +    include $(BUILD_CONFIG)
   2.298 +endif
   2.299 +
   2.300 +# YML_PATH is needed in the environment of every call to a program of the YML2 distribution
   2.301 +export YML_PATH=$(YML2_PATH)
     3.1 --- a/asn.1/Makefile	Fri Dec 21 11:14:10 2018 +0100
     3.2 +++ b/asn.1/Makefile	Fri Dec 21 16:05:05 2018 +0100
     3.3 @@ -1,7 +1,7 @@
     3.4  # This file is under GNU General Public License 3.0
     3.5  # see LICENSE.txt
     3.6  
     3.7 -include ../default.conf
     3.8 +include ../Makefile.conf
     3.9  
    3.10  ALL_SOURCE=$(subst $(NO_SOURCE),,$(wildcard *.c))
    3.11  ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))
     4.1 --- a/db/Makefile	Fri Dec 21 11:14:10 2018 +0100
     4.2 +++ b/db/Makefile	Fri Dec 21 16:05:05 2018 +0100
     4.3 @@ -3,7 +3,7 @@
     4.4  # This file may be used under the terms of the GNU General Public License version 3
     4.5  # see LICENSE.txt
     4.6  
     4.7 -include ../default.conf
     4.8 +include ../Makefile.conf
     4.9  
    4.10  .PHONY: db
    4.11  db: system.db
     5.1 --- a/default.conf	Fri Dec 21 11:14:10 2018 +0100
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,272 +0,0 @@
     5.4 -# Copyright 2017, pEp Foundation
     5.5 -# This file is part of pEpEngine
     5.6 -# This file may be used under the terms of the GNU General Public License version 3
     5.7 -# see LICENSE.txt
     5.8 -
     5.9 -# See `doc/build-<your platform>.md` for documentation on how to build, and customize your build.
    5.10 -
    5.11 -# This file sets all the make variables that allow you to customize a build.
    5.12 -# There are 4 ways in which you can customize your build:
    5.13 -# 1) Edit the variable assignments in this file (this is a tracked file, so your repository will be dirty)
    5.14 -# 2) Edit the variable assignments in `Makefile.conf` (which is a tracked file, so your repository will be dirty)
    5.15 -# 3) Create `local.conf` and fill it with variable assignments.
    5.16 -# 4) Set the environment variable `BUILD_CONFIG` to an absolute path.
    5.17 -#    The variable assignments found in the make file at the path indicated by `BUILD_CONFIG` will be evaluated.
    5.18 -# Customization options are applied in the order given above. Later variable assignments take precedence over earlier ones.
    5.19 -# It is possible to use multiple variants simultaniously.
    5.20 -# If nothing is changed according to these 4 methods, a default configuration for your platform (specified below) will be used for the build.
    5.21 -
    5.22 -
    5.23 -######### Header #########
    5.24 -HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
    5.25 -
    5.26 -
    5.27 -######### General #########
    5.28 -# To use (only) system libraries, set all the *_INC and *_LIB variables to the empty string.
    5.29 -# All the *_INC and *_LIB variables are command line flags, not paths.
    5.30 -# Thus, all *_INC variables' values must start with "-I", and all *_LIB variables' values must start with "-L".
    5.31 -
    5.32 -BUILD_ON:=$(shell uname)
    5.33 -
    5.34 -# This variable specifies the platform that the engine should be cross-compiled for.
    5.35 -BUILD_FOR=$(BUILD_ON)
    5.36 -
    5.37 -# Cross-compiling is currently not supported.
    5.38 -# Maybe you can hack something with `local.conf`.
    5.39 -ifneq ($(BUILD_ON),$(BUILD_FOR))
    5.40 -    $(error I don't know how to build for $(BUILD_FOR) on $(BUILD_ON).)
    5.41 -endif
    5.42 -
    5.43 -# Installation path prefix for libraries and binaries, except for system.db
    5.44 -PREFIX=$(HOME)
    5.45 -
    5.46 -# Installation path for system.db
    5.47 -SYSTEM_DB=/usr/local/share/pEp/system.db
    5.48 -
    5.49 -# Filename of the pEpEngine library
    5.50 -ifeq ($(BUILD_FOR),Linux)
    5.51 -    TARGET=libpEpEngine.so
    5.52 -else ifeq ($(BUILD_FOR),Darwin)
    5.53 -    TARGET=libpEpEngine.dylib
    5.54 -endif
    5.55 -
    5.56 -# If empty, create a release build.
    5.57 -# Otherwise, create a debug build.
    5.58 -# This variable is ineffective in your local.conf file.
    5.59 -DEBUG=placeholder
    5.60 -
    5.61 -# If empty, suppress compiler warnings.
    5.62 -# Otherwise, print warnings.
    5.63 -# This variable is ineffective in your local.conf file.
    5.64 -WARN=placeholder
    5.65 -
    5.66 -
    5.67 -######### C and C++ #########
    5.68 -TARGET_ARCH=
    5.69 -# The following two variables will be appended to.
    5.70 -# You can thus not set them to a fixed value here.
    5.71 -ifeq ($(BUILD_FOR),Linux)
    5.72 -    LDFLAGS=
    5.73 -else ifeq ($(BUILD_FOR),Darwin)
    5.74 -    # "-bind_at_load" helps find symbol resolution errors faster
    5.75 -    LDFLAGS=-bind_at_load
    5.76 -endif
    5.77 -
    5.78 -LDLIBS=
    5.79 -
    5.80 -
    5.81 -######### C #########
    5.82 -ifeq ($(BUILD_FOR),Linux)
    5.83 -    CC=gcc -std=c99 -pthread
    5.84 -else ifeq ($(BUILD_FOR),Darwin)
    5.85 -    # clang issues a warning when "-pthread" is used for linking.
    5.86 -    # So, include it in CFLAGS, and not in CC
    5.87 -    CC=clang -std=c99
    5.88 -endif
    5.89 -
    5.90 -ifeq ($(BUILD_FOR),Linux)
    5.91 -    CFLAGS=-fPIC -fstrict-aliasing -fdiagnostics-color=always
    5.92 -else ifeq ($(BUILD_FOR),Darwin)
    5.93 -    CFLAGS=-pthread -fPIC -fstrict-aliasing -fcolor-diagnostics
    5.94 -endif
    5.95 -
    5.96 -CPPFLAGS=
    5.97 -
    5.98 -# The flag -DNDEBUG will always be removed from CFLAGS for compiling tests.
    5.99 -# The tests do not work properly, if compiled with -DNDEBUG
   5.100 -ifeq ($(BUILD_FOR),Linux)
   5.101 -    ifdef WARN
   5.102 -        CFLAGS+= -Wall -pedantic -Wstrict-aliasing=3
   5.103 -    else
   5.104 -        CFLAGS+= -w
   5.105 -    endif
   5.106 -    ifdef DEBUG
   5.107 -        CFLAGS+= -g -ggdb -DDEBUG_ERRORSTACK
   5.108 -    else
   5.109 -        CFLAGS+= -O3 -DNDEBUG
   5.110 -    endif
   5.111 -else ifeq ($(BUILD_FOR),Darwin)
   5.112 -    ifdef WARN
   5.113 -        # FIXME Remove 'no-extended-offsetof' after ENGINE-236 is closed.
   5.114 -        CFLAGS+= -Wall -pedantic -Wno-extended-offsetof
   5.115 -    else
   5.116 -        CFLAGS+= -w
   5.117 -    endif
   5.118 -    ifdef DEBUG
   5.119 -        CFLAGS+= -O0 -g -DDEBUG_ERRORSTACK
   5.120 -    else
   5.121 -        CFLAGS+= -O3 -DNDEBUG
   5.122 -    endif
   5.123 -endif
   5.124 -
   5.125 -# Additional CFLAGS used for compiling ASN1C-generated code
   5.126 -ifeq ($(BUILD_FOR),Linux)
   5.127 -    # The '_DEFAULT_SOURCE' feature test macro is required to suppress the warning
   5.128 -    #   _BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE
   5.129 -    # otherwise printed during the compilation of every asn1c-generated C file.
   5.130 -    # It's a glibc specific warning, only present in few versions around ~2.19.
   5.131 -    # See https://lwn.net/Articles/590381/ for a discussion.
   5.132 -    CFLAGS_GENERATED=-D_DEFAULT_SOURCE
   5.133 -else ifeq ($(BUILD_FOR),Darwin)
   5.134 -    CFLAGS_GENERATED=
   5.135 -endif
   5.136 -
   5.137 -
   5.138 -######### C++ #########
   5.139 -ifeq ($(BUILD_FOR),Linux)
   5.140 -    CXX=g++ -std=gnu++11 -pthread
   5.141 -else ifeq ($(BUILD_FOR),Darwin)
   5.142 -    # clang issues a warning when "-pthread" is used for linking. So, include it in CXXFLAGS, and not in CXX
   5.143 -    CXX=clang -std=c++11
   5.144 -endif
   5.145 -
   5.146 -# The flag -DNDEBUG will always be removed from CXXFLAGS for compiling tests.
   5.147 -# The tests do not work properly, if compiled with -DNDEBUG
   5.148 -ifeq ($(BUILD_FOR),Linux)
   5.149 -    CXXFLAGS=-fdiagnostics-color=always -I../src -I../asn.1 $(ETPAN_INC)
   5.150 -    ifdef WARN
   5.151 -        CXXFLAGS+=
   5.152 -    else
   5.153 -        CXXFLAGS+= -w
   5.154 -    endif
   5.155 -    ifdef DEBUG
   5.156 -        CXXFLAGS+= -g -ggdb
   5.157 -    else
   5.158 -        CXXFLAGS+= -O3 -DNDEBUG
   5.159 -    endif
   5.160 -else ifeq ($(BUILD_FOR),Darwin)
   5.161 -    CXXFLAGS=-pthread -fcolor-diagnostics -I../src -I../asn.1 $(ETPAN_INC)
   5.162 -    ifdef WARN
   5.163 -        CXXFLAGS+=
   5.164 -    else
   5.165 -        CXXFLAGS+= -w
   5.166 -    endif
   5.167 -    ifdef DEBUG
   5.168 -        CXXFLAGS+= -O0 -g
   5.169 -    else
   5.170 -        CXXFLAGS+= -O3 -DNDEBUG
   5.171 -    endif
   5.172 -endif
   5.173 -
   5.174 -
   5.175 -######### YML2 #########
   5.176 -YML2_PATH=$(HOME)/yml2
   5.177 -
   5.178 -YML2_PROC=$(YML2_PATH)/yml2proc
   5.179 -
   5.180 -YML2_OPTS=--encoding=utf8
   5.181 -
   5.182 -
   5.183 -######### asn1c #########
   5.184 -# asn1c binary
   5.185 -ASN1C=asn1c
   5.186 -
   5.187 -# asn1c include search flag
   5.188 -ASN1C_INC=
   5.189 -#ASN1C_INC=-I$(PREFIX)/include
   5.190 -
   5.191 -
   5.192 -######### libetpan #########
   5.193 -# libetpan library search flag
   5.194 -ETPAN_LIB=
   5.195 -#ETPAN_LIB=-L$(PREFIX)/lib
   5.196 -
   5.197 -# libetpan include search flag
   5.198 -ETPAN_INC=
   5.199 -#ETPAN_INC=-I$(PREFIX)/include
   5.200 -
   5.201 -
   5.202 -######### sqlite3 #########
   5.203 -# If empty (or undefined), compile sqlite3 from the sources shipped with the pEp distribution.
   5.204 -# Otherwise, use an sqlite3 implementation found in the OS's include/library paths.
   5.205 -SQLITE3_FROM_OS=placeholder
   5.206 -
   5.207 -
   5.208 -######### OpenPGP #########
   5.209 -# Path of GPG binary
   5.210 -# gpgconf is not available for old version of GPG, for example GPG 2.0.30. Override this variable, if you compile the engine for such an old version.
   5.211 -GPG_CMD:=$(shell gpgconf --list-components | awk -F: '/^gpg:/ { print $$3; exit 0; }')
   5.212 -
   5.213 -# Selects OpenPGP implementation. must be either `GPG` or `NETPGP`
   5.214 -OPENPGP=GPG
   5.215 -
   5.216 -# Path of libGPGME binary
   5.217 -ifeq ($(BUILD_FOR),Linux)
   5.218 -    LIBGPGME=libgpgme.so.11
   5.219 -else ifeq ($(BUILD_FOR),Darwin)
   5.220 -    LIBGPGME=libgpgme.11.dylib
   5.221 -endif
   5.222 -
   5.223 -# libGPGME library search flag
   5.224 -GPGME_LIB=
   5.225 -#GPGME_LIB=-L$(HOME)/lib
   5.226 -
   5.227 -# libGPGME include search flag
   5.228 -GPGME_INC=
   5.229 -#GPGME_INC=-I$(HOME)/include
   5.230 -
   5.231 -# NETPGP library search flag
   5.232 -NETPGP_LIB=
   5.233 -#NETPGP_LIB=-L$(PREFIX)/lib
   5.234 -
   5.235 -# libGPGME include search flag
   5.236 -NETPGP_INC=
   5.237 -#NETPGP_INC=-I$(PREFIX)/include
   5.238 -
   5.239 -
   5.240 -######### OpenPGP #########
   5.241 -# CppUnit library search flag
   5.242 -CPPUNIT_LIB=
   5.243 -#CPPUNIT_LIB=-L$(HOME)/local/lib
   5.244 -
   5.245 -# CppUnit include search flag
   5.246 -CPPUNIT_INC=
   5.247 -#CPPUNIT_INC=-I$(HOME)/local/inc
   5.248 -
   5.249 -
   5.250 -######### Engine internals #########
   5.251 -# C macros (not environment variables) that can be overridden:
   5.252 -# DEFAULT_KEYSERVER - string with default keyserver
   5.253 -# CRASHDUMP_DEFAULT_LINES - number of log lines to deliver for crashdumps
   5.254 -# Example:
   5.255 -#    EXTRA_MACROS=-DDEFAULT_KEYSERVER=\"default-server.org\" -DCRASHDUMP_DEFAULT_LINES=23
   5.256 -EXTRA_MACROS=
   5.257 -
   5.258 -
   5.259 -######### Misc #########
   5.260 -# FIXME Maybe include these variables here.
   5.261 -# Check how they are used throughout the project before setting them here
   5.262 -#LLDB_BIN
   5.263 -
   5.264 -
   5.265 -######### Footer #########
   5.266 -include $(HERE)/Makefile.conf
   5.267 -
   5.268 --include $(HERE)/local.conf
   5.269 -
   5.270 -ifdef BUILD_CONFIG
   5.271 -    include $(BUILD_CONFIG)
   5.272 -endif
   5.273 -
   5.274 -# YML_PATH is needed in the environment of every call to a program of the YML2 distribution
   5.275 -export YML_PATH=$(YML2_PATH)
     6.1 --- a/src/Makefile	Fri Dec 21 11:14:10 2018 +0100
     6.2 +++ b/src/Makefile	Fri Dec 21 16:05:05 2018 +0100
     6.3 @@ -3,7 +3,7 @@
     6.4  # This file may be used under the terms of the GNU General Public License version 3
     6.5  # see LICENSE.txt
     6.6  
     6.7 -include ../default.conf
     6.8 +include ../Makefile.conf
     6.9  
    6.10  CFLAGS+= $(ETPAN_INC) -I../asn.1 -DSYSTEM_DB=\"$(SYSTEM_DB)\" $(EXTRA_MACROS)
    6.11  LDFLAGS+= $(ETPAN_LIB) -L../asn.1 -shared
     7.1 --- a/sync/Makefile	Fri Dec 21 11:14:10 2018 +0100
     7.2 +++ b/sync/Makefile	Fri Dec 21 16:05:05 2018 +0100
     7.3 @@ -1,7 +1,7 @@
     7.4  # This file is under GNU General Public License 3.0
     7.5  # see LICENSE.txt
     7.6  
     7.7 -include ../default.conf
     7.8 +include ../Makefile.conf
     7.9  
    7.10  all: .codegen
    7.11  
     8.1 --- a/test/Makefile	Fri Dec 21 11:14:10 2018 +0100
     8.2 +++ b/test/Makefile	Fri Dec 21 16:05:05 2018 +0100
     8.3 @@ -4,7 +4,7 @@
     8.4  # This file may be used under the terms of the GNU General Public License version 3
     8.5  # see LICENSE.txt
     8.6  
     8.7 -include ../default.conf
     8.8 +include ../Makefile.conf
     8.9  
    8.10  # This is done this way because we presume that users who don't have python3 installed are also not bothering with the generated parts of the test suite (i.e. non-devs).
    8.11  # Tests will totally build and run without it.
    8.12 @@ -148,8 +148,6 @@
    8.13  	$(PY_ENV) genscripts.py
    8.14  endif
    8.15  
    8.16 -# Ah, yes, here it is. Finally someone tripped over me introducing both Makefile.conf and default.conf. TEST_DEBUGGER is documented in one, but not the other Makefile. Yeah, I should clean this up, otherwise every time a new knob is added, it will only appear in either Makefile.conf or default.conf.
    8.17 -# KB: Discuss with Volker and/or Neal. I don't use the TEST_DEBUGGER thing.
    8.18  .PHONY: test
    8.19  test: all
    8.20  	$(TEST_DEBUGGER) ./$(TARGET)