| 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 SWIG bindings |
|---|
| 8 | # |
|---|
| 9 | # Automake version Copyright (C) 2004 Freddie Akeroyd |
|---|
| 10 | # (based on original Makefile by Mark Koennecke, October 2002) |
|---|
| 11 | # |
|---|
| 12 | # This library is free software; you can redistribute it and/or |
|---|
| 13 | # modify it under the terms of the GNU Lesser General Public |
|---|
| 14 | # License as published by the Free Software Foundation; either |
|---|
| 15 | # version 2 of the License, or (at your option) any later version. |
|---|
| 16 | # |
|---|
| 17 | # This library is distributed in the hope that it will be useful, |
|---|
| 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 20 | # Lesser General Public License for more details. |
|---|
| 21 | # |
|---|
| 22 | # You should have received a copy of the GNU Lesser General Public |
|---|
| 23 | # License along with this library; if not, write to the Free |
|---|
| 24 | # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
|---|
| 25 | # MA 02111-1307 USA |
|---|
| 26 | # |
|---|
| 27 | # For further information, see <http://www.nexusformat.org> |
|---|
| 28 | # |
|---|
| 29 | #==================================================================== |
|---|
| 30 | AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/src |
|---|
| 31 | lib_LTLIBRARIES=$(LIBNXTCL) $(LIBNXSCHEME) $(LIBNXGUILE) # $(LIBNXPERL) |
|---|
| 32 | bin_PROGRAMS=$(NXINTER) $(NXGUILE) |
|---|
| 33 | |
|---|
| 34 | # old python wrapper |
|---|
| 35 | #python_LTLIBRARIES=$(LIBNXPYTHON) |
|---|
| 36 | #if HAVE_SWIG |
|---|
| 37 | #if HAVE_PYTHON |
|---|
| 38 | #NXPYTHONWRAP=nxpython.py |
|---|
| 39 | #nodist_python_PYTHON=$(NXPYTHONWRAP) |
|---|
| 40 | #LIBNXPYTHON=libnxpython.la |
|---|
| 41 | #libnxpython_la_SOURCES=$(COMMON_SRC) |
|---|
| 42 | #nodist_libnxpython_la_SOURCES=$(PYTHONWRAP) |
|---|
| 43 | #libnxpython_la_CFLAGS=-I$(PYTHONROOT)/include/python$(PYTHON_VERSION) -I$(PYTHONROOT)/include $(CFLAGS) |
|---|
| 44 | #libnxpython_la_LDFLAGS=-L$(PYTHONROOT)/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) $(top_builddir)/src/libNeXus.la @SHARED_LDFLAGS@ $(LDFLAGS) |
|---|
| 45 | #PYTHONWRAP=nxpython_wrap.c |
|---|
| 46 | #endif |
|---|
| 47 | #nxpython_wrap.c: nxinter.i nxdataset.i |
|---|
| 48 | # $(SWIG) -I$(srcdir) -o $@ -python -module nxpython -interface libnxpython nxinter.i |
|---|
| 49 | #endif |
|---|
| 50 | |
|---|
| 51 | # perl wrapper (not working yet) |
|---|
| 52 | #if HAVE_SWIG |
|---|
| 53 | #if HAVE_PERL |
|---|
| 54 | #LIBNXPERL=libnxperl.la |
|---|
| 55 | #libnxperl_la_SOURCES=$(COMMON_SRC) |
|---|
| 56 | #nodist_libnxperl_la_SOURCES=$(PERLWRAP) |
|---|
| 57 | #libnxperl_la_CFLAGS=-I/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/ $(CFLAGS) |
|---|
| 58 | #libnxperl_la_LDFLAGS=$(top_builddir)/src/libNeXus.la $(LDFLAGS) |
|---|
| 59 | #PERLWRAP=nxperl_wrap.c |
|---|
| 60 | #endif |
|---|
| 61 | #nxperl_wrap.c: nxinter.i nxdataset.i |
|---|
| 62 | # $(SWIG) -I$(srcdir) -o $@ -perl5 -module nxperl nxinter.i |
|---|
| 63 | #endif |
|---|
| 64 | |
|---|
| 65 | # tcl wrapper |
|---|
| 66 | if HAVE_SWIG |
|---|
| 67 | if HAVE_TCL |
|---|
| 68 | LIBNXTCL=libnxtcl.la |
|---|
| 69 | NXINTER=nxinter |
|---|
| 70 | TCLLIB=-L$(TCLROOT)/lib -ltcl |
|---|
| 71 | libnxtcl_la_SOURCES=$(COMMON_SRC) |
|---|
| 72 | nodist_libnxtcl_la_SOURCES=$(TCLWRAP) |
|---|
| 73 | libnxtcl_la_CFLAGS=-I$(TCLROOT)/include |
|---|
| 74 | libnxtcl_la_LDFLAGS=$(top_builddir)/src/libNeXus.la $(TCLLIB) $(LDFLAGS) |
|---|
| 75 | |
|---|
| 76 | nodist_nxinter_SOURCES=libnxtcl.la |
|---|
| 77 | nxinter_LDFLAGS=-static libnxtcl.la $(top_builddir)/src/libNeXus.la $(TCLLIB) $(LDFLAGS) |
|---|
| 78 | TCLWRAP=nxinter_wrap.c |
|---|
| 79 | endif |
|---|
| 80 | nxinter_wrap.c: nxinter.i nxdataset.i |
|---|
| 81 | $(SWIG) -I$(srcdir) -o $@ -tcl8 -ltclsh.i nxinter.i |
|---|
| 82 | endif |
|---|
| 83 | |
|---|
| 84 | # guile wrapper |
|---|
| 85 | if HAVE_SWIG |
|---|
| 86 | if HAVE_GUILE |
|---|
| 87 | LIBNXGUILE=libnxguile.la |
|---|
| 88 | NXGUILE=nxguile |
|---|
| 89 | GGLIB=-L$(GUILEROOT)/lib -lguile |
|---|
| 90 | libnxguile_la_SOURCES=$(COMMON_SRC) |
|---|
| 91 | nodist_libnxguile_la_SOURCES=$(GUILEWRAP) |
|---|
| 92 | libnxguile_la_CFLAGS=-I$(GUILEROOT)/include/guile \ |
|---|
| 93 | -DSWIGINIT="SCM scm_init_nxinter_module(void); scm_init_nxinter_module();"\ |
|---|
| 94 | $(CFLAGS) |
|---|
| 95 | libnxguile_la_LDFLAGS=$(top_builddir)/src/libNeXus.la $(GGLIB) $(LDFLAGS) |
|---|
| 96 | |
|---|
| 97 | nodist_nxguile_SOURCES=libnxguile.la |
|---|
| 98 | nxguile_LDFLAGS=-static libnxguile.la $(top_builddir)/src/libNeXus.la $(GGLIB) $(LDFLAGS) |
|---|
| 99 | GUILEWRAP=nxguile_wrap.c |
|---|
| 100 | endif |
|---|
| 101 | nxguile_wrap.c: nxinter.i nxdataset.i |
|---|
| 102 | $(SWIG) -I$(srcdir) -o $@ -guile -lguilemain.i $(SWGUILEFLAGS) nxinter.i |
|---|
| 103 | endif |
|---|
| 104 | |
|---|
| 105 | # mzscheme wrapper |
|---|
| 106 | if HAVE_SWIG |
|---|
| 107 | if HAVE_MZSCHEME |
|---|
| 108 | LIBNXSCHEME=libnxscheme.la |
|---|
| 109 | MZINC=/data/koenneck/opt/plt |
|---|
| 110 | MZLIB=-L$(MZINC)/lib -lmzscheme -lmzgc $(MZINC)/lib/mzdyn.o |
|---|
| 111 | libnxscheme_la_SOURCES=$(COMMON_SRC) |
|---|
| 112 | nodist_libnxscheme_la_SOURCES=$(SCHEMEWRAP) |
|---|
| 113 | libnxscheme_la_CFLAGS=-I$(MZINC)/include $(CFLAGS) |
|---|
| 114 | libnxscheme_la_LDFLAGS=$(top_builddir)/src/libNeXus.la $(MZLIB) $(LDFLAGS) |
|---|
| 115 | SCHEMEWRAP=nxscheme_wrap.c |
|---|
| 116 | endif |
|---|
| 117 | nxscheme_wrap.c: nxinter.i nxdataset.i |
|---|
| 118 | $(SWIG) -I$(srcdir) -o $@ -mzscheme nxinter.i |
|---|
| 119 | endif |
|---|
| 120 | |
|---|
| 121 | DOC_SRC = nxinter.tex |
|---|
| 122 | if HAVE_LATEX |
|---|
| 123 | DOC_OUTPUT=nxinter.ps nxinter.pdf |
|---|
| 124 | nxinter.ps: $(DOC_SRC) |
|---|
| 125 | latex nxinter.tex |
|---|
| 126 | latex nxinter.tex |
|---|
| 127 | dvips -f nxinter.dvi > nxinter.ps |
|---|
| 128 | |
|---|
| 129 | nxinter.pdf : nxinter.ps |
|---|
| 130 | ps2pdf12 nxinter.ps nxinter.pdf |
|---|
| 131 | endif |
|---|
| 132 | swigdocdir = $(NXDOCDIR)/swig |
|---|
| 133 | swigdoc_DATA = $(DOC_OUTPUT) |
|---|
| 134 | |
|---|
| 135 | EXAMPLE_FILES = nxdstest.tcl nxexam.tcl nxintertest.tcl |
|---|
| 136 | swigexampledir = $(NXEXAMPLEDIR)/swig |
|---|
| 137 | swigexample_DATA = $(EXAMPLE_FILES) |
|---|
| 138 | |
|---|
| 139 | include $(top_srcdir)/build_rules.am |
|---|
| 140 | |
|---|
| 141 | COMMON_SRC=nxinterhelper.c |
|---|
| 142 | |
|---|
| 143 | EXTRA_DIST=nxinter.i nxdataset.i nxinterhelper.h \ |
|---|
| 144 | $(DOC_OUTPUT) $(DOC_SRC) $(EXAMPLE_FILES) |
|---|
| 145 | |
|---|
| 146 | BUILT_SOURCES=$(TCLWRAP) $(GUILEWRAP) $(PYTHONWRAP) $(SCHEMEWRAP) $(NXPYTHONWRAP) |
|---|
| 147 | CLEANFILES=$(TCLWRAP) $(GUILEWRAP) $(PYTHONWRAP) $(SCHEMEWRAP) $(NXPYTHONWRAP) |
|---|