Browse Source

Group java-related vars together in make

JNI-76
Damiano Boppart 7 years ago
parent
commit
5d86f97dca
  1. 20
      src/Makefile
  2. 4
      src/Makefile.conf

20
src/Makefile

@ -21,6 +21,14 @@ ifndef JAVA_HOME
$(error JAVA_HOME is not set!)
endif
JP=$(JAVA_HOME)/bin
# Old versions of a Java distribution have a `javah` binary, new versions do not. This checks whether or not `javah` can be found in the Java distribution found in the directory `$JAVA_HOME`.
NOT_USED:=$(shell type $(JAVA_HOME)/bin/javah)
ifeq ($(.SHELLSTATUS),0)
OLD_JAVA=placeholder
endif
LIBRARY=libpEpJNI.a
JAR=jniadapter.jar
@ -32,10 +40,6 @@ else
$(error I don't know how to build for $(BUILD_FOR).)
endif
LDFLAGS=-shared $(ENGINE_LIB) $(AD_LIB)
LDLIBS=-lstdc++ -lpEpEngine
JAVA_SOURCES=org/pEp/jniadapter/pEpException.java \
org/pEp/jniadapter/AbstractEngine.java \
org/pEp/jniadapter/Message.java \
@ -54,14 +58,6 @@ C_SOURCES=org_pEp_jniadapter_Engine.cc \
throw_pEp_exception.hh \
org_pEp_jniadapter_AbstractEngine.h
# Old versions of a Java distribution have a `javah` binary, new versions do not. This checks whether or not `javah` can be found in the Java distribution found in the directory `$JAVA_HOME`.
NOT_USED:=$(shell type $(JAVA_HOME)/bin/javah)
ifeq ($(.SHELLSTATUS),0)
OLD_JAVA=placeholder
endif
JP=$(JAVA_HOME)/bin
.PHONY: all
all: $(JAR) $(SHARED)

4
src/Makefile.conf

@ -16,7 +16,9 @@ BUILD_FOR:=$(shell uname)
######### C and C++ #########
LDFLAGS=$(AD_INC) $(ENGINE_INC)
LDFLAGS=-shared $(ENGINE_LIB) $(AD_LIB)
LDLIBS=-lstdc++ -lpEpEngine
######### C++ #########

Loading…
Cancel
Save