|
@ -7,16 +7,18 @@ HERE:=$(dir $(lastword $(MAKEFILE_LIST))) |
|
|
|
|
|
|
|
|
TARGET=libpEpAdapter.a |
|
|
TARGET=libpEpAdapter.a |
|
|
|
|
|
|
|
|
|
|
|
# Build config
|
|
|
# Defaults
|
|
|
# Defaults
|
|
|
DEBUG=1 |
|
|
DEBUG=1 |
|
|
PREFIX?=$(HOME) |
|
|
PREFIX?=$(HOME) |
|
|
ENGINE_LIB_PATH=$(PREFIX)/lib |
|
|
|
|
|
ENGINE_INC_PATH=$(PREFIX)/include |
|
|
|
|
|
|
|
|
|
|
|
CXXFLAGS+=-std=c++14 -fPIC |
|
|
# Overrides
|
|
|
|
|
|
-include $(HERE)local.conf |
|
|
|
|
|
|
|
|
# Build target
|
|
|
# Constants
|
|
|
BUILD_FOR:=$(shell uname) |
|
|
CXXFLAGS+=-std=c++11 -fPIC |
|
|
|
|
|
CXXFLAGS+=-I$(PREFIX)/include |
|
|
|
|
|
LDFLAGS+=-L$(PREFIX)/lib |
|
|
|
|
|
|
|
|
ifneq (,$(findstring g++,$(CXX))) |
|
|
ifneq (,$(findstring g++,$(CXX))) |
|
|
CXXFLAGS+=-fdiagnostics-color=always |
|
|
CXXFLAGS+=-fdiagnostics-color=always |
|
@ -24,27 +26,12 @@ else ifneq (,$(findstring clang,$(CXX))) |
|
|
CXXFLAGS+=-fcolor-diagnostics |
|
|
CXXFLAGS+=-fcolor-diagnostics |
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
######### Overrides #########
|
|
|
|
|
|
-include $(HERE)local.conf |
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(DEBUG),1) |
|
|
ifeq ($(DEBUG),1) |
|
|
CXXFLAGS+=-g -O0 |
|
|
CXXFLAGS+=-g -O0 |
|
|
else |
|
|
else |
|
|
CXXFLAGS+=-DNDEBUG=1 -O3 |
|
|
CXXFLAGS+=-DNDEBUG=1 -O3 |
|
|
endif |
|
|
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 |
|
|
ifndef ENGINE_TEST |
|
|
ENGINE_TEST = \"$(HOME)/dev/pEpEngine/test\" |
|
|
ENGINE_TEST = \"$(HOME)/dev/pEpEngine/test\" |
|
|
endif |
|
|
endif |
|
|