summaryrefslogtreecommitdiff
path: root/src/Make_cyg.mak
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-02-13 17:06:11 +0100
committerBram Moolenaar <Bram@vim.org>2013-02-13 17:06:11 +0100
commitc2149ea7cd782588563f235e2d1315eaa353ab7b (patch)
treea0d7626a524d3825faaeac75096cd8396331580d /src/Make_cyg.mak
parentffeedec023a47a71fe361c4f0cdbee1649ca8c5f (diff)
downloadvim-git-c2149ea7cd782588563f235e2d1315eaa353ab7b.tar.gz
updated for version 7.3.815v7.3.815
Problem: Building with Cygwin and Ruby doesn't work. Solution: Copy some things from the MingW build file. (Ken Takata)
Diffstat (limited to 'src/Make_cyg.mak')
-rw-r--r--src/Make_cyg.mak50
1 files changed, 34 insertions, 16 deletions
diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
index 087b68e48..0930161d4 100644
--- a/src/Make_cyg.mak
+++ b/src/Make_cyg.mak
@@ -47,8 +47,8 @@
# (i386)
# USEDLL no or yes: set to yes to use the Runtime library DLL (no)
# For USEDLL=yes the cygwin1.dll is required to run Vim.
-# "no" does not work with latest version of Cygwin, use
-# Make_ming.mak instead. Or set CC to gcc-3 and add
+# For "no" the mingw-gcc-g++ package or the mingw64-i686-gcc-g++
+# package is required to complie Vim. Or set CC to gcc-3 and add
# -L/lib/w32api to EXTRA_LIBS.
# POSTSCRIPT no or yes: set to yes for PostScript printing (no)
# FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG)
@@ -114,9 +114,17 @@ DEFINES = -DWIN32 -DHAVE_PATHDEF -DFEAT_$(FEATURES) \
INCLUDES = -march=$(ARCH) -Iproto
#>>>>> name of the compiler and linker, name of lib directory
-CROSS_COMPILE =
+ifeq (yes, $(USEDLL))
+# CROSS_COMPILE is used for the gvimext DLL.
+CROSS_COMPILE = i686-pc-mingw32-
CC = gcc
RC = windres
+else
+# i686-pc-mingw32-gcc, i686-w64-mingw32-gcc or gcc-3 can be used.
+CROSS_COMPILE = i686-pc-mingw32-
+CC = $(CROSS_COMPILE)gcc
+RC = $(CROSS_COMPILE)windres
+endif
##############################
# DYNAMIC_PERL=yes and no both work
@@ -193,31 +201,37 @@ endif
##############################
ifdef RUBY
+ifndef DYNAMIC_RUBY
+DYNAMIC_RUBY=yes
+endif
+# Set default value
ifndef RUBY_VER
-RUBY_VER=16
+RUBY_VER = 16
endif
-
ifndef RUBY_VER_LONG
-RUBY_VER_LONG=1.6
+RUBY_VER_LONG = 1.6
endif
-
-ifndef DYNAMIC_RUBY
-DYNAMIC_RUBY = yes
+ifndef RUBY_API_VER
+RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
endif
-ifeq ($(RUBY_VER), 16)
ifndef RUBY_PLATFORM
+ifeq ($(RUBY_VER), 16)
RUBY_PLATFORM = i586-mswin32
-endif
-ifndef RUBY_INSTALL_NAME
-RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
-endif
else
-ifndef RUBY_PLATFORM
+ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
+RUBY_PLATFORM = i386-mingw32
+else
RUBY_PLATFORM = i386-mswin32
endif
+endif
+endif
+
ifndef RUBY_INSTALL_NAME
-RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
+ifeq ($(RUBY_VER), 16)
+RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
+else
+RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
endif
endif
@@ -226,6 +240,10 @@ RUBY_19_OR_LATER = 1
endif
DEFINES += -DFEAT_RUBY
+ifneq ($(findstring w64-mingw32,$(CC)),)
+# A workaround for mingw-w64
+DEFINES += -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE
+endif
INCLUDES += -I$(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
ifdef RUBY_19_OR_LATER
INCLUDES += -I$(RUBY)/include/ruby-$(RUBY_VER_LONG) -I$(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)