build_date := $(shell date +%Y%m%d) machine := $(shell uname -m | sed 's/\ //') os := $(shell uname -s) bn := $(shell basename @prefix@) TarfileBasename=rappture-$(os)-$(machine)-$(build_date) all: rplib build_bindings install: rp_gui install_rplib install_bindings install_examples chmod 755 gui/apps/rappture cp gui/apps/rappture @prefix@/bin cp gui/apps/driver @prefix@/bin cp gui/apps/rerun @prefix@/bin cp gui/apps/simsim @prefix@/bin find @prefix@ -name .svn | xargs rm -rf ########################################################################### # Makefile - build and install all Rappture libraries ############################################################################# rp_gui: set -x; cd gui; \ make all; \ make install; # ./configure --prefix=@prefix@ --with-blt=@prefix@/include; \ # make all >& $(basedir)/output.gui 2>&1; \ # make install >> $(basedir)/output.gui 2>&1 rplib: set -x; cd src2/core; make clean; make librappture2.a; make librappture2.so.0.0 cd src; make clean; make librappture; install_rplib: set -x; cd src2/core; make install; cd src; make install_rappture; build_bindings: build_matlab build_octave build_python build_perl install_bindings: install_matlab install_octave install_python install_perl install_tcl ############################################################################# # build rappture examples # examples: # - compile rappture examples in rappture/examples ############################################################################# build_examples: set -x; cd examples/app-fermi/fortran; make clean; make; cd - cd examples/app-fermi/cee; make clean; make; cd - cd examples/app-fermi/wrapper/cee; make clean; make; cd - cd examples/c-example; make clean; make; cd - install_examples: build_examples set -x; cp -r examples @prefix@ rm -f @prefix@/examples/demo.bash.in ############################################################################# #tcl bindings install_tcl: cd tcl; @prefix@/bin/tclsh install.tcl # cd tcl; @TCLSH@ install.tcl cd src/tcl; make install; cd - # matlab bindings build_matlab: if test "x@MEX@" != "x" ; then \ cd src/matlab; make clean; make RpMatlab; cd -; \ fi install_matlab: build_matlab if test "x@MEX@" != "x" ; then \ cd src/matlab; make install; cd -; \ fi # octave bindings build_octave: if test "x@MKOCTFILE@" != "x" ; then \ cd src/octave; make clean; make RpOctave; cd -; \ fi install_octave: build_octave if test "x@MKOCTFILE@" != "x" ; then \ cd src/octave; make install; cd -; \ fi build_python: if test "x@PYTHON@" != "x" ; then \ set -x; \ cd python; \ @PYTHON@ setup.py \ build_ext \ --library-dirs=@prefix@/lib \ --include-dirs=@prefix@/include \ build; \ fi install_python: build_python if test "x@PYTHON@" != "x" ; then \ set -x; \ cd python; \ @PYTHON@ setup.py install --prefix=@prefix@; \ fi build_perl: if test "x@PERL@" != "x" ; then \ set -x; \ cd perl; \ @PERL@ Makefile.PL INSTALLSITELIB=@prefix@/lib/perl5 INSTALLSITEMAN3DIR=@prefix@/man/man3; \ make; make test; \ fi install_perl: build_perl if test "x@PERL@" != "x" ; then \ set -x; \ cd perl; make install; \ fi build_pkgs: set -x; if ! test -d "bin"; then \ mkdir bin;\ fi # building rappture binary package cd @prefix@/..; tar czf @RP_BASE@/bin/$(TarfileBasename).tar.gz $(bn) clean: cd examples/app-fermi/cee; make clean; cd -; cd examples/app-fermi/fortran; make clean; cd -; cd examples/app-fermi/wrapper/cee; make clean; cd - cd examples/c-example; make clean; cd -; cd gui; make clean; cd -; cd perl; make clean; cd -; cd python; rm -rf build; cd -; cd src; make clean; cd -; cd src/matlab; make clean; cd -; cd src/octave; make clean; cd -; cd src/tcl; make distclean; cd -; distclean: cd examples; rm demo.bash cd examples/app-fermi/cee; make distclean; cd -; cd examples/app-fermi/fortran; make distclean; cd -; cd examples/app-fermi/wrapper/cee; make distclean; cd - cd examples/c-example; make distclean; cd -; cd gui; make distclean; cd -; cd perl; make clean; rm Makefile.PL; cd -; cd python; rm -rf build; rm setup.py; cd -; cd src; make distclean; cd -; cd src/matlab; make distclean; cd -; cd src/octave; make distclean; cd -; cd src/tcl; make distclean; cd -; cd test; make distclean; cd -; rm gui/apps/rappture; rm -rf Makefile config.status config.log bin;