Fix Octave C support by adding extern "C" around header section. Fix Octave examples (simple, contract, variables, pointer, funcptr) such that example.c files are built with C compiler, and wrappers with C++ compiler.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10299 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Xavier Delacour 2008-03-05 15:29:01 +00:00
commit 13c0b040fc
11 changed files with 83 additions and 51 deletions

View file

@ -285,6 +285,16 @@ OCTAVE_LIB =
OCTAVE_DLNK = @OCTAVEDYNAMICLINKING@
OCTAVE_SO = @OCTAVE_SO@
# ----------------------------------------------------------------
# Build a C dynamically loadable module
# ----------------------------------------------------------------
octave: $(SRCS)
$(SWIG) -octave $(SWIGOPT) $(INTERFACE)
$(CXX) -g -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(CXXSRCS) $(INCLUDES) -I$(OCTAVE_INCLUDE)
$(CC) -g -c $(CCSHARED) $(CFLAGS) $(SRCS) $(INCLUDES) $(OCTAVE_INCLUDE)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
# -----------------------------------------------------------------