source: trunk/Makefile.in @ 565

Last change on this file since 565 was 563, checked in by dkearney, 18 years ago

small adjustments to gauge.tcl to fix errors in number and units recognition.
adjusted configure.in and makefiles to allow user to specify the architecture
they would like to use for compiling matlab bindings. also adjusted the main
makefile not to try to compile bindings for languages it cannot find on the system.

File size: 4.2 KB
Line 
1
2build_date := $(shell date +%Y%m%d)
3machine := $(shell uname -m | sed 's/\ //')
4os := $(shell uname -s)
5bn := $(shell basename @prefix@)
6TarfileBasename=rappture-$(os)-$(machine)-$(build_date)
7
8all: rplib build_bindings
9install: rp_gui install_rplib install_bindings install_examples
10        chmod 755 gui/apps/rappture
11        cp gui/apps/rappture @prefix@/bin
12        cp gui/apps/driver @prefix@/bin
13        cp gui/apps/rerun @prefix@/bin
14        find @prefix@ -name .svn | xargs rm -rf
15
16###########################################################################
17# Makefile - build and install all Rappture libraries
18#############################################################################
19
20
21rp_gui:
22        set -x;
23        cd gui; \
24        make all; \
25        make install;
26
27#       ./configure --prefix=@prefix@ --with-blt=@prefix@/include; \
28#       make all >& $(basedir)/output.gui 2>&1; \
29#       make install >> $(basedir)/output.gui 2>&1
30
31rplib:
32        set -x;
33        cd src; make clean; make librappture;
34
35install_rplib:
36        set -x;
37        cd src; make install_rappture;
38
39build_bindings: build_matlab build_octave build_python build_perl
40
41install_bindings: install_matlab install_octave install_python install_perl install_tcl
42
43#############################################################################
44# build rappture examples
45# examples:
46#       - compile rappture examples in rappture/examples
47#############################################################################
48build_examples:
49        set -x;
50        cd examples/app-fermi/fortran; make clean; make; cd -
51        cd examples/app-fermi/cee; make clean; make; cd -
52        cd examples/app-fermi/wrapper/cee; make clean; make; cd -
53        cd examples/c-example; make clean; make; cd -
54
55install_examples: build_examples
56        set -x;
57        cp -r examples @prefix@
58        rm -f @prefix@/examples/demo.bash.in
59
60
61
62#############################################################################
63
64#tcl bindings
65install_tcl:
66        cd tcl; @prefix@/bin/tclsh install.tcl
67#       cd tcl; @TCLSH@ install.tcl
68        cd src/tcl; make install; cd -
69
70# matlab bindings
71build_matlab:
72        if test "x@MEX@" != "x" ; then \
73                cd src/matlab; make clean; make RpMatlab; cd -; \
74        fi
75
76install_matlab: build_matlab
77        if test "x@MEX@" != "x" ; then \
78                cd src/matlab; make install; cd -; \
79        fi
80
81# octave bindings
82build_octave:
83        if test "x@MKOCTFILE@" != "x" ; then \
84                cd src/octave; make clean; make RpOctave; cd -; \
85        fi
86
87install_octave: build_octave
88        if test "x@MKOCTFILE@" != "x" ; then \
89                cd src/octave; make install; cd -; \
90        fi
91
92build_python:
93        if test "x@PYTHON@" != "x" ; then \
94                set -x; \
95                cd python; \
96                @PYTHON@ setup.py \
97                        build_ext \
98                        --library-dirs=@prefix@/lib \
99                        --include-dirs=@prefix@/include \
100                        build; \
101        fi
102
103install_python: build_python
104        if test "x@PYTHON@" != "x" ; then \
105                set -x; \
106                cd python; \
107                @PYTHON@ setup.py install --prefix=@prefix@; \
108        fi
109
110build_perl:
111        if test "x@PERL@" != "x" ; then \
112                set -x; \
113                cd perl; \
114                @PERL@ Makefile.PL INSTALLSITELIB=@prefix@/lib/perl5 INSTALLSITEMAN3DIR=@prefix@/man/man3; \
115                make; make test; \
116        fi
117
118install_perl: build_perl
119        if test "x@PERL@" != "x" ; then \
120                set -x; \
121                cd perl; make install; \
122        fi
123
124build_pkgs:
125        set -x;
126        if ! test -d "bin"; then \
127                mkdir bin;\
128        fi
129        # building rappture binary package
130        cd @prefix@/..; tar czf @RP_BASE@/bin/$(TarfileBasename).tar.gz $(bn)
131
132clean:
133        cd examples/app-fermi/cee; make clean; cd -;
134        cd examples/app-fermi/fortran; make clean; cd -;
135        cd examples/app-fermi/wrapper/cee; make clean; cd -
136        cd examples/c-example; make clean; cd -;
137        cd gui; make clean; cd -;
138        cd perl; make clean; cd -;
139        cd python; rm -rf build; rm setup.py; cd -;
140        cd src; make clean; cd -;
141        cd src/matlab; make clean; cd -;
142        cd src/octave; make clean; cd -;
143        cd src/tcl; make distclean; cd -;
144
145distclean:
146        cd examples; rm demo.bash
147        cd examples/app-fermi/cee; make distclean; cd -;
148        cd examples/app-fermi/fortran; make distclean; cd -;
149        cd examples/app-fermi/wrapper/cee; make distclean; cd -
150        cd examples/c-example; make distclean; cd -;
151        cd gui; make distclean; cd -;
152        cd perl; make clean; rm Makefile.PL; cd -;
153        cd python; rm -rf build; rm setup.py; cd -;
154        cd src; make distclean; cd -;
155        cd src/matlab; make distclean; cd -;
156        cd src/octave; make distclean; cd -;
157        cd src/tcl; make distclean; cd -;
158        cd test; make distclean; cd -;
159        rm gui/apps/rappture;
160        rm -rf Makefile config.status config.log bin;
Note: See TracBrowser for help on using the repository browser.