summaryrefslogtreecommitdiff
path: root/src/Make_cyg_ming.mak
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-02 20:26:36 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-02 20:26:36 +0100
commit3c6f92e52ef15df4aa248ce00eacd65928044210 (patch)
tree8fd8c7fb5d153d6170f7f9d3a4fe1d9e8f95f1a3 /src/Make_cyg_ming.mak
parenta2cce8630756769b2cefdc28c7290ae9262cddb1 (diff)
downloadvim-git-3c6f92e52ef15df4aa248ce00eacd65928044210.tar.gz
patch 7.4.1031v7.4.1031
Problem: Can't build with Python interface using MingW. Solution: Update the Makefile. (Yasuhiro Matsumoto)
Diffstat (limited to 'src/Make_cyg_ming.mak')
-rw-r--r--src/Make_cyg_ming.mak12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak
index d10817af0..2b595bbb1 100644
--- a/src/Make_cyg_ming.mak
+++ b/src/Make_cyg_ming.mak
@@ -212,7 +212,13 @@ DYNAMIC_PYTHON=yes
endif
ifndef PYTHON_VER
-PYTHON_VER=22
+PYTHON_VER=27
+endif
+ifndef DYNAMIC_PYTHON_DLL
+DYNAMIC_PYTHON_DLL=python$(PYTHON_VER).dll
+endif
+ifdef PYTHON_HOME
+PYTHON_HOME_DEF=-DPYTHON_HOME=\"$(PYTHON_HOME)\"
endif
ifeq (no,$(DYNAMIC_PYTHON))
@@ -220,12 +226,14 @@ PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
endif
# my include files are in 'win32inc' on Linux, and 'include' in the standard
# NT distro (ActiveState)
+ifndef PYTHONINC
ifeq ($(CROSS),no)
PYTHONINC=-I $(PYTHON)/include
else
PYTHONINC=-I $(PYTHON)/win32inc
endif
endif
+endif
# Python3 interface:
# PYTHON3=[Path to Python3 directory] (Set inside Make_cyg.mak or Make_ming.mak)
@@ -772,7 +780,7 @@ INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
gui.h
$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
- $(CC) -c $(CFLAGS) $(PYTHONINC) -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@
+ $(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) -DDYNAMIC_PYTHON_DLL=\"$(DYNAMIC_PYTHON_DLL)\" $< -o $@
$(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL)
$(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@