Files
pcas/configure/RULES_OCTAVE
Andrew Johnson fbda9f3280 RCS keyword updates for Bazaar
Replaced $Id$ and $Header$ keywords with $Revision-Id$
Deleted $Log$ keywords and any log messages
2010-10-05 14:27:37 -05:00

53 lines
1.4 KiB
Plaintext

#*************************************************************************
# 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.
#*************************************************************************
# $Revision-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