1## This is part of the GNU Octave Interval Package. 2## Copyright 2018 Oliver Heimlich 3## See the file COPYING for copying conditions. 4 5SHELL = /bin/sh 6 7## To be backwards compatible with old versions of Octave, we use wrapper 8## functions around some core API functions. 9## 10## The implementation of the wrapper functions and other backwards 11## compatibility code is split into .cc files for respective major versions 12## of Octave. 13## 14## The needed implementation for octave.h is selected during installation. 15OCTAVE_VERSION = $(shell $(OCTAVE_CONFIG) -p VERSION) 16ifneq ($(filter 3.% 4.0.% 4.1.% 4.2.%,$(OCTAVE_VERSION)),) 17SRC = octave_4.2.cc 18else 19SRC = octave_current.cc 20endif 21octave.cc: $(SRC) 22 @echo "Detected Octave version: $(OCTAVE_VERSION)" 23 cp "$<" "$@" 24 25clean: 26 $(RM) octave.cc 27