| 1 | ## Process this file with automake to produce Makefile.in |
|---|
| 2 | #==================================================================== |
|---|
| 3 | # NeXus - Neutron & X-ray Common Data Format |
|---|
| 4 | # |
|---|
| 5 | # Makefile for building the core NeXus library |
|---|
| 6 | # |
|---|
| 7 | # $Id$ |
|---|
| 8 | # |
|---|
| 9 | # Copyright (C) 2004 Freddie Akeroyd |
|---|
| 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 | # |
|---|
| 29 | #==================================================================== |
|---|
| 30 | |
|---|
| 31 | AM_CPPFLAGS=-I$(top_srcdir)/include @HDF4_CPPFLAGS@ @HDF5_CPPFLAGS@ @XML_CPPFLAGS@ -DIN_NEXUS_LIBRARY |
|---|
| 32 | AM_CFLAGS=-prefer-pic |
|---|
| 33 | |
|---|
| 34 | if HAVE_HDF4 |
|---|
| 35 | H4SRC = napi4.c |
|---|
| 36 | endif |
|---|
| 37 | |
|---|
| 38 | if HAVE_HDF5 |
|---|
| 39 | H5SRC = napi5.c |
|---|
| 40 | endif |
|---|
| 41 | |
|---|
| 42 | if HAVE_XML |
|---|
| 43 | XMLSRC = nxxml.c nxio.c nxio.h |
|---|
| 44 | endif |
|---|
| 45 | ## the LIBS variable should contain all needed libs for the HDF support |
|---|
| 46 | ## It will be filled during the configuration run |
|---|
| 47 | |
|---|
| 48 | lib_LTLIBRARIES = libNeXus.la |
|---|
| 49 | |
|---|
| 50 | if MINGW_MSYS |
|---|
| 51 | nexus_symbols.sym : $(srcdir)/nexus_symbols.txt $(srcdir)/nexus_symbols_win.txt |
|---|
| 52 | cat $(srcdir)/nexus_symbols.txt $(srcdir)/nexus_symbols_win.txt >> nexus_symbols.sym |
|---|
| 53 | else |
|---|
| 54 | nexus_symbols.sym : $(srcdir)/nexus_symbols.txt |
|---|
| 55 | cp $(srcdir)/nexus_symbols.txt nexus_symbols.sym |
|---|
| 56 | endif |
|---|
| 57 | |
|---|
| 58 | # Windows import library for DLL |
|---|
| 59 | |
|---|
| 60 | if MINGW_MSYS |
|---|
| 61 | MINGW_SRC=napi_exports.c napi_exports2.c napi_exports.h |
|---|
| 62 | msimplibdir = ${libdir} |
|---|
| 63 | libNeXus.def: libNeXus.la |
|---|
| 64 | pexports .libs/libNeXus-0.dll > libNeXus.def |
|---|
| 65 | if HAVE_MS_LIB |
|---|
| 66 | msimplib_DATA = libNeXus.dll.lib libNeXus.dll.exp libNeXus.def |
|---|
| 67 | libNeXus.dll.exp: libNeXus.dll.lib |
|---|
| 68 | libNeXus.dll.lib: libNeXus.def |
|---|
| 69 | rm -f libNeXus.dll.lib libNeXus.dll.exp |
|---|
| 70 | $(MS_LIB) /MACHINE:I386 /DEF:libNeXus.def /OUT:libNeXus.dll.lib |
|---|
| 71 | else |
|---|
| 72 | msimplib_DATA = libNeXus.def |
|---|
| 73 | endif |
|---|
| 74 | endif |
|---|
| 75 | |
|---|
| 76 | #SUBDIRS=nxdict |
|---|
| 77 | |
|---|
| 78 | libNeXus_la_SOURCES = napi.c napiu.c nxstack.c nxstack.h stptok.c nxdataset.c nxdataset.h nx_stptok.h $(H4SRC) $(H5SRC) $(XMLSRC) $(MINGW_SRC) |
|---|
| 79 | libNeXus_la_LDFLAGS = -export-symbols nexus_symbols.sym @SHARED_LDFLAGS@ @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ -version-info $(NXLTVERSINFO) |
|---|
| 80 | libNeXus_la_DEPENDENCIES = nexus_symbols.sym |
|---|
| 81 | |
|---|
| 82 | ## The following part is the solution for automake >= 1.7 |
|---|
| 83 | ## |
|---|
| 84 | ## libNeXus_la_LIBADD = -lz |
|---|
| 85 | ## if HAVE_HDF4 |
|---|
| 86 | ## libNeXus_la_SOURCES += napi4.c |
|---|
| 87 | ## libNeXus_la_LIBADD += -lmfhdf -ldf -ljpeg |
|---|
| 88 | ## endif |
|---|
| 89 | |
|---|
| 90 | ## if HAVE_HDF5 |
|---|
| 91 | ## libNeXus_la_SOURCES += napi5.c |
|---|
| 92 | ## libNeXus_la_LIBADD += -lhdf5 |
|---|
| 93 | ## endif |
|---|
| 94 | |
|---|
| 95 | EXTRA_DIST=nexus_symbols.txt nexus_symbols_win.txt SConscript |
|---|
| 96 | CLEANFILES=libNeXus.def libNeXus.dll.lib libNeXus.dll.exp nexus_symbols.sym |
|---|
| 97 | |
|---|
| 98 | include $(top_srcdir)/build_rules.am |
|---|