source: trunk/Makefile.in @ 512

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

made changes to the build system for the rappture package and added a few automake necessary files. also demo.bash was added to the list of files tha
t are automatically generated.

File size: 3.5 KB
Line 
1
2build_date := $(shell date +%Y%m%d)
3machine := $(shell uname -m)
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/c-example; make clean; make; cd -
53
54install_examples: build_examples
55        set -x;
56        cp -r examples @prefix@
57
58
59
60#############################################################################
61
62#tcl bindings
63install_tcl:
64        cd tcl; @prefix@/bin/tclsh install.tcl
65#       cd tcl; @TCLSH@ install.tcl
66
67# matlab bindings
68build_matlab:
69        cd src/matlab; make clean; make RpMatlab; cd -
70
71install_matlab: build_matlab
72        cd src/matlab; make install; cd -
73
74# octave bindings
75build_octave:
76        cd src/octave; make clean; make RpOctave; cd -
77
78install_octave: build_octave
79        cd src/octave; make install; cd -
80
81build_python:
82        set -x;
83        cd python; \
84        @PYTHON@ setup.py \
85                build_ext \
86                --library-dirs=@prefix@/lib \
87                --include-dirs=@prefix@/include \
88                build
89
90install_python: build_python
91        set -x;
92        cd python; \
93        @PYTHON@ setup.py install --prefix=@prefix@
94
95build_perl:
96        set -x;
97        cd perl; \
98        @PERL@ Makefile.PL INSTALLSITELIB=@prefix@/lib/perl5 INSTALLSITEMAN3DIR=@prefix@/man/man3; \
99        make; make test;
100
101install_perl: build_perl
102        set -x;
103        cd perl; make install;
104
105build_pkgs:
106        set -x;
107        make distclean
108        if ! test -d "bin"; then \
109                mkdir bin;\
110        fi
111        # building rappture binary package
112        cd @prefix@/..; tar czf @RP_BASE@/bin/$(TarfileBasename).tar.gz $(bn)
113
114clean:
115        cd examples/app-fermi/cee; make clean; cd -;
116        cd examples/app-fermi/fortran; make clean; cd -;
117        cd examples/c-example; make clean; cd -;
118        cd gui; make clean; cd -;
119        cd perl; make clean; cd -;
120        cd python; rm -rf build; rm setup.py; cd -;
121        cd src; make clean; cd -;
122        cd src/matlab; make clean; cd -;
123        cd src/octave; make clean; cd -;
124
125distclean:
126        cd examples; rm demo.bash
127        cd examples/app-fermi/cee; make distclean; cd -;
128        cd examples/app-fermi/fortran; make distclean; cd -;
129        cd examples/c-example; make distclean; cd -;
130        cd gui; make distclean; cd -;
131        cd perl; make clean; cd -;
132        cd python; rm -rf build; rm setup.py; cd -;
133        cd src; make distclean; cd -;
134        cd src/matlab; make distclean; cd -;
135        cd src/octave; make distclean; cd -;
136        cd test; make distclean; cd -;
137        rm gui/apps/rappture;
138        rm -rf Makefile config.status config.log bin;
Note: See TracBrowser for help on using the repository browser.