You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libpEpAdapter/Makefile.conf

51 lines
987 B
Makefile

# 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
5 years ago
# see LICENSE.txt
HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
# Defaults
DEBUG=1
PREFIX?=$(HOME)
ENGINE_LIB_PATH=$(PREFIX)/lib
ENGINE_INC_PATH=$(PREFIX)/include
CXXFLAGS+=-std=c++11 -fPIC
# Build target
BUILD_FOR:=$(shell uname)
ifneq (,$(findstring g++,$(CXX)))
CXXFLAGS+=-fdiagnostics-color=always
else ifneq (,$(findstring clang,$(CXX)))
CXXFLAGS+=-fcolor-diagnostics
endif
######### Overrides #########
-include $(HERE)local.conf
ifeq ($(DEBUG),1)
CXXFLAGS+=-g -O0
else
CXXFLAGS+=-DNDEBUG=1 -O3
endif
# 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
CXXFLAGS += $(ENGINE_INC)
ifndef ENGINE_TEST
ENGINE_TEST = \"$(HOME)/dev/pEpEngine/test\"
endif