source: trunk/Makefile.in @ 869

Last change on this file since 869 was 833, checked in by dkearney, 17 years ago

updated configure to allow user to compile with or without perl, python, octave, matlab
updated makefiles in examples dir to keep it quiet during compilation.

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