source: trunk/Makefile.in @ 951

Last change on this file since 951 was 951, checked in by gah, 13 years ago

added datarootdir to Makefile.in

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