forked from pEp.foundation/libpEpAdapter
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
# Copyright 2018, pEp Foundation
|
|
# This file is part of lib pEp Adapter
|
|
# This file may be used under the terms of the GNU General Public License version 3
|
|
# see LICENSE.txt
|
|
|
|
HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
|
|
|
|
|
|
PREFIX=$(HOME)
|
|
CXXFLAGS=-std=c++11 -fPIC -O0 $(ENGINE_INC)
|
|
|
|
# Build target
|
|
BUILD_FOR:=$(shell uname)
|
|
|
|
ifneq (,$(findstring g++,$(CXX)))
|
|
CXXFLAGS+=-fdiagnostics-color=always
|
|
else ifneq (,$(findstring clang,$(CXX)))
|
|
CXXFLAGS+=-fcolor-diagnostics
|
|
endif
|
|
|
|
# Debug or Release build
|
|
DEBUG=1
|
|
ifeq ($(DEBUG),1)
|
|
$(info Debug build (set DEBUG=0 for release build))
|
|
CXXFLAGS+=-g
|
|
else
|
|
$(info Release Build (set DEBUG=1 for debug build))
|
|
CXXFLAGS+=-DNDEBUG=1
|
|
endif
|
|
|
|
######### Engine #########
|
|
ENGINE_LIB_PATH=$(HOME)/lib
|
|
ENGINE_INC_PATH=$(HOME)/include
|
|
|
|
######### Overrides #########
|
|
-include $(HERE)/local.conf
|
|
|
|
# Add -L Prefixes to LIB/INC paths,
|
|
# if not already explicitly set in local.conf
|
|
ifndef ENGINE_LIB
|
|
ENGINE_LIB=-L$(ENGINE_LIB_PATH)
|
|
endif
|
|
ifndef ENGINE_INC
|
|
ENGINE_INC=-I$(ENGINE_INC_PATH)
|
|
endif
|
|
|
|
ifdef BUILD_CONFIG
|
|
include $(BUILD_CONFIG)
|
|
endif
|