source: trunk/Makefile.in @ 710

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

fixed exmaples typo to examples in rappture makefile

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