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

62 lines
1.6 KiB

# 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
# 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 <subdir>/local.conf
######### YML2 #########
YML2_PATH=$(HOME)/yml2
YML2_PROC=$(YML2_PATH)/yml2proc $(YML2_OPTS)
YML2_OPTS=--encoding=utf8
######### Engine #########
ENGINE_LIB=-L$(HOME)/lib
ENGINE_INC=-I$(HOME)/include
######### libAdapter #########
AD_LIB=-L$(HOME)/lib
AD_INC=-I$(HOME)/include
######### Overrides #########
-include $(HERE)/local.conf
-include $(HERE)/src/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)