Rewrite chicken example and test-suite building code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5948 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
68fff144a9
commit
42afd931c7
35 changed files with 315 additions and 844 deletions
|
|
@ -1,49 +1,30 @@
|
|||
TOP = ../..
|
||||
SWIG = $(TOP)/../swig
|
||||
INTERFACE = example.i
|
||||
CHICKSRCS = precsi.c oexample.c
|
||||
SRCS =
|
||||
CXXSRCS = example_wrap.cxx example.cxx
|
||||
CHICKGEN = $(CHICKSRCS) csi.c example_wrap.cxx
|
||||
TARGET = overload
|
||||
INCLUDE =
|
||||
SWIGOPT =
|
||||
CFLAGS =
|
||||
TOP = ../..
|
||||
SWIG = $(TOP)/../preinst-swig
|
||||
INTERFACE = example.i
|
||||
SRCS =
|
||||
CXXSRCS = example.cxx
|
||||
TARGET = overload
|
||||
INCLUDE =
|
||||
SWIGOPT =
|
||||
CFLAGS =
|
||||
VARIANT =
|
||||
|
||||
all:: $(TARGET) example-generic.scm example-clos.scm
|
||||
# uncomment the following lines to build a static exe
|
||||
#CHICKEN_MAIN = test-overload.scm
|
||||
#VARIANT = _static
|
||||
|
||||
csi.c:
|
||||
$(MAKE) -f $(TOP)/Makefile TARGET='csi.c' \
|
||||
INTERFACE='precsi' chicken_csi
|
||||
all:: $(TARGET)
|
||||
|
||||
precsi.c: precsi.scm
|
||||
$(MAKE) -f $(TOP)/Makefile TARGET='precsi.c' \
|
||||
INTERFACE='$<' chicken_chicken
|
||||
|
||||
example_wrap.cxx example.scm example-generic.scm example-clos.scm: example.i
|
||||
$(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
|
||||
INCLUDE='$(INCLUDE)' INTERFACE='example.i' chicken_swig_cpp
|
||||
|
||||
oexample.c: example.scm
|
||||
$(MAKE) -f $(TOP)/Makefile TARGET='oexample.c' \
|
||||
INTERFACE='$<' chicken_chicken
|
||||
|
||||
$(TARGET): csi.c $(CHICKSRCS) $(SRCS) $(CXXSRCS)
|
||||
$(TARGET): $(INTERFACE) $(SRCS)
|
||||
$(MAKE) -f $(TOP)/Makefile \
|
||||
CHICKSRCS='$(CHICKSRCS)' SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' \
|
||||
SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' CHICKEN_MAIN='$(CHICKEN_MAIN)' \
|
||||
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' \
|
||||
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' chicken_static_cpp
|
||||
|
||||
module:: $(CHICKSRCS) $(SRCS) $(CXXSRCS)
|
||||
$(MAKE) -f $(TOP)/Makefile \
|
||||
CHICKSRCS='$(CHICKSRCS)' SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' \
|
||||
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='module' \
|
||||
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' chicken_module_cpp
|
||||
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' CHICKENOPTS='$(CHICKENOPTS)' chicken$(VARIANT)_cpp
|
||||
|
||||
clean::
|
||||
$(MAKE) -f $(TOP)/Makefile chicken_clean
|
||||
rm -f $(CHICKGEN)
|
||||
rm -f example.scm example-generic.scm example-clos.scm
|
||||
rm -f $(TARGET)
|
||||
|
||||
check:: module
|
||||
check::
|
||||
csi -batch $(TARGET).so test-overload.scm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue