debian swirl logo

Back to the packages list camljava

#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk
include /usr/share/cdbs/1/rules/ocaml.mk

PKGNAME = libcamljava-ocaml-dev
DESTDIR := $(CURDIR)/debian/$(PKGNAME)/$(OCAML_STDLIB_DIR)/camljava

DEFJAVA_DIR = /usr/lib/jvm/default-java

# /usr/lib/jvm/default-java/jre/lib/amd64/server/libjvm.so -> amd64
# XXX horrible way to retrieve Java arch, but unfortunately there is no
# reliable mapping available yet (see #558109)
JAVA_ARCH := $(shell find $(DEFJAVA_DIR)/ -path '*jre/lib/*/server/libjvm.so' | cut -f 8 -d /)

BUILD_TARGET_FLAGS = JDKHOME=$(DEFJAVA_DIR)
BUILD_TARGET_FLAGS += ARCH=$(JAVA_ARCH)
DEB_MAKE_INSTALL_TARGET = install CAMLJAVALIB=$(DESTDIR)
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
DEB_MAKE_BUILD_TARGET = all $(BUILD_TARGET_FLAGS)
else
DEB_MAKE_BUILD_TARGET = byte $(BUILD_TARGET_FLAGS)
endif

Builds:

libcamljava-ocaml-dev
interface between ocaml and java via caml/c interface and jni