Added Lua interfae. (Luis Carvalho)
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
index 29dd623..7a144cc 100644
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -30,6 +30,11 @@
# is yes)
# Global IME support: GIME=yes (requires GUI=yes)
#
+# Lua interface:
+# LUA=[Path to Lua directory]
+# DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
+# LUA_VER=[Lua version] (default is 51)
+#
# MzScheme interface:
# MZSCHEME=[Path to MzScheme directory]
# DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically)
@@ -152,6 +157,9 @@
!if "$(OLE)" == "yes"
OBJDIR = $(OBJDIR)O
!endif
+!ifdef LUA
+OBJDIR = $(OBJDIR)U
+!endif
!ifdef PERL
OBJDIR = $(OBJDIR)L
!endif
@@ -364,6 +372,9 @@
!if "$(_NMAKE_VER)" == "10.00.30319.01"
MSVCVER = 10.0
!endif
+!if "$(_NMAKE_VER)" == "9.00.30729.01"
+MSVCVER = 9.0
+!endif
!endif
# Abort bulding VIM if version of VC is unrecognised.
@@ -609,6 +620,27 @@
!endif
!endif
+# Lua interface
+!ifdef LUA
+!ifndef LUA_VER
+LUA_VER = 51
+!endif
+!message Lua requested (version $(LUA_VER)) - root dir is "$(LUA)"
+!if "$(DYNAMIC_LUA)" == "yes"
+!message Lua DLL will be loaded dynamically
+!endif
+CFLAGS = $(CFLAGS) -DFEAT_LUA
+LUA_OBJ = $(OUTDIR)\if_lua.obj
+LUA_INC = /I "$(LUA)\include" /I "$(LUA)"
+!if "$(DYNAMIC_LUA)" == "yes"
+CFLAGS = $(CFLAGS) -DDYNAMIC_LUA \
+ -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
+LUA_LIB = /nodefaultlib:lua$(LUA_VER).lib
+!else
+LUA_LIB = "$(LUA)\lib\lua$(LUA_VER).lib"
+!endif
+!endif
+
# PYTHON interface
!ifdef PYTHON
!ifndef PYTHON_VER
@@ -803,7 +835,7 @@
LINKARGS1 = $(linkdebug) $(conflags)
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
- $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \
+ $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \
$(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
# Report link time code generation progress if used.
@@ -819,11 +851,12 @@
GvimExt/gvimext.dll
$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
- $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
- $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) version.c version.h
+ $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
+ $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) \
+ version.c version.h
$(CC) $(CFLAGS) version.c
$(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
- $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) \
+ $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) \
$(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
@@ -961,6 +994,9 @@
$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
+$(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL)
+ $(CC) $(CFLAGS) $(LUA_INC) if_lua.c
+
if_perl.c : if_perl.xs typemap
$(PERL_EXE) $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
-typemap typemap if_perl.xs > if_perl.c