| 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 | |
|---|
| 33 | AM_JAVACFLAGS = -classpath . |
|---|
| 34 | |
|---|
| 35 | JAVAROOT = . |
|---|
| 36 | |
|---|
| 37 | nxexampledir=$(NXEXAMPLEDIR) |
|---|
| 38 | nxjavadocdir=$(NXDOCDIR)/java |
|---|
| 39 | # jar file definitions |
|---|
| 40 | javadir = $(datadir)/java |
|---|
| 41 | java_DATA = jnexus.jar |
|---|
| 42 | nxexample_DATA = test/TestJapi.java |
|---|
| 43 | nxjavadoc_DATA = README.JNEXUS COPYING.NCSA |
|---|
| 44 | jnexus_jar_ARCHIVE = jnexus.jar |
|---|
| 45 | |
|---|
| 46 | jnexus_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 |
|---|
| 59 | lib_LTLIBRARIES = libjnexus.la |
|---|
| 60 | libjnexus_la_SOURCES = native/hdfnativeImp.c \ |
|---|
| 61 | native/hdfexceptionImp.c \ |
|---|
| 62 | native/handle.c \ |
|---|
| 63 | native/NexusFile.c \ |
|---|
| 64 | native/hdfexceptionImp.h |
|---|
| 65 | libjnexus_la_LIBADD = $(top_builddir)/src/libNeXus.la |
|---|
| 66 | libjnexus_la_LDFLAGS = @SHARED_LDFLAGS@ -version-info $(NXLTVERSINFO) $(JNEXUS_LDFLAGS) -L$(top_builddir)/src/.libs |
|---|
| 67 | libjnexus_la_CFLAGS = -I$(top_srcdir)/include -Inative @JAVAINCLUDE@ \ |
|---|
| 68 | @HDF4_CPPFLAGS@ @HDF5_CPPFLAGS@ $(JNEXUS_CFLAGS) |
|---|
| 69 | |
|---|
| 70 | BUILT_SOURCES = native/org_nexusformat_NexusFile.h |
|---|
| 71 | nodist_noinst_HEADERS = native/org_nexusformat_NexusFile.h |
|---|
| 72 | noinst_HEADERS = native/handle.h |
|---|
| 73 | |
|---|
| 74 | CLEANFILES = $(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 | |
|---|
| 79 | noinst_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 | |
|---|
| 92 | EXTRA_DIST = $(noinst_JAVA) README.JNEXUS COPYING.NCSA |
|---|
| 93 | |
|---|
| 94 | # specific targets |
|---|
| 95 | # org/nexusformat/NexusFile.class: org/nexusformat/NexusFile.java |
|---|
| 96 | |
|---|
| 97 | native/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 | |
|---|
| 101 | jnexus.jar: $(jnexus_jar_CLASS) apidoc |
|---|
| 102 | $(JAR) cvf jnexus.jar $(jnexus_jar_CLASS) \ |
|---|
| 103 | ncsa/hdf/hdflib/ArrayDescriptor.class |
|---|
| 104 | |
|---|
| 105 | |
|---|
| 106 | SUFFIXES = .java .class |
|---|
| 107 | |
|---|
| 108 | .java.class: |
|---|
| 109 | $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $< |
|---|
| 110 | |
|---|
| 111 | apidoc : $(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 | |
|---|
| 116 | dist-hook : |
|---|
| 117 | if test -d $(srcdir)/apidoc; then \ |
|---|
| 118 | cp -r $(srcdir)/apidoc $(distdir); \ |
|---|
| 119 | fi |
|---|
| 120 | |
|---|
| 121 | install-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 | |
|---|
| 129 | clean-local : |
|---|
| 130 | rm -rf apidoc |
|---|
| 131 | |
|---|
| 132 | uninstall-local : |
|---|
| 133 | rm -fr $(DESTDIR)$(nxjavadocdir)/apidoc |
|---|
| 134 | |
|---|
| 135 | # |
|---|
| 136 | # Windows import library for DLL |
|---|
| 137 | |
|---|
| 138 | if MINGW_MSYS |
|---|
| 139 | JNEXUS_CFLAGS=-D_JNI_IMPLEMENTATION_ |
|---|
| 140 | JNEXUS_LDFLAGS=-Wl,--kill-at |
|---|
| 141 | msimplibdir = ${libdir} |
|---|
| 142 | msimplib_DATA = libjnexus.dll.lib libjnexus.dll.exp libjnexus.def |
|---|
| 143 | libjnexus.def: libjnexus.la |
|---|
| 144 | pexports .libs/libjnexus-0.dll > libjnexus.def |
|---|
| 145 | libjnexus.dll.exp: libjnexus.dll.lib |
|---|
| 146 | libjnexus.dll.lib: libjnexus.def |
|---|
| 147 | LIB /MACHINE:I386 /DEF:libjnexus.def /OUT:libjnexus.dll.lib |
|---|
| 148 | jnexusbindir = ${bindir} |
|---|
| 149 | jnexusbin_DATA = jnexus.dll |
|---|
| 150 | jnexus.dll : libjnexus.la |
|---|
| 151 | ln -sf .libs/libjnexus-0.dll jnexus.dll |
|---|
| 152 | endif |
|---|
| 153 | |
|---|
| 154 | |
|---|
| 155 | ## include $(top_srcdir)/build_rules.am |
|---|