Makefile.conf
author Volker Birk <vb@pep-project.org>
Thu, 14 Nov 2019 23:22:05 +0100
changeset 134 b6e70c7067b3
parent 106 0fa85ce12890
child 146 278c04ad0238
permissions -rw-r--r--
merging
damiano@85
     1
# Copyright 2018, pEp Foundation
damiano@85
     2
# This file is part of lib pEp Adapter
damiano@85
     3
# This file may be used under the terms of the GNU General Public License version 3
vb@21
     4
# see LICENSE.txt
vb@21
     5
damiano@85
     6
######### Header #########
damiano@85
     7
HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
damiano@85
     8
damiano@85
     9
damiano@85
    10
######### General #########
damiano@85
    11
BUILD_FOR:=$(shell uname)
damiano@85
    12
vb@19
    13
PREFIX=$(HOME)
vb@19
    14
damiano@85
    15
damiano@85
    16
######### C and C++ #########
damiano@91
    17
LDFLAGS=$(ENGINE_LIB) -L.
damiano@85
    18
damiano@85
    19
LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter
damiano@85
    20
damiano@85
    21
damiano@85
    22
######### C++ #########
damiano@85
    23
ifeq ($(BUILD_FOR),Linux)
damiano@85
    24
    CXX=g++ -std=c++14
damiano@85
    25
else ifeq ($(BUILD_FOR),Darwin)
damiano@85
    26
    CXX=clang -std=c++14
damiano@85
    27
endif
damiano@85
    28
damiano@85
    29
ifeq ($(BUILD_FOR),Linux)
vb@106
    30
    CXXFLAGS=-fdiagnostics-color=always -O0 -g $(ENGINE_INC) -fPIC
damiano@85
    31
else ifeq ($(BUILD_FOR),Darwin)
damiano@85
    32
    CXXFLAGS=-fcolor-diagnostics -O0 -g $(ENGINE_INC)
damiano@85
    33
endif
damiano@85
    34
damiano@85
    35
damiano@85
    36
######### Engine #########
vb@106
    37
ENGINE_LIB=-L$(HOME)/lib
damiano@85
    38
#ENGINE_LIB=-L$(HOME)/local/lib
damiano@85
    39
vb@106
    40
ENGINE_INC=-I$(HOME)/include
damiano@85
    41
#ENGINE_INC=-I$(HOME)/local/inc
damiano@85
    42
damiano@85
    43
damiano@85
    44
######### Footer #########
damiano@85
    45
-include $(HERE)/local.conf
damiano@85
    46
damiano@85
    47
ifdef BUILD_CONFIG
damiano@85
    48
    include $(BUILD_CONFIG)
damiano@85
    49
endif