source: trunk/Makefile.in @ 597

Last change on this file since 597 was 597, checked in by dkearney, 14 years ago

adjusted core makefile to not remove setup.py when doing a make clean
adjusted putFile and putData commands and flags in matlab, octave,fortran,perl
changed the RPLIB_[TEXT,BINARY] flags to RPLIB_COMPRESS and RPLIB_NO_COMPRESS flags
adjusted the c-example for compress to incorporate newly named flags.
adjusted rappture library header to find rappture buffer header files in rappture2 directory.

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