Added "module" target to build a dynamic module, got "clean" target to

invoke "chicken_clean" target in Examples/Makefile, and let
Examples/Makefile handle all the compiling.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4500 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Jonah Beckford 2003-03-10 19:13:56 +00:00
commit 13682064c4
8 changed files with 151 additions and 87 deletions

View file

@ -1,7 +1,9 @@
TOP = ../..
SWIG = $(TOP)/../swig
CHICKGEN = example_wrap.c csi.c precsi.c oexample.c
SRCS = $(CHICKGEN)
CHICKSRCS = precsi.c oexample.c
SRCS = example_wrap.c
CXXSRCS =
CHICKGEN = $(CHICKSRCS) csi.c example_wrap.c
TARGET = zlib
INCLUDE = -I.
LIBS = -lz
@ -13,29 +15,34 @@ csi.c:
$(MAKE) -f $(TOP)/Makefile TARGET='csi.c' \
INTERFACE='precsi' chicken_csi
precsi.c: ./precsi.scm
precsi.c: precsi.scm
$(MAKE) -f $(TOP)/Makefile TARGET='precsi.c' \
INTERFACE='$<' chicken
example_wrap.c example.scm: ./example.i
example_wrap.c example.scm: example.i
$(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
INCLUDE='$(INCLUDE)' INTERFACE='example.i' chicken_c || \
(echo Did you read the README? && exit 1)
INCLUDE='$(INCLUDE)' INTERFACE='example.i' chicken_c
oexample.c: example.scm
$(MAKE) -f $(TOP)/Makefile TARGET='oexample.c' \
INTERFACE='$<' chicken
$(TARGET): $(SRCS)
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
$(TARGET): csi.c $(CHICKSRCS) $(SRCS) $(CXXSRCS)
$(MAKE) -f $(TOP)/Makefile LIBS='$(LIBS)' \
CHICKSRCS='$(CHICKSRCS)' SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' \
LIBS='$(LIBS)' INTERFACE='$(INTERFACE)' chicken_static || \
(echo Did you read the README? && exit 1)
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
clean::
rm -f *_wrap* *.o core *~ *.so *.stackdump STACKTRACE
rm -f $(CHICKGEN) csi.c precsi.c oexample.c
rm -f example.scm
$(MAKE) -f $(TOP)/Makefile chicken_clean
rm -f $(CHICKGEN)
rm -f example.scm example_generic.scm example_clos.scm
rm -f $(TARGET)
check:: all