Updated Guile modules.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@815 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ebf5116c60
commit
27705dc6ff
8 changed files with 61 additions and 35 deletions
|
|
@ -9,10 +9,17 @@ INCLUDE = -I../../Include
|
|||
|
||||
all:: static
|
||||
|
||||
static::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
dynamic::
|
||||
$(MAKE) -f $(TOP)/Makefile TOP='$(TOP)' \
|
||||
SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDE='$(INCLUDE)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='gifguile' INTERFACE='$(INTERFACE)' guile_static
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile
|
||||
|
||||
static::
|
||||
$(MAKE) -f $(TOP)/Makefile TOP='$(TOP)' \
|
||||
SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDE='$(INCLUDE)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile_static
|
||||
|
||||
clean::
|
||||
rm -f *_wrap* *.o *~ *.so gifguile .~* core *.gif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
;;; Plot a 3D function
|
||||
|
||||
;; Use the wrapped GIFPlot library
|
||||
(use-modules (gifplot))
|
||||
|
||||
;; Here is the function to plot
|
||||
(define (func x y)
|
||||
(* 5
|
||||
|
|
|
|||
|
|
@ -9,10 +9,17 @@ INCLUDE = -I../../Include
|
|||
|
||||
all:: static
|
||||
|
||||
static::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
dynamic::
|
||||
$(MAKE) -f $(TOP)/Makefile TOP='$(TOP)' \
|
||||
SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDE='$(INCLUDE)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='gifguile' INTERFACE='$(INTERFACE)' guile_static
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile
|
||||
|
||||
static::
|
||||
$(MAKE) -f $(TOP)/Makefile TOP='$(TOP)' \
|
||||
SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDE='$(INCLUDE)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile_static
|
||||
|
||||
clean::
|
||||
rm -f *_wrap* *.o *~ *.so gifguile .~* core *.gif
|
||||
|
|
|
|||
|
|
@ -1,3 +1,11 @@
|
|||
This is a very minimalistic example in which just a few functions
|
||||
and constants from library are wrapped and used to draw some simple
|
||||
shapes. Run `gifguile -s runme.scm'.
|
||||
shapes.
|
||||
|
||||
`make' will build a version of Guile which defines an additional
|
||||
module (simple). Run `./simple-guile -s runme.scm' to test it.
|
||||
|
||||
`make dynamic' will build a dynamically loadable module, which can be
|
||||
loaded from any Guile interpreter. Run `guile -s runme.scm' to test
|
||||
it. The `use-modules' call in `runme.scm' dynamically loads the
|
||||
module.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
;; Draw some simple shapes
|
||||
;;; Draw some simple shapes
|
||||
|
||||
;; Use the wrapped GIFPlot library
|
||||
(use-modules (simple))
|
||||
|
||||
(display "Drawing some basic shapes\n")
|
||||
|
||||
(define cmap (new-ColorMap))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue