# 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 LDFLAGS+=-shared $(ENGINE_LIB) $(AD_LIB) LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter ######### C++ ######### ifeq ($(BUILD_FOR),Linux) CXX=g++ -std=c++14 else ifeq ($(BUILD_FOR),Darwin) CXX=clang -std=c++14 endif ifeq ($(BUILD_FOR),Linux) CXXFLAGS+=-fdiagnostics-color=always -fpermissive -fPIC -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux $(AD_INC) $(ENGINE_INC) else ifeq ($(BUILD_FOR),Darwin) CXXFLAGS+=-fcolor-diagnostics -fpermissive -fPIC -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin $(AD_INC) $(ENGINE_INC) endif ######### YML2 ######### YML2_PATH=$(HOME)/yml2 YML2_PROC=$(YML2_PATH)/yml2proc $(YML2_OPTS) YML2_OPTS=--encoding=utf8 ######### Engine ######### ENGINE_LIB= #ENGINE_LIB=-L$(HOME)/lib ENGINE_INC= #ENGINE_INC=-I$(ENGINE_INC_DIR) ######### libAdapter ######### AD_LIB= #AD_LIB=-L$(HOME)/local/lib AD_INC= #AD_INC=-I$(HOME)/local/inc ######### Footer ######### -include $(HERE)/local.conf 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)