# Copyright 2018, pEp Foundation # This file is part of pEp JNI 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) ######### Java ######### #JAVA_HOME= ######### C and C++ ######### CXXFLAGS+=-g -O0 -std=c++11 LDFLAGS+=-shared $(ENGINE_LIB) $(AD_LIB) LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter CXXFLAGS+=-fpermissive -fPIC -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(shell uname) $(AD_INC) $(ENGINE_INC) ifneq (,$(findstring g++,$(CXX))) CXXFLAGS+=-fdiagnostics-color=always else ifneq (,$(findstring clang,$(CXX))) CXXFLAGS+=-fcolor-diagnostics endif # DEV ENV PATHS & CFG # The dev environment paths and configs are set to a default value which can be overridden by ./local.conf and overridden again by /local.conf ######### YML2 ######### YML2_PATH=$(HOME)/yml2 YML2_PROC=$(YML2_PATH)/yml2proc $(YML2_OPTS) YML2_OPTS=--encoding=utf8 ######### Engine ######### ENGINE_LIB_PATH=$(HOME)/lib ENGINE_INC_PATH=$(HOME)/include ######### libAdapter ######### AD_LIB_PATH=$(HOME)/lib AD_INC_PATH=$(HOME)/include ######### Overrides ######### -include $(HERE)/local.conf -include $(HERE)/src/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 ifndef AD_LIB AD_LIB=-L$(AD_LIB_PATH) endif ifndef AD_INC AD_INC=-I$(AD_INC_PATH) endif ifdef BUILD_CONFIG include $(BUILD_CONFIG) endif # YML_PATH is needed in the environment of every call to a program of the YML2 distribution export YML_PATH=$(YML2_PATH)