From b10833318b35a77be58f21d3475c05a91af16620 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Mon, 24 Mar 2008 22:06:26 +0000 Subject: [PATCH] Macros and rules for octave files. --- configure/RULES_OCTAVE | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 configure/RULES_OCTAVE diff --git a/configure/RULES_OCTAVE b/configure/RULES_OCTAVE new file mode 100644 index 000000000..b7153cd5e --- /dev/null +++ b/configure/RULES_OCTAVE @@ -0,0 +1,52 @@ +#************************************************************************* +# Copyright (c) 2002 The University of Chicago, as Operator of Argonne +# National Laboratory. +# Copyright (c) 2002 The Regents of the University of California, as +# Operator of Los Alamos National Laboratory. +# EPICS BASE Versions 3.13.7 +# and higher are distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* +# $Id$ +# +#------------------------------------------------------- +# Octave definitions and rules + +ifeq ($(findstring Host,$(VALID_BUILDS)),Host) + +FILE_TYPE += OCTAVE +INSTALL_OCTAVE = $(INSTALL_LOCATION_LIB)/octave +DIRECTORY_TARGETS += $(INSTALL_OCTAVE) + +ifdef T_A + +MKOCTFILE_FLAGS += --mex --verbose -DOCTAVE +MKOCTFILE_FLAGS += $(RELEASE_INCLUDES) $(addprefix -L,$(SHRLIB_SEARCH_DIRS)) + +vpath %.mex $(USR_VPATH) $(ALL_SRC_DIRS) +vpath %.m $(USR_VPATH) $(ALL_SRC_DIRS) + +define OCTAVES_template +$(1) : $$($(1)_SRCS) +endef +$(foreach file, $(OCTAVES),$(eval $(call OCTAVES_template,$(strip $(file))))) + +#This clean works from O.* dirs. +clean:: + @$(RM) *.mex *.m + +.PRECIOUS: *.m *.mex + +%.mex: + mkoctfile $(MKOCTFILE_FLAGS) $($*_LIBS:%=-l%) $($*_SRCS) + +endif +endif + + +# Makefile usage: +# OCTAVES += abc.mex def.mex +# abc_SRCS = a1.c a2.c +# abc_LIBS = ca Com +# def_SRCS = a3.c a4.c +# def_LIBS = ca Com