prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ includedir = @includedir@ mandir = @mandir@ INSTALL = @INSTALL@ INSTALL_PROGRAM = ${INSTALL} -m 755 INSTALL_DATA = ${INSTALL} -m 644 INSTALL_SCRIPT = ${INSTALL} -m 644 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) # fix this before commiting all: rplib build_bindings build_gui install: install_rplib install_bindings install_gui install_examples ${INSTALL_PROGRAM} gui/apps/rappture $(bindir)/rappture ${INSTALL_DATA} gui/apps/rappture.env $(bindir)/rappture.env ${INSTALL_PROGRAM} gui/apps/driver $(bindir)/driver ${INSTALL_PROGRAM} gui/apps/nanovis-test $(bindir)/nanovis-test ${INSTALL_PROGRAM} gui/apps/rerun $(bindir)/rerun ${INSTALL_PROGRAM} gui/apps/simsim $(bindir)/simsim ${INSTALL_PROGRAM} gui/apps/simsim.tcl $(bindir)/simsim.tcl find $(prefix) -name .svn | xargs rm -rf ########################################################################### # Makefile - build and install all Rappture libraries ########################################################################### build_gui: make -C gui install_gui: make -C gui install rplib: @if ! test -d "include"; then \ mkdir include;\ fi make -C src2/core librappture2.a librappture2.so.0.0 make -C src librappture; install_rplib: make -C src2/core install; make -C src 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: ifneq ($(strip @F77@),) make -C examples/app-fermi/fortran endif ifneq ($(strip @CC@),) make -C examples/app-fermi/cee make -C examples/app-fermi/wrapper/cee make -C examples/c-example endif install_examples: build_examples cp -r examples $(prefix) rm -f $(prefix)/examples/demo.bash.in find $(prefix)/examples -name .svn | xargs rm -rf ############################################################################# #tcl bindings install_tcl: cd tcl; $(bindir)/tclsh install.tcl # cd tcl; @TCLSH@ install.tcl make -C src/tcl install # matlab bindings build_matlab: @if test "x@MEX@" != "x" ; then \ make -C src/matlab; \ fi install_matlab: build_matlab @if test "x@MEX@" != "x" ; then \ make -C src/matlab install; \ fi # octave bindings build_octave: @if test "x@MKOCTFILE@" != "x" ; then \ make -C src/octave; \ fi install_octave: build_octave @if test "x@MKOCTFILE@" != "x" ; then \ make -C src/octave install; \ fi build_python: @if test "x@PYTHON@" != "x" ; then \ set -x; \ cd python; \ @PYTHON@ setup.py \ build_ext \ --library-dirs=$(libdir):../src \ --include-dirs=$(includedir) \ build; \ fi install_python: build_python @if test "x@PYTHON@" != "x" ; then \ cd python; \ @PYTHON@ setup.py install --prefix=$(prefix); \ fi build_perl: @if test "x@PERL@" != "x" ; then \ cd perl; \ @PERL@ Makefile.PL INSTALLSITELIB=$(libdir)/perl5 INSTALLSITEARCH=$(libdir)/perl5 INSTALLSITEMAN3DIR=$(mandir)/man3; \ make; LD_LIBRARY_PATH=$(libdir):../src make test; \ fi install_perl: build_perl @if test "x@PERL@" != "x" ; then \ cd perl; \ make install; \ fi build_pkgs: @if ! test -d "bin"; then \ mkdir bin;\ fi # building rappture binary package cd $(prefix)/..; tar czf @RP_BASE@/bin/$(TarfileBasename).tar.gz $(bn) clean: make -C examples/app-fermi/cee clean make -C examples/app-fermi/fortran clean make -C examples/app-fermi/wrapper/cee clean make -C examples/c-example clean make -C gui clean @if test -r "perl/Makefile" ; then \ make -C perl clean; \ fi rm -rf python/build make -C src clean make -C src/matlab clean make -C src/octave clean make -C src/tcl clean make -C src2/core clean rm -f include/* distclean: rm examples/demo.bash make -C examples/app-fermi/cee distclean make -C examples/app-fermi/fortran distclean make -C examples/app-fermi/wrapper/cee distclean make -C examples/c-example distclean make -C gui distclean make -C perl clean; rm perl/Makefile.PL rm -rf python/build python/setup.py make -C src distclean make -C src/matlab distclean make -C src/octave distclean make -C src/tcl distclean make -C src2/core distclean make -C test distclean rm gui/apps/rappture gui/apps/simsim gui/apps/rappture.env; rm -rf Makefile config.status config.log bin; rm -f include/*