## @configure_input@ ## ## \file Makefile.in ## \brief Makefile template for libsbml Octave bindings ## \author SBML Team ## ## $Id: Makefile.in 9850 2009-07-18 10:33:19Z ajouraku $ ## $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/src/bindings/octave/Makefile.in $ ## ##*/ # ----------------------------------------------------------------------------- # Configuration variables # ----------------------------------------------------------------------------- # Some of the following are substituted automatically by `configure'. If # you are looking at "Makefile", do not edit these values; instead, run the # configure script at the top level of the src tree. It will recreate # "Makefile". include @top_srcdir@/config/makefile-common-vars.mk # `srcdir' points to the current directory, but should be set by configure. # `subdir' must be set manually to the relative dir under srcdir. Don't # set `subdir' to an absolute path, or some make actions will fail. srcdir = @srcdir@ thisdir = src/bindings/octave # The Octave binding files are identical to the MATLAB version (so far), # but the commands to build them are different, and we have to keep the # binaries separate. The approach taken here is to make symbolic links # to the Matlab files and then compile in the current directory. matlab_sources = \ BuildTranslate_Win32.m \ CheckAndConvert.m \ Contents.m \ README.txt \ TranslateSBML.c \ TranslateSBML.m \ install_Win32.m \ make.bat \ matlab-tags-regexp.txt \ test.xml compiled_sources = TranslateSBML.c # This use of $(libraries) is slightly inconsistent with the other makefiles, # but for Octave, these object files act a lot like dynamic libraries and # we're installing them in the same place as the other libraries, so.... libraries = $(compiled_sources:.c=.$(OCTAVEEXT)) subdirs = test # `distfiles' determines the files and directories included in a distribution. # `distfiles_exclude' is used to filter out specific items, so that even if # they appear in `distfiles', they will not be copied in the distribution. distfiles = Makefile.in # `extra_clean' and `extra_distclean' determine the files and directories # removed during "make clean" and "make distclean". extra_clean = TranslateSBML.$(OCTAVEEXT) extra_distclean = $(matlab_sources) ifeq "$(HOST_TYPE)" "cygwin" # for some reason cygwin needs an additional libraries declared # at the build ifdef USE_EXPAT MKOCTFILE_LIBS += @EXPAT_LIBS@ endif ifdef USE_XERCES MKOCTFILE_LIBS += @XERCES_LIBS@ endif ifdef USE_LIBXML MKOCTFILE_LIBS += @LIBXML_LIBS@ endif ifdef USE_SUN_CC MKOCTFILE_LIBS += -lCstd endif ifdef USE_ZLIB MKOCTFILE_LIBS += @ZLIB_LIBS@ endif ifdef USE_BZ2 MKOCTFILE_LIBS += @BZ2_LIBS@ endif endif # ----------------------------------------------------------------------------- # Primary build actions # ----------------------------------------------------------------------------- all: Makefile link-sources ${MAKE} $(libraries) link-sources: files='$(matlab_sources)'; for file in $$files; do\ if ! test -f $$file; then \ ln -f -s ../matlab/$$file $$file; \ fi; \ done flags = $(MKOCTFILE_FLAGS) -DUSE_OCTAVE -I../.. -I../../../include -L../.. %.$(OCTAVEEXT): %.c $(MKOCTFILE) $(flags) $^ -lsbml $(MKOCTFILE_LIBS) # ----------------------------------------------------------------------------- # Tags. # ----------------------------------------------------------------------------- octave-tags-extra-flags = *.c --lang=none --regex=@matlab-tags-regexp.txt *.m etags-command = $(ETAGS) $(ETAGSFLAGS) $(octave-tags-extra-flags) ctags-command = $(CTAGS) $(CTAGSFLAGS) $(octave-tags-extra-flags) tags: etags ctags # ----------------------------------------------------------------------------- # Targets for checking/testing. # ----------------------------------------------------------------------------- check: check-recursive # ----------------------------------------------------------------------------- # Installation. # ----------------------------------------------------------------------------- install: all for i in $(libraries); do \ $(INSTALL_SH) $$i $(DESTDIR)$(prefix)$(LOCALOCTFILEDIR)/$$i; \ done installdirs: all uninstall: uninstall-libraries for i in $(libraries); do \ f=$(DESTDIR)$(prefix)$(LOCALOCTFILEDIR)/$$i; \ if test -e $$f; then \ rm $(DESTDIR)$(prefix)$(LOCALOCTFILEDIR)/$$i; \ fi; \ done # ----------------------------------------------------------------------------- # Creating distribution (for libSBML maintainers only) # ----------------------------------------------------------------------------- dist: all dist-normal dist-recursive distcheck: all distcheck-normal distcheck-recursive # ----------------------------------------------------------------------------- # Miscellaneous # ----------------------------------------------------------------------------- include @top_srcdir@/config/makefile-common-actions.mk # ----------------------------------------------------------------------------- # End. # -----------------------------------------------------------------------------