Rewrite chicken example and test-suite building code

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5948 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
John Lenz 2004-05-30 07:11:26 +00:00
commit acd0b021b1
35 changed files with 315 additions and 844 deletions

View file

@ -1,48 +1,28 @@
TOP = ../../..
SWIG = $(TOP)/../swig
CHICKSRCS = precsi.c ogifplot.c
SRCS = gifplot_wrap.c
CXXSRCS =
CHICKGEN = $(CHICKSRCS) csi.c gifplot_wrap.c
TARGET = gifplot
INCLUDE = -I. -I../../Include
LIBS = -L../.. -lgifplot -lm
SWIGOPT = -I../../Include
TOP = ../../..
SWIG = $(TOP)/../preinst-swig
INTERFACE = gifplot.i
SRCS =
CXXSRCS =
TARGET = gifplot
INCLUDE = -I. -I../../Include
SWIGOPT = -I../../Include
CFLAGS =
VARIANT =
LIBS = -L../.. -lgifplot -lm
# comment the following two lines to build a dynamic so file
CHICKEN_MAIN = test-gifplot.scm
VARIANT = _static
all:: $(TARGET)
csi.c:
$(MAKE) -f $(TOP)/Makefile TARGET='csi.c' \
INTERFACE='precsi' chicken_csi
precsi.c: precsi.scm
$(MAKE) -f $(TOP)/Makefile TARGET='precsi.c' \
INTERFACE='$<' chicken
gifplot_wrap.c gifplot.scm: gifplot.i
$(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
INCLUDE='$(INCLUDE)' INTERFACE='gifplot.i' chicken_c
ogifplot.c: gifplot.scm
$(MAKE) -f $(TOP)/Makefile TARGET='ogifplot.c' \
INTERFACE='$<' chicken
$(TARGET): csi.c $(CHICKSRCS) $(SRCS) $(CXXSRCS)
$(MAKE) -f $(TOP)/Makefile LIBS='$(LIBS)' \
CHICKSRCS='$(CHICKSRCS)' SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' \
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' chicken_static
module:: $(CHICKSRCS) $(SRCS) $(CXXSRCS)
$(MAKE) -f $(TOP)/Makefile LIBS='$(LIBS)' \
CHICKSRCS='$(CHICKSRCS)' SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='module' \
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' chicken_module
$(TARGET): $(INTERFACE) $(SRCS)
$(MAKE) -f $(TOP)/Makefile \
SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' CHICKEN_MAIN='$(CHICKEN_MAIN)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' TARGET='$(TARGET)' \
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' CHICKENOPTS='$(CHICKENOPTS)' chicken$(VARIANT)
clean::
$(MAKE) -f $(TOP)/Makefile chicken_clean
rm -f $(CHICKGEN)
rm -f gifplot.scm
rm -f $(TARGET) image.gif
check:: all
rm -f gifplot.scm image.gif
rm -f $(TARGET)