#
# This file is part of OCaml-Java compiler.
# Copyright (C) 2007-2014 Xavier Clerc.
#
# OCaml-Java compiler is free software; you can redistribute it and/or modify
# it under the terms of the Q Public License v1.0 as published by
# Trolltech (with a change to choice of law).
#
# OCaml-Java compiler 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
# Q Public License for more details.
#
# You should have received a copy of the Q Public License
# along with this program.  If not, see
# <http://opensource.org/licenses/QPL-1.0>.
#

LIBRARY=dynlink
JAVA_PACKAGE='ocaml.otherlibs.dynlink'
MODULES=dynlink
EXTRAFLAGS=-I ../../utils -I ../../typing -I ../../bytecomp -I ../../asmcomp

hook:
	$(MAKE) -f Makefile-ocamljava prepare
	$(MAKE) -f Makefile-ocamljava all
	$(MAKE) -f Makefile-ocamljava restore

prepare:
	mv dynlink.ml dynlink.orig
	cp natdynlink.ml dynlink.ml

restore:
	rm -f dynlink.ml
	mv dynlink.orig dynlink.ml

partialclean::
	rm -f extract_crc *.cmi *.cmj*

include ../Makefile-ocamljava.shared
