# Copyright 2018, pEp Foundation # This file is part of libpEpAdapter # This file may be used under the terms of the GNU General Public License version 3 # see LICENSE.txt HERE:=$(dir $(lastword $(MAKEFILE_LIST))) BUILD_ON:=$(shell uname) ifeq ($(BUILD_ON),OS/390) TARGETS=libpEpAdapter.a libpEpAdapter.so SO_CFLAGS = -W "l,xplink,dll" -W "c,float(ieee),xplink,dll,exportall" CPPFLAGS += -W "l,xplink,dll" -W "c,float(ieee),xplink,dll,exportall" else ifeq ($(BUILD_ON),Linux) TARGETS=libpEpAdapter.a libpEpAdapter.so SO_CFLAGS = -shared else TARGETS=libpEpAdapter.a endif # Build config # Defaults DEBUG=1 PREFIX?=$(HOME) LIBDIR?=$(HOME)/lib CXXFLAGS+=-std=c++11 -fPIC # Overrides -include $(HERE)local.conf # Constants CXXFLAGS+=-std=c++11 -fPIC CXXFLAGS+=-I$(PREFIX)/include LDFLAGS+=-L$(PREFIX)/lib ifneq (,$(findstring g++,$(CXX))) CXXFLAGS+=-fdiagnostics-color=always else ifneq (,$(findstring clang,$(CXX))) CXXFLAGS+=-fcolor-diagnostics endif ifeq ($(DEBUG),1) CXXFLAGS+=-g -O0 else CXXFLAGS+=-DNDEBUG=1 -O3 endif ifndef ENGINE_TEST ENGINE_TEST = \"$(HOME)/dev/pEpEngine/test\" endif