Makefile.conf
branchENGINE-261
changeset 2211 588c4a473ef1
parent 2163 1dc9a93b3a61
child 2221 07ce59b5c058
child 2458 2dfe65bd3613
     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 +#CFLAGS=-fPIC -fstrict-aliasing -fdiagnostics-color=always
    1.97  
    1.98 -CPPFLAGS=
    1.99 +#CPPFLAGS=
   1.100  
   1.101 -# The flag -DNDEBUG will always be removed from CFLAGS for compiling tests.
   1.102 -# The tests do not work properly, if compiled with -DNDEBUG
   1.103 -ifeq ($(BUILD_FOR),Linux)
   1.104 -    ifdef WARN
   1.105 -        CFLAGS+= -Wall -pedantic -Wstrict-aliasing=3
   1.106 -    else
   1.107 -        CFLAGS+= -w
   1.108 -    endif
   1.109 -    ifdef DEBUG
   1.110 -        CFLAGS+= -Og -ggdb -DDEBUG_ERRORSTACK
   1.111 -    else
   1.112 -        CFLAGS+= -O3 -DNDEBUG
   1.113 -    endif
   1.114 -else ifeq ($(BUILD_FOR),Darwin)
   1.115 -    ifdef WARN
   1.116 -        # FIXME Remove 'no-extended-offsetof' after ENGINE-236 is closed.
   1.117 -        CFLAGS+= -Wall -pedantic -Wno-extended-offsetof
   1.118 -    else
   1.119 -        CFLAGS+= -w
   1.120 -    endif
   1.121 -    ifdef DEBUG
   1.122 -        CFLAGS+= -O0 -g -DDEBUG_ERRORSTACK
   1.123 -    else
   1.124 -        CFLAGS+= -O3 -DNDEBUG
   1.125 -    endif
   1.126 -endif
   1.127 +#CFLAGS+= -w -O3 -DNDEBUG
   1.128  
   1.129  # Additional CFLAGS used for compiling ASN1C-generated code
   1.130 -ifeq ($(BUILD_FOR),Linux)
   1.131 -    # The '_DEFAULT_SOURCE' feature test macro is required to suppress the warning
   1.132 -    #   _BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE
   1.133 -    # otherwise printed during the compilation of every asn1c-generated C file.
   1.134 -    # It's a glibc specific warning, only present in few versions around ~2.19.
   1.135 -    # See https://lwn.net/Articles/590381/ for a discussion.
   1.136 -    CFLAGS_GENERATED=-D_DEFAULT_SOURCE
   1.137 -else ifeq ($(BUILD_FOR),Darwin)
   1.138 -    CFLAGS_GENERATED=
   1.139 -endif
   1.140 +#CFLAGS_GENERATED=-D_DEFAULT_SOURCE
   1.141  
   1.142  
   1.143  ######### C++ #########
   1.144 -ifeq ($(BUILD_FOR),Linux)
   1.145 -    CXX=g++ -std=gnu++11 -pthread
   1.146 -else ifeq ($(BUILD_FOR),Darwin)
   1.147 -    # clang issues a warning when "-pthread" is used for linking. So, include it in CXXFLAGS, and not in CXX
   1.148 -    CXX=clang -std=c++11
   1.149 -endif
   1.150 +#CXX=g++ -std=gnu++11 -pthread
   1.151  
   1.152 -# The flag -DNDEBUG will always be removed from CXXFLAGS for compiling tests.
   1.153 -# The tests do not work properly, if compiled with -DNDEBUG
   1.154 -ifeq ($(BUILD_FOR),Linux)
   1.155 -    CXXFLAGS=-fdiagnostics-color=always -I../src -I../asn.1 $(ETPAN_INC)
   1.156 -    ifdef WARN
   1.157 -        CXXFLAGS+=
   1.158 -    else
   1.159 -        CXXFLAGS+= -w
   1.160 -    endif
   1.161 -    ifdef DEBUG
   1.162 -        CXXFLAGS+= -Og -ggdb
   1.163 -    else
   1.164 -        CXXFLAGS+= -O3 -DNDEBUG
   1.165 -    endif
   1.166 -else ifeq ($(BUILD_FOR),Darwin)
   1.167 -    CXXFLAGS=-pthread -fcolor-diagnostics -I../src -I../asn.1 $(ETPAN_INC)
   1.168 -    ifdef WARN
   1.169 -        CXXFLAGS+=
   1.170 -    else
   1.171 -        CXXFLAGS+= -w
   1.172 -    endif
   1.173 -    ifdef DEBUG
   1.174 -        CXXFLAGS+= -O0 -g
   1.175 -    else
   1.176 -        CXXFLAGS+= -O3 -DNDEBUG
   1.177 -    endif
   1.178 -endif
   1.179 +#CXXFLAGS=-fdiagnostics-color=always -I../src -I../asn.1 $(ETPAN_INC) -w -O3 -DNDEBUG
   1.180  
   1.181  
   1.182  ######### YML2 #########
   1.183 -YML2_PATH=$(HOME)/yml2
   1.184 +#YML2_PATH=$(HOME)/yml2
   1.185  
   1.186 -YML2_PROC=$(YML2_PATH)/yml2proc
   1.187 +#YML2_PROC=$(YML2_PATH)/yml2proc
   1.188  
   1.189 -YML2_OPTS=--encoding=utf8
   1.190 +#YML2_OPTS=--encoding=utf8
   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  
   1.195  ######### asn1c #########
   1.196  # asn1c binary
   1.197 -ASN1C=asn1c
   1.198 +#ASN1C=asn1c
   1.199  
   1.200  # asn1c include search flag
   1.201 -ASN1C_INC=
   1.202  #ASN1C_INC=-I$(HOME)/include
   1.203  
   1.204  
   1.205  ######### libetpan #########
   1.206  # libetpan library search flag
   1.207 -ETPAN_LIB=-L$(PREFIX)/lib
   1.208 +#ETPAN_LIB=-L$(PREFIX)/lib
   1.209  
   1.210  # libetpan include search flag
   1.211 -ETPAN_INC=-I$(PREFIX)/include
   1.212 +#ETPAN_INC=-I$(PREFIX)/include
   1.213  
   1.214  
   1.215  ######### sqlite3 #########
   1.216  # If empty (or undefined), compile sqlite3 from the sources shipped with the pEp distribution.
   1.217  # Otherwise, use an sqlite3 implementation found in the OS's include/library paths.
   1.218 -SQLITE3_FROM_OS=placeholder
   1.219 +#SQLITE3_FROM_OS=placeholder
   1.220  
   1.221  
   1.222  ######### OpenPGP #########
   1.223  # Path of GPG binary
   1.224  # 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.225 -GPG_CMD:=$(shell gpgconf --list-components | awk -F: '/^gpg:/ { print $$3; exit 0; }')
   1.226 +#GPG_CMD:=$(shell gpgconf --list-components | awk -F: '/^gpg:/ { print $$3; exit 0; }')
   1.227  
   1.228  # Selects OpenPGP implementation. must be either `GPG` or `NETPGP`
   1.229 -OPENPGP=GPG
   1.230 +#OPENPGP=GPG
   1.231  
   1.232  # Path of libGPGME binary
   1.233 -ifeq ($(BUILD_FOR),Linux)
   1.234 -    LIBGPGME=libgpgme.so.11
   1.235 -else ifeq ($(BUILD_FOR),Darwin)
   1.236 -    LIBGPGME=libgpgme.dylib
   1.237 -endif
   1.238 +#LIBGPGME=libgpgme.so.11
   1.239  
   1.240  # libGPGME library search flag
   1.241 -ifeq ($(BUILD_FOR),Linux)
   1.242 -    GPGME_LIB=
   1.243 -else ifeq ($(BUILD_FOR),Darwin)
   1.244 -    GPGME_LIB=-L$(HOME)/lib
   1.245 -endif
   1.246 +#GPGME_LIB=
   1.247  
   1.248  # libGPGME include search flag
   1.249 -ifeq ($(BUILD_FOR),Linux)
   1.250 -    GPGME_INC=
   1.251 -else ifeq ($(BUILD_FOR),Darwin)
   1.252 -    GPGME_INC=-I$(HOME)/include
   1.253 -endif
   1.254 +#GPGME_INC=
   1.255  
   1.256  # NETPGP library search flag
   1.257 -NETPGP_LIB=
   1.258  #NETPGP_LIB=-L$(PREFIX)/lib
   1.259  
   1.260  # libGPGME include search flag
   1.261 -NETPGP_INC=
   1.262  #NETPGP_INC=-I$(PREFIX)/include
   1.263  
   1.264  
   1.265 @@ -239,17 +113,4 @@
   1.266  # CRASHDUMP_DEFAULT_LINES - number of log lines to deliver for crashdumps
   1.267  # Example:
   1.268  #    EXTRA_MACROS=-DDEFAULT_KEYSERVER=\"default-server.org\" -DCRASHDUMP_DEFAULT_LINES=23
   1.269 -EXTRA_MACROS=
   1.270 -
   1.271 -
   1.272 -######### Misc #########
   1.273 -# FIXME Maybe include these variables here.
   1.274 -# Check how they are used throughout the project before setting them here
   1.275 -#LLDB_BIN
   1.276 -
   1.277 -
   1.278 --include $(HERE)/local.conf
   1.279 -
   1.280 -ifdef BUILD_CONFIG
   1.281 -    -include $(BUILD_CONFIG)
   1.282 -endif
   1.283 +#EXTRA_MACROS=