Octave: use common example.mk for examples, patterned after javascript
This commit is contained in:
parent
ebe1338015
commit
b2d492c15a
17 changed files with 68 additions and 245 deletions
32
Examples/octave/example.mk
Normal file
32
Examples/octave/example.mk
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Note: as a convention an example must be in a child directory of this.
|
||||
# These paths are relative to such an example directory
|
||||
|
||||
TOP = ../..
|
||||
SWIG = $(TOP)/../preinst-swig
|
||||
TARGET = swigexample
|
||||
INTERFACE = example.i
|
||||
|
||||
check: build
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
|
||||
|
||||
build:
|
||||
ifneq (,$(SRCS))
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave
|
||||
else
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
|
||||
endif
|
||||
ifneq (,$(TARGET2)$(SWIGOPT2))
|
||||
ifneq (,$(SRCS))
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT2)' TARGET='$(TARGET2)' INTERFACE='$(INTERFACE)' octave
|
||||
else
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT2)' TARGET='$(TARGET2)' INTERFACE='$(INTERFACE)' octave_cpp
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
clean:
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
|
||||
Loading…
Add table
Add a link
Reference in a new issue