diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-07-17 21:19:38 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-07-17 21:19:38 +0200 |
commit | bd5e15fd5c7e42505d6b0e20f4198d24fc7e219d (patch) | |
tree | 70e3f86ae76494fc094bbe25c58ba2befbcf4872 /src/Make_mvc.mak | |
parent | 02c707a87da1b0f78d10a689cc03941a2e8acbc6 (diff) | |
download | vim-bd5e15fd5c7e42505d6b0e20f4198d24fc7e219d.zip |
Added support for Python 3. (Roland Puntaier)
Diffstat (limited to 'src/Make_mvc.mak')
-rw-r--r-- | src/Make_mvc.mak | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index 7a144cc30..c0704503c 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -52,6 +52,11 @@ # DYNAMIC_PYTHON=yes (to load the Python DLL dynamically) # PYTHON_VER=[Python version, eg 15, 20] (default is 22) # +# Python3 interface: +# PYTHON3=[Path to Python3 directory] +# DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically) +# PYTHON3_VER=[Python3 version, eg 30, 31] (default is 31) +# # Ruby interface: # RUBY=[Path to Ruby directory] # DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically) @@ -166,6 +171,9 @@ OBJDIR = $(OBJDIR)L !ifdef PYTHON OBJDIR = $(OBJDIR)Y !endif +!ifdef PYTHON3 +OBJDIR = $(OBJDIR)H +!endif !ifdef TCL OBJDIR = $(OBJDIR)T !endif @@ -641,6 +649,13 @@ LUA_LIB = "$(LUA)\lib\lua$(LUA_VER).lib" !endif !endif +!ifdef PYTHON +!ifdef PYTHON3 +DYNAMIC_PYTHON=yes +DYNAMIC_PYTHON3=yes +!endif +!endif + # PYTHON interface !ifdef PYTHON !ifndef PYTHON_VER @@ -662,6 +677,27 @@ PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib !endif !endif +# PYTHON3 interface +!ifdef PYTHON3 +!ifndef PYTHON3_VER +PYTHON3_VER = 31 +!endif +!message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)" +!if "$(DYNAMIC_PYTHON3)" == "yes" +!message Python3 DLL will be loaded dynamically +!endif +CFLAGS = $(CFLAGS) -DFEAT_PYTHON3 +PYTHON3_OBJ = $(OUTDIR)\if_python3.obj +PYTHON3_INC = /I "$(PYTHON3)\Include" /I "$(PYTHON3)\PC" +!if "$(DYNAMIC_PYTHON3)" == "yes" +CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON3 \ + -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\" +PYTHON3_LIB = /nodefaultlib:python$(PYTHON3_VER).lib +!else +PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib +!endif +!endif + # MzScheme interface !ifdef MZSCHEME !message MzScheme requested - root dir is "$(MZSCHEME)" @@ -835,7 +871,7 @@ conflags = $(conflags) /map /mapinfo:lines LINKARGS1 = $(linkdebug) $(conflags) LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \ - $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \ + $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \ $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB) # Report link time code generation progress if used. @@ -851,12 +887,12 @@ all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \ GvimExt/gvimext.dll $(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \ - $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \ + $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_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) \ - $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) \ + $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \ $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \ $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) @@ -1016,6 +1052,9 @@ mzscheme_base.c: $(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL) $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c +$(OUTDIR)/if_python3.obj: $(OUTDIR) if_python3.c $(INCL) + $(CC) $(CFLAGS) $(PYTHON3_INC) if_python3.c + $(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h $(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL) |