bindir = @bindir@ datadir = @datadir@ datarootdir = @datarootdir@ exec_prefix = @exec_prefix@ includedir = @includedir@ libdir = @libdir@ mandir = @mandir@ prefix = @prefix@ srcdir = @srcdir@ INSTALL = @INSTALL@ SHELL = @SHELL@ MKDIR_P = @MKDIR_P@ RM = rm -f VPATH = $(srcdir) build_date := $(shell date +%Y%m%d) machine := $(shell uname -m | sed 's/\ //') os := $(shell uname -s) pkg_path := $(shell dirname $(prefix)) pkg_name := $(shell basename $(prefix)) SVN_VERSION := $(shell svnversion $(srcdir) | sed 's/Unversioned directory/unknown/') rappture_binary_tarfile = rappture-$(os)-$(machine)-$(build_date).tar.gz rappture_source_tarfile = rappture-src-$(build_date).tar.gz runtime_source_tarfile = rappture-runtime-src-$(build_date).tar.gz runtime_repo = https://nanohub.org/infrastructure/rappture-runtime/svn/trunk rappture_repo = https://nanohub.org/infrastructure/rappture/svn/trunk ENABLE_GUI = @ENABLE_GUI@ ENABLE_LANG = @ENABLE_LANG@ HAVE_FFMPEG = @HAVE_FFMPEG_LIBS@ TARGETS = src lib ifneq ($(ENABLE_LANG),) TARGETS += lang endif ifneq ($(ENABLE_GUI),) TARGETS += gui builder tester examples endif ifneq ($(HAVE_FFMPEG),) TARGETS += video endif .PHONY: all test install clean distclean package distrib runtime-distrib \ $(TARGETS) all: for i in $(TARGETS) ; do \ $(MAKE) -C $$i all || exit 1 ;\ done test: $(MAKE) -C test all install: for i in $(TARGETS) ; do \ $(MAKE) -C $$i install || exit 1 ;\ done clean: for i in $(TARGETS) ; do \ $(MAKE) -C $$i clean || exit 1 ;\ done distclean: clean $(RM) Makefile config.status config.log *~ for i in $(TARGETS) ; do \ $(MAKE) -C $$i distclean || exit 1 ;\ done package: tar -C $(pkg_path) -czlf $(rappture_binary_tarfile) $(pkg_name) distrib: $(RM) -r exported $(MKDIR_P) -m 0755 exported (cd exported; svn export -q $(rappture_repo) rappture) tar -C exported -czlf $(rappture_source_tarfile) rappture $(RM) -r exported runtime-distrib: $(RM) -r exported $(MKDIR_P) -m 0755 exported (cd exported; svn export -q $(runtime_repo) runtime) tar -C exported -czlf $(runtime_source_tarfile) runtime $(RM) -r exported