1.1 --- a/Makefile.conf Thu Oct 26 15:43:22 2017 +0200
1.2 +++ b/Makefile.conf Thu Oct 26 16:06:19 2017 +0200
1.3 @@ -3,233 +3,107 @@
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 gives an overview over all the parameters that can be easily customized for a build.
1.8 -# There are three ways in which you can customize your build:
1.9 -# 1) Edit the variable assignments in this file
1.10 -# 2) Create `local.conf` and fill it with variable assignments.
1.11 -# These `local.conf` takes precedence over the assignments below.
1.12 -# 3) Set the environment variable `BUILD_CONFIG` to an absolute path.
1.13 -# The variable assignments found at the path indicated by `BUILD_CONFIG` take precedence over the assignments below and the assignments in `local.conf`.
1.14 -# If nothing is changed according to these 3 methods, a default configuration for your platform will be used for the build.
1.15 -
1.16 -HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
1.17
1.18 ######### General #########
1.19 # To use (only) system libraries, set all the *_INC and *_LIB variables to the empty string.
1.20 # All the *_INC and *_LIB variables are command line flags, not paths.
1.21 # Thus, all *_INC variables' values must start with "-I", and all *_LIB variables' values must start with "-L".
1.22
1.23 -BUILD_ON:=$(shell uname)
1.24 +#BUILD_ON:=$(shell uname)
1.25
1.26 # This variable specifies the platform that the engine should be cross-compiled for.
1.27 -BUILD_FOR=$(BUILD_ON)
1.28 -
1.29 -# Cross-compiling is currently not supported.
1.30 -# Maybe you can hack something with `local.conf`.
1.31 -ifneq ($(BUILD_ON),$(BUILD_FOR))
1.32 - $(error I don't know how to build for $(BUILD_FOR) on $(BUILD_ON).)
1.33 -endif
1.34 +#BUILD_FOR=$(BUILD_ON)
1.35
1.36 # Installation path prefix for libraries and binaries, except for system.db
1.37 -PREFIX=$(HOME)
1.38 +#PREFIX=$(HOME)
1.39
1.40 # Installation path for system.db
1.41 -SYSTEM_DB=/usr/local/share/pEp/system.db
1.42 +#SYSTEM_DB=/usr/local/share/pEp/system.db
1.43
1.44 # Filename of the pEpEngine library
1.45 -ifeq ($(BUILD_FOR),Linux)
1.46 - TARGET=libpEpEngine.so
1.47 -else ifeq ($(BUILD_FOR),Darwin)
1.48 - TARGET=libpEpEngine.dylib
1.49 -endif
1.50 -
1.51 -# If empty, create a release build.
1.52 -# Otherwise, create a debug build.
1.53 -# This variable is ineffective in your local.conf file.
1.54 -DEBUG=YES
1.55 -
1.56 -# If empty, suppress compiler warnings.
1.57 -# Otherwise, print warnings.
1.58 -# This variable is ineffective in your local.conf file.
1.59 -WARN=placeholder
1.60 +#TARGET=libpEpEngine.so
1.61
1.62
1.63 ######### C and C++ #########
1.64 -TARGET_ARCH=
1.65 +#TARGET_ARCH=
1.66 +
1.67 # The following two variables will be appended to.
1.68 # You can thus not set them to a fixed value here.
1.69 -ifeq ($(BUILD_FOR),Linux)
1.70 - LDFLAGS=
1.71 -else ifeq ($(BUILD_FOR),Darwin)
1.72 - # "-bind_at_load" helps find symbol resolution errors faster
1.73 - LDFLAGS=-bind_at_load
1.74 -endif
1.75 +#LDFLAGS=
1.76
1.77 -LDLIBS=
1.78 +#LDLIBS=
1.79
1.80
1.81 ######### C #########
1.82 -ifeq ($(BUILD_FOR),Linux)
1.83 - CC=gcc -std=c99 -pthread
1.84 -else ifeq ($(BUILD_FOR),Darwin)
1.85 - # clang issues a warning when "-pthread" is used for linking.
1.86 - # So, include it in CFLAGS, and not in CC
1.87 - CC=clang -std=c99
1.88 -endif
1.89 +#CC=
1.90
1.91 -ifeq ($(BUILD_FOR),Linux)
1.92 - CFLAGS=-fPIC -fstrict-aliasing -fdiagnostics-color=always
1.93 -else ifeq ($(BUILD_FOR),Darwin)
1.94 - CFLAGS=-pthread -fPIC -fstrict-aliasing -fcolor-diagnostics
1.95 -endif
1.96 -
1.97 -CPPFLAGS=
1.98 +#CFLAGS=-fPIC -fstrict-aliasing -fdiagnostics-color=always
1.99
1.100 -# The flag -DNDEBUG will always be removed from CFLAGS for compiling tests.
1.101 -# The tests do not work properly, if compiled with -DNDEBUG
1.102 -ifeq ($(BUILD_FOR),Linux)
1.103 - ifdef WARN
1.104 - CFLAGS+= -Wall -pedantic -Wstrict-aliasing=3
1.105 - else
1.106 - CFLAGS+= -w
1.107 - endif
1.108 - ifdef DEBUG
1.109 - CFLAGS+= -Og -ggdb -DDEBUG_ERRORSTACK
1.110 - else
1.111 - CFLAGS+= -O3 -DNDEBUG
1.112 - endif
1.113 -else ifeq ($(BUILD_FOR),Darwin)
1.114 - ifdef WARN
1.115 - # FIXME Remove 'no-extended-offsetof' after ENGINE-236 is closed.
1.116 - CFLAGS+= -Wall -pedantic -Wno-extended-offsetof
1.117 - else
1.118 - CFLAGS+= -w
1.119 - endif
1.120 - ifdef DEBUG
1.121 - CFLAGS+= -O0 -g -DDEBUG_ERRORSTACK
1.122 - else
1.123 - CFLAGS+= -O3 -DNDEBUG
1.124 - endif
1.125 -endif
1.126 +#CPPFLAGS=
1.127 +
1.128 +#CFLAGS+= -w -O3 -DNDEBUG
1.129
1.130 # Additional CFLAGS used for compiling ASN1C-generated code
1.131 -ifeq ($(BUILD_FOR),Linux)
1.132 - # The '_DEFAULT_SOURCE' feature test macro is required to suppress the warning
1.133 - # _BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE
1.134 - # otherwise printed during the compilation of every asn1c-generated C file.
1.135 - # It's a glibc specific warning, only present in few versions around ~2.19.
1.136 - # See https://lwn.net/Articles/590381/ for a discussion.
1.137 - CFLAGS_GENERATED=-D_DEFAULT_SOURCE
1.138 -else ifeq ($(BUILD_FOR),Darwin)
1.139 - CFLAGS_GENERATED=
1.140 -endif
1.141 +#CFLAGS_GENERATED=-D_DEFAULT_SOURCE
1.142
1.143
1.144 ######### C++ #########
1.145 -ifeq ($(BUILD_FOR),Linux)
1.146 - CXX=g++ -std=gnu++11 -pthread
1.147 -else ifeq ($(BUILD_FOR),Darwin)
1.148 - # clang issues a warning when "-pthread" is used for linking. So, include it in CXXFLAGS, and not in CXX
1.149 - CXX=clang -std=c++11
1.150 -endif
1.151 +#CXX=g++ -std=gnu++11 -pthread
1.152
1.153 -# The flag -DNDEBUG will always be removed from CXXFLAGS for compiling tests.
1.154 -# The tests do not work properly, if compiled with -DNDEBUG
1.155 -ifeq ($(BUILD_FOR),Linux)
1.156 - CXXFLAGS=-fdiagnostics-color=always -I../src -I../asn.1 $(ETPAN_INC)
1.157 - ifdef WARN
1.158 - CXXFLAGS+=
1.159 - else
1.160 - CXXFLAGS+= -w
1.161 - endif
1.162 - ifdef DEBUG
1.163 - CXXFLAGS+= -Og -ggdb
1.164 - else
1.165 - CXXFLAGS+= -O3 -DNDEBUG
1.166 - endif
1.167 -else ifeq ($(BUILD_FOR),Darwin)
1.168 - CXXFLAGS=-pthread -fcolor-diagnostics -I../src -I../asn.1 $(ETPAN_INC)
1.169 - ifdef WARN
1.170 - CXXFLAGS+=
1.171 - else
1.172 - CXXFLAGS+= -w
1.173 - endif
1.174 - ifdef DEBUG
1.175 - CXXFLAGS+= -O0 -g
1.176 - else
1.177 - CXXFLAGS+= -O3 -DNDEBUG
1.178 - endif
1.179 -endif
1.180 +#CXXFLAGS=-fdiagnostics-color=always -I../src -I../asn.1 $(ETPAN_INC) -w -O3 -DNDEBUG
1.181
1.182
1.183 ######### YML2 #########
1.184 -YML2_PATH=$(HOME)/yml2
1.185 -
1.186 -YML2_PROC=$(YML2_PATH)/yml2proc
1.187 +#YML2_PATH=$(HOME)/yml2
1.188
1.189 -YML2_OPTS=--encoding=utf8
1.190 +#YML2_PROC=$(YML2_PATH)/yml2proc
1.191
1.192 -# YML_PATH is needed in the environment of every call to a program of the YML2 distribution
1.193 -export YML_PATH=$(YML2_PATH)
1.194 +#YML2_OPTS=--encoding=utf8
1.195 +
1.196
1.197 ######### asn1c #########
1.198 # asn1c binary
1.199 -ASN1C=asn1c
1.200 +#ASN1C=asn1c
1.201
1.202 # asn1c include search flag
1.203 -ASN1C_INC=
1.204 #ASN1C_INC=-I$(HOME)/include
1.205
1.206
1.207 ######### libetpan #########
1.208 # libetpan library search flag
1.209 -ETPAN_LIB=-L$(PREFIX)/lib
1.210 +#ETPAN_LIB=-L$(PREFIX)/lib
1.211
1.212 # libetpan include search flag
1.213 -ETPAN_INC=-I$(PREFIX)/include
1.214 +#ETPAN_INC=-I$(PREFIX)/include
1.215
1.216
1.217 ######### sqlite3 #########
1.218 # If empty (or undefined), compile sqlite3 from the sources shipped with the pEp distribution.
1.219 # Otherwise, use an sqlite3 implementation found in the OS's include/library paths.
1.220 -SQLITE3_FROM_OS=placeholder
1.221 +#SQLITE3_FROM_OS=placeholder
1.222
1.223
1.224 ######### OpenPGP #########
1.225 # Path of GPG binary
1.226 # 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.
1.227 -GPG_CMD:=$(shell gpgconf --list-components | awk -F: '/^gpg:/ { print $$3; exit 0; }')
1.228 +#GPG_CMD:=$(shell gpgconf --list-components | awk -F: '/^gpg:/ { print $$3; exit 0; }')
1.229
1.230 # Selects OpenPGP implementation. must be either `GPG` or `NETPGP`
1.231 -OPENPGP=GPG
1.232 +#OPENPGP=GPG
1.233
1.234 # Path of libGPGME binary
1.235 -ifeq ($(BUILD_FOR),Linux)
1.236 - LIBGPGME=libgpgme.so.11
1.237 -else ifeq ($(BUILD_FOR),Darwin)
1.238 - LIBGPGME=libgpgme.dylib
1.239 -endif
1.240 +#LIBGPGME=libgpgme.so.11
1.241
1.242 # libGPGME library search flag
1.243 -ifeq ($(BUILD_FOR),Linux)
1.244 - GPGME_LIB=
1.245 -else ifeq ($(BUILD_FOR),Darwin)
1.246 - GPGME_LIB=-L$(HOME)/lib
1.247 -endif
1.248 +#GPGME_LIB=
1.249
1.250 # libGPGME include search flag
1.251 -ifeq ($(BUILD_FOR),Linux)
1.252 - GPGME_INC=
1.253 -else ifeq ($(BUILD_FOR),Darwin)
1.254 - GPGME_INC=-I$(HOME)/include
1.255 -endif
1.256 +#GPGME_INC=
1.257
1.258 # NETPGP library search flag
1.259 -NETPGP_LIB=
1.260 #NETPGP_LIB=-L$(PREFIX)/lib
1.261
1.262 # libGPGME include search flag
1.263 -NETPGP_INC=
1.264 #NETPGP_INC=-I$(PREFIX)/include
1.265
1.266
1.267 @@ -239,17 +113,4 @@
1.268 # CRASHDUMP_DEFAULT_LINES - number of log lines to deliver for crashdumps
1.269 # Example:
1.270 # EXTRA_MACROS=-DDEFAULT_KEYSERVER=\"default-server.org\" -DCRASHDUMP_DEFAULT_LINES=23
1.271 -EXTRA_MACROS=
1.272 -
1.273 -
1.274 -######### Misc #########
1.275 -# FIXME Maybe include these variables here.
1.276 -# Check how they are used throughout the project before setting them here
1.277 -#LLDB_BIN
1.278 -
1.279 -
1.280 --include $(HERE)/local.conf
1.281 -
1.282 -ifdef BUILD_CONFIG
1.283 - -include $(BUILD_CONFIG)
1.284 -endif
1.285 +#EXTRA_MACROS=