From: William F. <wsf...@us...> - 2005-08-15 20:38:42
|
Update of /cvsroot/swig/SWIG/Examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1575/Examples Modified Files: Makefile.in Log Message: Support for Lua added - patch from Mark Gossage Index: Makefile.in =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/Makefile.in,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Makefile.in 17 Mar 2005 07:28:17 -0000 1.54 --- Makefile.in 15 Aug 2005 20:38:34 -0000 1.55 *************** *** 864,865 **** --- 864,918 ---- rm -f *.@OBJEXT@ *@CSHARPSO@ *_wrap* *~ .~* core @EXTRA_CLEAN@ runme runme.exe gc.log `find . -name \*.cs | grep -v runme.cs` + ################################################################## + ##### LUA ###### + ################################################################## + + # lua flags + LUA_INCLUDE= @LUAINCLUDE@ + LUA_LIB = @LUALIB@ -llua -llualib + + # Extra specific dynamic linking options + LUA_DLNK = @LUADYNAMICLINKING@ + LUA_SO = @LUA_SO@ + + # Extra code for lua static link + LUA_INTERP = ../lua.c + + # ---------------------------------------------------------------- + # Build a C dynamically loadable module + # ---------------------------------------------------------------- + + lua: $(SRCS) + $(SWIG) -lua $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(LUA_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) $(LUA_LIB) -o $(LIBPREFIX)$(TARGET)$(LUA_SO) + + # ----------------------------------------------------------------- + # Build a C++ dynamically loadable module + # ----------------------------------------------------------------- + + lua_cpp: $(SRCS) + $(SWIG) -c++ -lua $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(LUA_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(LUA_LIB) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(LUA_SO) + + # ----------------------------------------------------------------- + # Build statically linked Lua interpreter + # ----------------------------------------------------------------- + + lua_static: $(SRCS) + $(SWIG) -lua -module example $(SWIGOPT) $(INTERFACE) + $(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(LUA_INTERP) $(INCLUDES) \ + $(LUA_INCLUDE) $(LIBS) $(LUA_LIB) -o $(TARGET) + + lua_static_cpp: $(SRCS) + $(SWIG) -c++ -lua -module example $(SWIGOPT) $(INTERFACE) + $(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(LUA_INTERP) $(INCLUDES) \ + $(LUA_INCLUDE) $(LIBS) $(LUA_LIB) -o $(TARGET) + + # ----------------------------------------------------------------- + # Cleaning the lua examples + # ----------------------------------------------------------------- + + lua_clean: + rm -f *.@OBJEXT@ *$(SO) *_wrap* *~ .~* core @EXTRA_CLEAN@ mylua@EXEEXT@ |