summaryrefslogtreecommitdiff
path: root/src/Make_bc5.mak
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-17 21:19:38 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-17 21:19:38 +0200
commitbd5e15fd5c7e42505d6b0e20f4198d24fc7e219d (patch)
tree70e3f86ae76494fc094bbe25c58ba2befbcf4872 /src/Make_bc5.mak
parent02c707a87da1b0f78d10a689cc03941a2e8acbc6 (diff)
downloadvim-git-bd5e15fd5c7e42505d6b0e20f4198d24fc7e219d.tar.gz
Added support for Python 3. (Roland Puntaier)
Diffstat (limited to 'src/Make_bc5.mak')
-rw-r--r--src/Make_bc5.mak56
1 files changed, 54 insertions, 2 deletions
diff --git a/src/Make_bc5.mak b/src/Make_bc5.mak
index c3ddf00f6..739fc62ed 100644
--- a/src/Make_bc5.mak
+++ b/src/Make_bc5.mak
@@ -44,6 +44,9 @@
# PYTHON define to path to Python dir to get PYTHON support (not defined)
# PYTHON_VER define to version of Python being used (22)
# DYNAMIC_PYTHON no or yes: use yes to load the Python DLL dynamically (no)
+# PYTHON3 define to path to Python3 dir to get PYTHON3 support (not defined)
+# PYTHON3_VER define to version of Python3 being used (31)
+# DYNAMIC_PYTHON3 no or yes: use yes to load the Python3 DLL dynamically (no)
# TCL define to path to TCL dir to get TCL support (not defined)
# TCL_VER define to version of TCL being used (83)
# DYNAMIC_TCL no or yes: use yes to load the TCL DLL dynamically (no)
@@ -141,6 +144,9 @@ NETBEANS = yes
### PYTHON: uncomment this line if you want python support in vim
# PYTHON=c:\python22
+### PYTHON3: uncomment this line if you want python3 support in vim
+# PYTHON3=c:\python31
+
### RUBY: uncomment this line if you want ruby support in vim
# RUBY=c:\ruby
@@ -207,6 +213,7 @@ ALIGN = 4
!if ("$(FASTCALL)"=="") && \
("$(LUA)"=="") && \
("$(PYTHON)"=="") && \
+ ("$(PYTHON3)"=="") && \
("$(PERL)"=="") && \
("$(TCL)"=="") && \
("$(RUBY)"=="") && \
@@ -328,8 +335,14 @@ PERL_LIB_FLAG = /nodefaultlib:
!endif
!ifdef PYTHON
+!ifdef PYTHON3
+DYNAMIC_PYTHON=yes
+DYNAMIC_PYTHON3=yes
+!endif
+!endif
+
+!ifdef PYTHON
INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON
-INCLUDE = $(PYTHON)\include;$(INCLUDE)
!ifndef PYTHON_VER
PYTHON_VER = 22
!endif
@@ -339,6 +352,18 @@ PYTHON_LIB_FLAG = /nodefaultlib:
!endif
!endif
+!ifdef PYTHON3
+INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON3
+!ifndef PYTHON3_VER
+PYTHON3_VER = 31
+!endif
+!if "$(DYNAMIC_PYTHON3)" == "yes"
+INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
+PYTHON3_LIB_FLAG = /nodefaultlib:
+!endif
+!endif
+
+
!ifdef RUBY
!ifndef RUBY_VER
RUBY_VER = 16
@@ -618,6 +643,11 @@ vimobj = $(vimobj) \
$(OBJDIR)\if_python.obj
!endif
+!ifdef PYTHON3
+vimobj = $(vimobj) \
+ $(OBJDIR)\if_python3.obj
+!endif
+
!ifdef RUBY
vimobj = $(vimobj) \
$(OBJDIR)\if_ruby.obj
@@ -734,6 +764,12 @@ MSG = $(MSG) PYTHON
MSG = $(MSG)(dynamic)
! endif
!endif
+!ifdef PYTHON3
+MSG = $(MSG) PYTHON3
+! if "$(DYNAMIC_PYTHON3)" == "yes"
+MSG = $(MSG)(dynamic)
+! endif
+!endif
!ifdef RUBY
MSG = $(MSG) RUBY
! if "$(DYNAMIC_RUBY)" == "yes"
@@ -827,6 +863,9 @@ clean:
!ifdef PYTHON
-@del python.lib
!endif
+!ifdef PYTHON3
+ -@del python3.lib
+!endif
!ifdef RUBY
-@del ruby.lib
!endif
@@ -867,6 +906,9 @@ $(DLLTARGET): $(OBJDIR) $(vimdllobj)
!ifdef PYTHON
$(PYTHON_LIB_FLAG)python.lib+
!endif
+!ifdef PYTHON3
+ $(PYTHON3_LIB_FLAG)python3.lib+
+!endif
!ifdef RUBY
$(RUBY_LIB_FLAG)ruby.lib+
!endif
@@ -919,6 +961,9 @@ $(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
!ifdef PYTHON
$(PYTHON_LIB_FLAG)python.lib+
!endif
+!ifdef PYTHON3
+ $(PYTHON3_LIB_FLAG)python3.lib+
+!endif
!ifdef RUBY
$(RUBY_LIB_FLAG)ruby.lib+
!endif
@@ -962,7 +1007,10 @@ if_perl.c: if_perl.xs typemap
$(PERL)\lib\ExtUtils\typemap if_perl.xs > $@
$(OBJDIR)\if_python.obj: if_python.c python.lib
- $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
+ $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
+
+$(OBJDIR)\if_python3.obj: if_python3.c python3.lib
+ $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c
$(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib
$(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_ruby.c
@@ -1017,6 +1065,9 @@ perl.lib: $(PERL)\lib\CORE\perl$(PERL_VER).lib
python.lib: $(PYTHON)\libs\python$(PYTHON_VER).lib
coff2omf $(PYTHON)\libs\python$(PYTHON_VER).lib $@
+python3.lib: $(PYTHON3)\libs\python$(PYTHON3_VER).lib
+ coff2omf $(PYTHON3)\libs\python$(PYTHON3_VER).lib $@
+
ruby.lib: $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
coff2omf $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib $@
@@ -1065,3 +1116,4 @@ $(OBJDIR)\bcc.cfg: Make_bc5.mak $(OBJDIR)
| $@
# vi:set sts=4 sw=4:
+