source: trunk/bindings/java/Makefile.am @ 1822

Revision 1767, 5.2 KB checked in by Freddie Akeroyd, 6 months ago (diff)

Add additional -L flag to shared library directory. This seems to
be needed on ubuntu to make sure the just built (rather than an
already installed) library is used during the libtool relink on install
Refs #305

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1## Process this file with automake to produce Makefile.in
2#====================================================================
3#  NeXus - Neutron & X-ray Common Data Format
4
5#  $Id$
6
7#  Makefile for NeXus Java bindings
8#
9#  Copyright (C) 2004 Peter Peterson
10
11#  This library is free software; you can redistribute it and/or
12#  modify it under the terms of the GNU Lesser General Public
13#  License as published by the Free Software Foundation; either
14#  version 2 of the License, or (at your option) any later version.
15#
16#  This library is distributed in the hope that it will be useful,
17#  but WITHOUT ANY WARRANTY; without even the implied warranty of
18#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19#  Lesser General Public License for more details.
20#
21#  You should have received a copy of the GNU Lesser General Public
22#  License along with this library; if not, write to the Free
23#  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24#  MA  02111-1307  USA
25#             
26#  For further information, see <http://www.nexusformat.org>
27#
28# Modified after change to org.nexusformat package name change:
29# Mark Koennecke, December 2006
30#
31#====================================================================
32
33AM_JAVACFLAGS   = -classpath .
34
35JAVAROOT        = .
36
37nxexampledir=$(NXEXAMPLEDIR)
38nxjavadocdir=$(NXDOCDIR)/java
39# jar file definitions
40javadir         = $(datadir)/java
41java_DATA = jnexus.jar
42nxexample_DATA = test/TestJapi.java
43nxjavadoc_DATA = README.JNEXUS COPYING.NCSA
44jnexus_jar_ARCHIVE = jnexus.jar
45
46jnexus_jar_CLASS = ncsa/hdf/hdflib/HDFException.class \
47               ncsa/hdf/hdflib/HDFJavaException.class \
48               ncsa/hdf/hdflib/HDFConstants.class \
49               ncsa/hdf/hdflib/HDFNativeData.class \
50               ncsa/hdf/hdflib/HDFArray.class \
51               ncsa/hdf/hdflib/HDFNotImplementedException.class \
52               org/nexusformat/AttributeEntry.class \
53               org/nexusformat/NexusException.class \
54               org/nexusformat/NXlink.class \
55               org/nexusformat/NeXusFileInterface.class \
56               org/nexusformat/NexusFile.class
57
58# jni definitions
59lib_LTLIBRARIES         = libjnexus.la
60libjnexus_la_SOURCES    = native/hdfnativeImp.c \
61                       native/hdfexceptionImp.c \
62                       native/handle.c \
63                       native/NexusFile.c \
64                       native/hdfexceptionImp.h
65libjnexus_la_LIBADD     = $(top_builddir)/src/libNeXus.la
66libjnexus_la_LDFLAGS    = @SHARED_LDFLAGS@ -version-info $(NXLTVERSINFO) $(JNEXUS_LDFLAGS) -L$(top_builddir)/src/.libs
67libjnexus_la_CFLAGS     = -I$(top_srcdir)/include -Inative @JAVAINCLUDE@ \
68                        @HDF4_CPPFLAGS@ @HDF5_CPPFLAGS@ $(JNEXUS_CFLAGS)
69
70BUILT_SOURCES           = native/org_nexusformat_NexusFile.h
71nodist_noinst_HEADERS   = native/org_nexusformat_NexusFile.h
72noinst_HEADERS          = native/handle.h
73
74CLEANFILES      = $(jnexus_jar_CLASS) $(jnexus_jar_ARCHIVE) $(BUILT_SOURCES) \
75        libjnexus.def libjnexus.dll.lib libjnexus.dll.exp jnexus.dll \
76               ncsa/hdf/hdflib/ArrayDescriptor.class
77
78
79noinst_JAVA     = ncsa/hdf/hdflib/HDFArray.java \
80                ncsa/hdf/hdflib/HDFConstants.java \
81                ncsa/hdf/hdflib/HDFException.java \
82                ncsa/hdf/hdflib/HDFJavaException.java \
83                ncsa/hdf/hdflib/HDFNativeData.java \
84                ncsa/hdf/hdflib/HDFNotImplementedException.java \
85                org/nexusformat/AttributeEntry.java \
86                org/nexusformat/NXlink.java \
87                org/nexusformat/NeXusFileInterface.java \
88                org/nexusformat/NexusException.java \
89                org/nexusformat/NexusFile.java \
90                test/TestJapi.java
91
92EXTRA_DIST      = $(noinst_JAVA) README.JNEXUS COPYING.NCSA
93
94# specific targets
95# org/nexusformat/NexusFile.class:      org/nexusformat/NexusFile.java
96
97native/org_nexusformat_NexusFile.h: jnexus.jar # org/nexusformat/NexusFile.class
98        test -d native || mkdir native
99        $(JAVAH) -jni -d native -classpath . org.nexusformat.NexusFile
100
101jnexus.jar: $(jnexus_jar_CLASS) apidoc
102        $(JAR) cvf jnexus.jar $(jnexus_jar_CLASS) \
103               ncsa/hdf/hdflib/ArrayDescriptor.class
104
105
106SUFFIXES = .java .class
107
108.java.class:
109        $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $<
110
111apidoc : $(noinst_JAVA)
112        test -d apidoc || mkdir apidoc
113        $(JAVADOC) -d apidoc -windowtitle jnexus -doctitle jnexus -classpath . \
114                      -sourcepath $(srcdir) org.nexusformat ncsa.hdf.hdflib
115
116dist-hook :
117        if test -d $(srcdir)/apidoc; then \
118            cp -r $(srcdir)/apidoc $(distdir); \
119        fi
120
121install-data-local :
122        $(mkinstalldirs) $(DESTDIR)$(nxjavadocdir)
123        if test -d $(srcdir)/apidoc; then \
124          cp -r $(srcdir)/apidoc $(DESTDIR)$(nxjavadocdir); \
125          find $(DESTDIR)$(nxjavadocdir)/apidoc -type f -exec chmod 0644 {} \; ;\
126          find $(DESTDIR)$(nxjavadocdir)/apidoc -type d -exec chmod 0755 {} \; ;\
127        fi
128
129clean-local :
130        rm -rf apidoc
131
132uninstall-local :
133        rm -fr $(DESTDIR)$(nxjavadocdir)/apidoc
134
135#
136# Windows import library for DLL
137
138if MINGW_MSYS
139JNEXUS_CFLAGS=-D_JNI_IMPLEMENTATION_
140JNEXUS_LDFLAGS=-Wl,--kill-at
141msimplibdir = ${libdir}
142msimplib_DATA = libjnexus.dll.lib libjnexus.dll.exp libjnexus.def
143libjnexus.def: libjnexus.la
144        pexports .libs/libjnexus-0.dll > libjnexus.def
145libjnexus.dll.exp: libjnexus.dll.lib
146libjnexus.dll.lib: libjnexus.def
147        LIB /MACHINE:I386 /DEF:libjnexus.def /OUT:libjnexus.dll.lib
148jnexusbindir = ${bindir}
149jnexusbin_DATA = jnexus.dll
150jnexus.dll : libjnexus.la
151        ln -sf .libs/libjnexus-0.dll jnexus.dll
152endif
153
154
155## include $(top_srcdir)/build_rules.am
Note: See TracBrowser for help on using the repository browser.