source: trunk/Makefile.in @ 718

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

after the core rappture library (librappture.so) is created the include
files necessary to compile all other bindings are copied to the top level
include directory. python, perl, matlab, octave and tcl bindings now refer
to this top level include directory to find header files.

fortran and c examples are only compiled if we find a compiler, this check
helps prevent builds from failing before the libraries are installed.

added more checks to the configure script

removed rappture search paths from perl's unix build because perl could find
an older version of rappture and compile against it. I would rather the build
fail and have the person enter a valid prefix.

addrd the -fPIC flag to CFLAGS in src2's makefile

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                cd perl; \
138                make install; \
139        fi
140
141build_pkgs:
142        @if ! test -d "bin"; then \
143                mkdir bin;\
144        fi
145        # building rappture binary package
146        cd $(prefix)/..; tar czf @RP_BASE@/bin/$(TarfileBasename).tar.gz $(bn)
147
148clean:
149        make -C examples/app-fermi/cee clean
150        make -C examples/app-fermi/fortran clean
151        make -C examples/app-fermi/wrapper/cee clean
152        make -C examples/c-example clean
153        make -C gui clean
154        @if test -r "perl/Makefile" ; then \
155                make -C perl clean; \
156        fi
157        rm -rf python/build
158        make -C src clean
159        make -C src/matlab clean
160        make -C src/octave clean
161        make -C src/tcl clean
162        make -C src2/core clean
163        rm -rf include
164
165distclean:
166        rm examples/demo.bash
167        make -C examples/app-fermi/cee distclean
168        make -C examples/app-fermi/fortran distclean
169        make -C examples/app-fermi/wrapper/cee distclean
170        make -C examples/c-example distclean
171        make -C gui distclean
172        make -C perl clean; rm perl/Makefile.PL
173        rm -rf python/build python/setup.py
174        make -C src distclean
175        make -C src/matlab distclean
176        make -C src/octave distclean
177        make -C src/tcl distclean
178        make -C src2/core distclean
179        make -C test distclean
180        rm gui/apps/rappture gui/apps/simsim gui/apps/rappture.env;
181        rm -rf Makefile config.status config.log bin;
Note: See TracBrowser for help on using the repository browser.