[OCaml] Add a callback example
It is based on the the Python and Go examples.
This commit is contained in:
parent
fa0c3fe5c2
commit
a641966e0b
7 changed files with 95 additions and 2 deletions
31
Examples/ocaml/callback/Makefile
Normal file
31
Examples/ocaml/callback/Makefile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
TOP = ../..
|
||||
SWIGEXE = $(TOP)/../swig
|
||||
SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
|
||||
SWIGOPT =
|
||||
SRCS = example.c
|
||||
TARGET = example
|
||||
INTERFACE = example.i
|
||||
PROGFILE = runme.ml
|
||||
OBJS = example.o
|
||||
|
||||
check: build
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
|
||||
|
||||
build: static
|
||||
|
||||
static:
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
|
||||
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
|
||||
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
|
||||
ocaml_static_cpp
|
||||
|
||||
static_top:
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
|
||||
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
|
||||
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
|
||||
ocaml_static_cpp_toplevel
|
||||
|
||||
clean:
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_clean
|
||||
Loading…
Add table
Add a link
Reference in a new issue