132 lines
3.0 KiB
Plaintext
132 lines
3.0 KiB
Plaintext
#This file is part of SECONDO.
|
|
#
|
|
#Copyright (C) 2004, University in Hagen, Department of Computer Science,
|
|
#Database Systems for New Applications.
|
|
#
|
|
#SECONDO is free software; you can redistribute it and/or modify
|
|
#it under the terms of the GNU General Public License as published by
|
|
#the Free Software Foundation; either version 2 of the License, or
|
|
#(at your option) any later version.
|
|
#
|
|
#SECONDO is distributed in the hope that it will be useful,
|
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
#GNU General Public License for more details.
|
|
#
|
|
#You should have received a copy of the GNU General Public License
|
|
#along with SECONDO; if not, write to the Free Software
|
|
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
JVMINIT_O_FILE = $(SECONDO_BUILD_DIR)/Tools/Jni/JVMInit.o
|
|
JNITool_O_FILE = $(SECONDO_BUILD_DIR)/Tools/Jni/JNITool.o
|
|
|
|
JNILIBFILES = $(JVMINIT_O_FILE) $(JNITool_O_FILE)
|
|
|
|
|
|
JNILDFLAGS += $(JNILIBFILES)
|
|
|
|
ifeq ($(platform),win32)
|
|
|
|
space :=
|
|
space +=
|
|
|
|
|
|
J2SDK_ROOT:=$(subst $(space),\$(space),$(J2SDK_ROOT))
|
|
|
|
# directory where i can find the jni.h
|
|
ifndef JNI_H_DIR
|
|
JNI_H_DIR := $(J2SDK_ROOT)/include
|
|
endif
|
|
|
|
# directory where i can find the libjava.dll
|
|
LIBJAVA_DIR := "$(J2SDK_ROOT)/jre/bin"
|
|
|
|
# directory of libjvm.dll
|
|
LIBJVM_DIR := $(LIBJAVA_DIR)/client
|
|
|
|
#MINGW_EXTRA := C:/msys/1.0/mingw
|
|
#LDJNIFLAGS := -mno-cygwin -L$(MINGW_EXTRA)/lib
|
|
DLLTOOL := dlltool
|
|
|
|
OS_DIR := win32
|
|
|
|
endif
|
|
|
|
platform2 := $(subst 64,,$(platform))
|
|
ifeq ($(platform2),linux)
|
|
|
|
ifndef JNI_H_DIR
|
|
JNI_H_DIR := $(J2SDK_ROOT)/include
|
|
endif
|
|
|
|
ifdef J2SDK_LIB
|
|
LIBJAVA_DIR := $(J2SDK_ROOT)/$(J2SDK_LIB)
|
|
LIBJVM_DIR := $(J2SDK_ROOT)/$(J2SDK_JVMLIB)
|
|
else
|
|
# assume the default directory for 32bit systems
|
|
LIBJAVA_DIR := $(J2SDK_ROOT)/jre/lib/amd64
|
|
LIBJVM_DIR := $(LIBJAVA_DIR)/server
|
|
endif
|
|
|
|
LIBVERIFY_DIR := $(LIBJAVA_DIR)
|
|
|
|
# position of jni_md.h relativly to jni.h-dir
|
|
OS_DIR=linux
|
|
|
|
endif
|
|
|
|
ifeq ($(platform),mac_osx)
|
|
|
|
# directory where i can find the jni.h
|
|
ifndef JNI_H_DIR
|
|
JNI_H_DIR := $(J2SDK_ROOT)/Headers
|
|
endif
|
|
|
|
#LIBJVM_DIR := $(J2SDK_ROOT)/Libraries
|
|
#LIBJAVA_DIR := $(J2SDK_ROOT)/jre/lib/i386
|
|
#LIBVERIFY_DIR := $(LIBJVM_DIR)
|
|
|
|
# The following flag is required for older (<= 11.0) versions of OS X
|
|
# JNI_CCFLAGS := -framework JavaVM
|
|
|
|
endif
|
|
|
|
############# end of configuration part #############################
|
|
|
|
ifeq ($(platform),mac_osx)
|
|
JNI_DLLEXT := jnilib
|
|
else
|
|
JNI_DLLEXT := $(DLLEXT)
|
|
endif
|
|
|
|
# position of JVMInit.
|
|
JVMINIT_DIR := $(SECONDO_BUILD_DIR)/Tools/Jni
|
|
|
|
JNIINCLUDE := -I$(JNI_H_DIR)
|
|
|
|
ifdef OS_DIR
|
|
JNIINCLUDE += -I$(JNI_H_DIR)/$(OS_DIR)
|
|
endif
|
|
|
|
JNIINCLUDE += -I$(INCLUDEDIR)
|
|
|
|
JNILINKOPTS := $(JNI_CCFLAGS)
|
|
|
|
ifdef LIBJVM_DIR
|
|
JNILINKOPTS += -L$(LIBJVM_DIR) -ljvm
|
|
endif
|
|
|
|
ifdef LIBJAVA_DIR
|
|
JNILINKOPTS += -L$(LIBJAVA_DIR) -ljava
|
|
endif
|
|
|
|
ifdef LIBVERIFY_DIR
|
|
JNILINKOPTS += -L$(LIBVERIFY_DIR) -lverify
|
|
endif
|
|
|
|
|
|
JNITEXT= "\n* You try to use algebras using JNI! Please check the settings" \
|
|
"\n* in bin/JNI.ini. If you are working under linux ensure " \
|
|
"\n* that the path of libjava.so and libjvm.so was set in LD_LIBRARY_PATH. "
|
|
|