# 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 ######### Header ######### HERE:=$(dir $(lastword $(MAKEFILE_LIST))) ######### General ######### BUILD_FOR:=$(shell uname) PREFIX=$(HOME) ######### C and C++ ######### LDFLAGS=-L. $(ENGINE_LIB) LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter CXXFLAGS=-std=c++11 ######### C++ ######### ifeq ($(BUILD_FOR),Linux) CXX=g++ else ifeq ($(BUILD_FOR),Darwin) CXX=clang endif ifeq ($(BUILD_FOR),Linux) CXXFLAGS+=-fdiagnostics-color=always -O0 -g $(ENGINE_INC) -fPIC else ifeq ($(BUILD_FOR),Darwin) CXXFLAGS+=-fcolor-diagnostics -O0 -g $(ENGINE_INC) endif ######### Engine ######### ENGINE_LIB_PATH=$(HOME)/lib ENGINE_INC_PATH=$(HOME)/include ######### Overrides ######### -include $(HERE)/local.conf # Add Prefixes to paths, if not already explicitly set in local.conf(s) 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