Browse Source

Build: Change build config to adhere to standard for all adapters

The idea is to avoid depending to n locations for n dependencies. Install everything into a $PREFIX, and depend to $PREFIX only. simple.
master
heck 8 months ago
parent
commit
bf69057e72
5 changed files with 16 additions and 39 deletions
  1. +2
    -11
      Makefile.conf
  2. +0
    -10
      local.conf.example
  3. +0
    -4
      src/Makefile
  4. +11
    -11
      test/java/foundation/pEp/jniadapter/test/Makefile.conf
  5. +3
    -3
      test/java/foundation/pEp/jniadapter/test/speedtest/speedtest.sh

+ 2
- 11
Makefile.conf View File

@ -16,10 +16,6 @@ PREFIX=$(HOME)
YML2_PATH=$(PREFIX)/src/yml2
YML2_PROC=$(YML2_PATH)/yml2proc $(YML2_OPTS)
YML2_OPTS=--encoding=utf8
ENGINE_LIB_PATH=$(PREFIX)/lib
ENGINE_INC_PATH=$(PREFIX)/include
AD_LIB_PATH=$(PREFIX)/lib
AD_INC_PATH=$(PREFIX)/include
### Guessing JAVA_HOME
@ -38,11 +34,6 @@ else
endif
### Apply config
ENGINE_LIB=-L$(ENGINE_LIB_PATH)
ENGINE_INC=-I$(ENGINE_INC_PATH)
AD_LIB=-L$(AD_LIB_PATH)
AD_INC=-I$(AD_INC_PATH)
ifndef JAVA_HOME
$(error JAVA_HOME is not set!)
endif
@ -61,8 +52,8 @@ endif
JAVA_BIN_DIR=$(JAVA_HOME)/bin
######### C and C++ #########
CXXFLAGS+=-O0 -std=c++11 -fpermissive -fPIC -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM) $(AD_INC) $(ENGINE_INC)
LDFLAGS+=-shared $(ENGINE_LIB) $(AD_LIB)
CXXFLAGS+=-O0 -std=c++11 -fpermissive -fPIC -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM) -I$(PREFIX)/include -I$(PREFIX)/include/pEp
LDFLAGS+=-shared -L$(PREFIX)/lib
LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter
ifneq (,$(findstring g++,$(CXX)))
CXXFLAGS+=-fdiagnostics-color=always


+ 0
- 10
local.conf.example View File

@ -18,13 +18,3 @@
############ YML2 ##############
# YML2_PATH=$(HOME)/src/yml2
########### Engine #############
# ENGINE_LIB_PATH=$(PREFIX)/lib
# ENGINE_INC_PATH=$(PREFIX)/include
########## libAdapter ##########
# AD_LIB_PATH=$(PREFIX)/lib
# AD_INC_PATH=$(PREFIX)/include

+ 0
- 4
src/Makefile View File

@ -34,10 +34,6 @@ $(info DEBUG: $(DEBUG))
$(info CXX: $(CXX))
$(info JAVA_HOME: $(JAVA_HOME))
$(info USE_JAVAH: $(USE_JAVAH))
$(info ENGINE_LIB_PATH: $(ENGINE_LIB_PATH))
$(info ENGINE_INC_PATH: $(ENGINE_INC_PATH))
$(info AD_LIB_PATH: $(AD_LIB_PATH))
$(info AD_INC_PATH: $(AD_INC_PATH))
$(info YML2_PATH: $(YML2_PATH))
$(info CXXFLAGS: $(CXXFLAGS))
$(info LDFLAGS: $(LDFLAGS))


+ 11
- 11
test/java/foundation/pEp/jniadapter/test/Makefile.conf View File

@ -34,15 +34,15 @@ JAVA_CLASSES+=$(UTIL_CLASSES)
PITYTEST_DIR=../../../pitytest
ifdef ENGINE_LIB_PATH
ifeq ($(PLATFORM),linux)
ifndef LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$(ENGINE_LIB_PATH)
endif
else ifeq ($(PLATFORM),darwin)
ifndef DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$(ENGINE_LIB_PATH)
endif
endif
endif
# ifdef ENGINE_LIB_PATH
# ifeq ($(PLATFORM),linux)
# ifndef LD_LIBRARY_PATH
# export LD_LIBRARY_PATH=$(ENGINE_LIB_PATH)
# endif
# else ifeq ($(PLATFORM),darwin)
# ifndef DYLD_LIBRARY_PATH
# export DYLD_LIBRARY_PATH=$(ENGINE_LIB_PATH)
# endif
# endif
# endif

+ 3
- 3
test/java/foundation/pEp/jniadapter/test/speedtest/speedtest.sh View File

@ -1,10 +1,10 @@
#!/usr/bin/env bash
ENGINE_LIB_PATH=$HOME/local-default/lib
PREFIX=$HOME/local
export HOME=../resources/per-user-dirs/alice
export LD_LIBRARY_PATH=$ENGINE_LIB_PATH
export DYLD_LIBRARY_PATH=$ENGINE_LIB_PATH
export LD_LIBRARY_PATH=$PREFIX/lib
export DYLD_LIBRARY_PATH=$PREFIX/lib
cd ../../../../../
java -enableassertions -Xcheck:jni -cp .:../../src -Djava.library.path=.:../../src foundation.pEp.jniadapter.test.speedtest.SpeedTest $@

Loading…
Cancel
Save