source: trunk/src/Makefile.am @ 1822

Revision 1752, 3.1 KB checked in by Freddie Akeroyd, 6 months ago (diff)

Pass down configure options and set library version. Refs #302

  • 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#  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
31AM_CPPFLAGS=-I$(top_srcdir)/include @HDF4_CPPFLAGS@ @HDF5_CPPFLAGS@ @XML_CPPFLAGS@ -DIN_NEXUS_LIBRARY
32AM_CFLAGS=-prefer-pic
33
34if HAVE_HDF4
35H4SRC = napi4.c
36endif
37
38if HAVE_HDF5
39H5SRC = napi5.c
40endif
41
42if HAVE_XML
43XMLSRC = nxxml.c nxio.c nxio.h
44endif
45##  the LIBS variable should contain all needed libs for the HDF support
46##  It will be filled during the configuration run
47
48lib_LTLIBRARIES = libNeXus.la
49
50if MINGW_MSYS
51nexus_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
53else
54nexus_symbols.sym : $(srcdir)/nexus_symbols.txt
55        cp $(srcdir)/nexus_symbols.txt nexus_symbols.sym
56endif
57
58# Windows import library for DLL
59
60if MINGW_MSYS
61MINGW_SRC=napi_exports.c napi_exports2.c napi_exports.h
62msimplibdir = ${libdir}
63libNeXus.def: libNeXus.la
64        pexports .libs/libNeXus-0.dll > libNeXus.def
65if HAVE_MS_LIB
66msimplib_DATA = libNeXus.dll.lib libNeXus.dll.exp libNeXus.def
67libNeXus.dll.exp: libNeXus.dll.lib
68libNeXus.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
71else
72msimplib_DATA = libNeXus.def
73endif
74endif
75
76#SUBDIRS=nxdict
77
78libNeXus_la_SOURCES = napi.c napiu.c nxstack.c nxstack.h stptok.c  nxdataset.c nxdataset.h nx_stptok.h $(H4SRC) $(H5SRC) $(XMLSRC) $(MINGW_SRC)
79libNeXus_la_LDFLAGS = -export-symbols nexus_symbols.sym @SHARED_LDFLAGS@ @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ -version-info $(NXLTVERSINFO)
80libNeXus_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
95EXTRA_DIST=nexus_symbols.txt nexus_symbols_win.txt SConscript
96CLEANFILES=libNeXus.def libNeXus.dll.lib libNeXus.dll.exp nexus_symbols.sym
97
98include $(top_srcdir)/build_rules.am
Note: See TracBrowser for help on using the repository browser.