2 Subject: Patch 7.2.372 (extra)
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Cross-compiling GvimExt and xxd doesn't work.
12 Solution: Change the build files. (Markus Heidelberg)
13 Files: src/INSTALLpc.txt, src/GvimExt/Make_ming.mak, src/Make_cyg.mak,
14 src/Make_ming.mak, src/xxd/Make_cyg.mak
17 *** ../vim-7.2.371/src/INSTALLpc.txt 2008-07-13 19:20:53.000000000 +0200
18 --- src/INSTALLpc.txt 2010-01-19 12:37:03.000000000 +0100
22 You should not need to do *any* editing of any files to get vim compiled this
23 way. If, for some reason, you want the console-mode-only version of vim (this
24 ! is NOT recommended on Win32, especially on '95/'98!!!), you need only change
25 ! the 'gvim.exe' to 'vim.exe' in the 'make' commands given above.
27 If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
28 (also free!) and compress the file (typical compression is 50%). UPX can be
31 You should not need to do *any* editing of any files to get vim compiled this
32 way. If, for some reason, you want the console-mode-only version of vim (this
33 ! is NOT recommended on Win32, especially on '95/'98!!!), you can use:
35 ! make -f Make_ming.mak GUI=no vim.exe
37 If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
38 (also free!) and compress the file (typical compression is 50%). UPX can be
41 The Cygnus one many not fully work yet.
42 With Cygnus gcc you can use the Unix Makefile instead (you need to get the
43 Unix archive then). Then you get a Cygwin application (feels like Vim is
44 ! runnin on Unix), while with Make_cyg.mak you get a Windows application (like
45 with the other makefiles).
49 The Cygnus one many not fully work yet.
50 With Cygnus gcc you can use the Unix Makefile instead (you need to get the
51 Unix archive then). Then you get a Cygwin application (feels like Vim is
52 ! running on Unix), while with Make_cyg.mak you get a Windows application (like
53 with the other makefiles).
59 If you like, you can compile the 'mingw' Win32 version from the comfort of
60 your Linux (or other unix) box. To do this, you need to follow a few steps:
61 1) Install the mingw32 cross-compiler. See
62 + http://www.mingw.org/wiki/LinuxCrossMinGW
63 http://www.libsdl.org/extras/win32/cross/README.txt
64 2) Get and unpack both the Unix sources and the extra archive
65 3) in 'Make_ming.mak', set 'CROSS' to 'yes' instead of 'no'.
66 Make further changes to 'Make_ming.mak' as you wish.
67 + If your cross-compiler prefix differs from the predefined value,
68 + set 'CROSS_COMPILE' corresponding.
69 4) make -f Make_ming.mak gvim.exe
71 Now you have created the Windows binary from your Linux box! Have fun...
72 *** ../vim-7.2.371/src/GvimExt/Make_ming.mak 2005-01-09 22:15:44.000000000 +0100
73 --- src/GvimExt/Make_ming.mak 2010-02-24 14:56:37.000000000 +0100
78 ifeq ($(MINGWOLD),yes)
79 - CXX = i586-mingw32msvc-g++
80 CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks
81 - WINDRES = i586-mingw32msvc-windres
83 - CXX = i386-mingw32msvc-g++
84 CXXFLAGS := -O2 -mno-cygwin
85 - WINDRES = i386-mingw32msvc-windres
90 CXXFLAGS := -O2 -mno-cygwin
91 ifneq (sh.exe, $(SHELL))
100 + CXX := $(CROSS_COMPILE)g++
101 + WINDRES := $(CROSS_COMPILE)windres
104 DEFFILE = gvimext_ming.def
105 *** ../vim-7.2.371/src/Make_cyg.mak 2009-09-11 12:48:56.000000000 +0200
106 --- src/Make_cyg.mak 2010-02-24 14:59:02.000000000 +0100
110 # Makefile for VIM on Win32, using Cygnus gcc
111 ! # Last updated by Dan Sharp. Last Change: 2007 Sep 29
113 # Also read INSTALLpc.txt!
117 # Makefile for VIM on Win32, using Cygnus gcc
118 ! # Last updated by Dan Sharp. Last Change: 2010 Feb 24
120 # Also read INSTALLpc.txt!
124 # OLE no or yes: set to yes to make OLE gvim (no)
125 # DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
126 # CPUNR No longer supported, use ARCH.
127 ! # ARCH i386 through pentium4: select -march argument to compile with (i386)
128 # USEDLL no or yes: set to yes to use the Runtime library DLL (no)
129 # For USEDLL=yes the cygwin1.dll is required to run Vim.
130 # POSTSCRIPT no or yes: set to yes for PostScript printing (no)
131 # FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG)
132 # WINVER Lowest Win32 version to support. (0x0400)
134 # OLE no or yes: set to yes to make OLE gvim (no)
135 # DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
136 # CPUNR No longer supported, use ARCH.
137 ! # ARCH i386 through pentium4: select -march argument to compile with
139 # USEDLL no or yes: set to yes to use the Runtime library DLL (no)
140 # For USEDLL=yes the cygwin1.dll is required to run Vim.
141 + # "no" does not work with latest version of Cygwin, use
142 + # Make_ming.mak instead. Or set CC to gcc-3.
143 # POSTSCRIPT no or yes: set to yes for PostScript printing (no)
144 # FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG)
145 # WINVER Lowest Win32 version to support. (0x0400)
149 INCLUDES = -march=$(ARCH) -Iproto
151 #>>>>> name of the compiler and linker, name of lib directory
158 $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)
160 xxd/xxd.exe: xxd/xxd.c
161 ! $(MAKE) -C xxd -f Make_cyg.mak USEDLL=$(USEDLL)
163 GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
164 ! $(MAKE) -C GvimExt -f Make_ming.mak
167 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS)
169 $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)
171 xxd/xxd.exe: xxd/xxd.c
172 ! $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL)
174 GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
175 ! $(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE)
178 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS)
179 *** ../vim-7.2.371/src/Make_ming.mak 2009-09-11 12:48:56.000000000 +0200
180 --- src/Make_ming.mak 2010-02-24 15:01:31.000000000 +0100
183 DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
184 -DHAVE_PATHDEF -DFEAT_$(FEATURES)
187 ! CC = i586-pc-mingw32msvc-gcc
190 ! WINDRES = i586-pc-mingw32msvc-windres
192 # normal (Windows) compilation:
194 ifneq (sh.exe, $(SHELL))
199 DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
200 -DHAVE_PATHDEF -DFEAT_$(FEATURES)
202 ! # cross-compiler prefix:
203 ! CROSS_COMPILE = i586-pc-mingw32msvc-
208 # normal (Windows) compilation:
209 ifneq (sh.exe, $(SHELL))
222 #>>>>> end of choices
223 ###########################################################################
229 + CC := $(CROSS_COMPILE)gcc
230 + WINDRES := $(CROSS_COMPILE)windres
232 #>>>>> end of choices
233 ###########################################################################
238 xxd/xxd.exe: xxd/xxd.c
239 ! $(MAKE) -C xxd -f Make_cyg.mak
241 GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
242 $(MAKE) -C GvimExt -f Make_ming.mak
245 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
249 xxd/xxd.exe: xxd/xxd.c
250 ! $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC)
252 GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
253 $(MAKE) -C GvimExt -f Make_ming.mak
254 + $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE)
257 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
258 *** ../vim-7.2.371/src/xxd/Make_cyg.mak 2004-06-13 17:48:52.000000000 +0200
259 --- src/xxd/Make_cyg.mak 2010-02-24 15:05:24.000000000 +0100
267 CFLAGS = -O2 -Wall -DWIN32 $(DEFINES)
269 ifneq (sh.exe, $(SHELL))
275 ! gcc $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS)
283 ! $(CC) $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS)
287 *** ../vim-7.2.371/src/version.c 2010-02-24 14:46:58.000000000 +0100
288 --- src/version.c 2010-02-24 15:05:48.000000000 +0100
292 { /* Add new patch number below this line */
298 Ten bugs in the hand is better than one as yet undetected.
300 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
301 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
302 \\\ download, build and distribute -- http://www.A-A-P.org ///
303 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///