source: trunk/Makefile.in @ 632

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

changing rappture script to source the rappture.env file
added option to simsim allowing user to specify the value for named elements on the command line
added simsim rappture.env to configure script and makefile

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