Mercurial > vim
annotate src/Make_cyg.mak @ 4841:81dedcd64821 v7.3.1167
updated for version 7.3.1167
Problem: Python configure check doesn't reject Python 2 when requesting
Python 3. Some systems need -pthreads instead of -pthread.
Solution: Adjust configure accordingly. (Andrei Olsen)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 11 Jun 2013 19:53:45 +0200 |
parents | 450e13fe1621 |
children | afbc9dd67cea |
rev | line source |
---|---|
7 | 1 # |
2 # Makefile for VIM on Win32, using Cygnus gcc | |
4352 | 3 # Last updated by Dan Sharp. Last Change: 2013 Apr 22 |
146 | 4 # |
5 # Also read INSTALLpc.txt! | |
7 | 6 # |
7 # This compiles Vim as a Windows application. If you want Vim to run as a | |
8 # Cygwin application use the Makefile (just like on Unix). | |
9 # | |
10 # GUI no or yes: set to yes if you want the GUI version (yes) | |
11 # PERL define to path to Perl dir to get Perl support (not defined) | |
12 # PERL_VER define to version of Perl being used (56) | |
13 # DYNAMIC_PERL no or yes: set to yes to load the Perl DLL dynamically (yes) | |
14 # PYTHON define to path to Python dir to get PYTHON support (not defined) | |
15 # PYTHON_VER define to version of Python being used (22) | |
16 # DYNAMIC_PYTHON no or yes: use yes to load the Python DLL dynamically (yes) | |
2329
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
17 # PYTHON3 define to path to Python3 dir to get PYTHON3 support (not defined) |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
18 # PYTHON3_VER define to version of Python3 being used (22) |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
19 # DYNAMIC_PYTHON3 no or yes: use yes to load the Python3 DLL dynamically (yes) |
7 | 20 # TCL define to path to TCL dir to get TCL support (not defined) |
21 # TCL_VER define to version of TCL being used (83) | |
22 # DYNAMIC_TCL no or yes: use yes to load the TCL DLL dynamically (yes) | |
23 # RUBY define to path to Ruby dir to get Ruby support (not defined) | |
3959 | 24 # RUBY_VER define to version of Ruby being used (16) |
25 # RUBY_VER_LONG same, but in format with dot. (1.6) | |
26 # You must set RUBY_VER_LONG when changing RUBY_VER. | |
27 # You must set RUBY_API_VER version to RUBY_VER_LONG. | |
28 # Don't set ruby API version to RUBY_VER like 191. | |
7 | 29 # DYNAMIC_RUBY no or yes: use yes to load the Ruby DLL dynamically (yes) |
128 | 30 # MZSCHEME define to path to MzScheme dir to get MZSCHEME support (not defined) |
31 # MZSCHEME_VER define to version of MzScheme being used (209_000) | |
32 # DYNAMIC_MZSCHEME no or yes: use yes to load the MzScheme DLLs dynamically (yes) | |
146 | 33 # MZSCHEME_DLLS path to MzScheme DLLs (libmzgc and libmzsch), for "static" build. |
2628 | 34 # MZSCHEME_USE_RACKET define to use "racket" instead of "mzsch". |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
35 # LUA define to path to Lua dir to get Lua support (not defined) |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
36 # LUA_VER define to version of Lua being used (51) |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
37 # DYNAMIC_LUA no or yes: use yes to load the Lua DLL dynamically (yes) |
7 | 38 # GETTEXT no or yes: set to yes for dynamic gettext support (yes) |
39 # ICONV no or yes: set to yes for dynamic iconv support (yes) | |
40 # MBYTE no or yes: set to yes to include multibyte support (yes) | |
41 # IME no or yes: set to yes to include IME support (yes) | |
42 # DYNAMIC_IME no or yes: set to yes to load imm32.dll dynamically (yes) | |
43 # OLE no or yes: set to yes to make OLE gvim (no) | |
44 # DEBUG no or yes: set to yes if you wish a DEBUGging build (no) | |
39 | 45 # CPUNR No longer supported, use ARCH. |
2088
4ec11bb387a5
updated for version 7.2.372
Bram Moolenaar <bram@zimbu.org>
parents:
1951
diff
changeset
|
46 # ARCH i386 through pentium4: select -march argument to compile with |
4ec11bb387a5
updated for version 7.2.372
Bram Moolenaar <bram@zimbu.org>
parents:
1951
diff
changeset
|
47 # (i386) |
7 | 48 # USEDLL no or yes: set to yes to use the Runtime library DLL (no) |
49 # For USEDLL=yes the cygwin1.dll is required to run Vim. | |
4124 | 50 # For "no" the mingw-gcc-g++ package or the mingw64-i686-gcc-g++ |
4352 | 51 # package is required to compile Vim. Or set CC to gcc-3 and add |
2309
543ea69d037f
Add clipboard support in Mac console. (Bjorn Winckler)
Bram Moolenaar <bram@vim.org>
parents:
2192
diff
changeset
|
52 # -L/lib/w32api to EXTRA_LIBS. |
7 | 53 # POSTSCRIPT no or yes: set to yes for PostScript printing (no) |
54 # FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG) | |
3652 | 55 # WINVER Lowest Win32 version to support. (0x0500) |
7 | 56 # CSCOPE no or yes: to include cscope interface support (yes) |
57 # OPTIMIZE SPACE, SPEED, or MAXSPEED: set optimization level (MAXSPEED) | |
58 # NETBEANS no or yes: to include netbeans interface support (yes when GUI | |
59 # is yes) | |
856 | 60 # NBDEBUG no or yes: to include netbeans interface debugging support (no) |
7 | 61 # XPM define to path to XPM dir to get XPM image support (not defined) |
62 #>>>>> choose options: | |
63 ifndef GUI | |
64 GUI=yes | |
65 endif | |
66 | |
67 ifndef FEATURES | |
68 FEATURES = BIG | |
69 endif | |
70 | |
71 ifndef GETTEXT | |
72 GETTEXT = yes | |
73 endif | |
74 | |
75 ifndef ICONV | |
76 ICONV = yes | |
77 endif | |
78 | |
79 ifndef MBYTE | |
80 MBYTE = yes | |
81 endif | |
82 | |
83 ifndef IME | |
84 IME = yes | |
85 endif | |
86 | |
12 | 87 ifndef ARCH |
88 ARCH = i386 | |
7 | 89 endif |
90 | |
91 ifndef WINVER | |
3652 | 92 WINVER = 0x0500 |
7 | 93 endif |
94 | |
95 ifndef CSCOPE | |
96 CSCOPE = yes | |
97 endif | |
98 | |
99 ifndef NETBEANS | |
100 ifeq ($(GUI),yes) | |
101 NETBEANS = yes | |
102 endif | |
103 endif | |
104 | |
105 ifndef OPTIMIZE | |
106 OPTIMIZE = MAXSPEED | |
107 endif | |
108 | |
4137 | 109 |
110 # Link against the shared version of libstdc++ by default. Set | |
111 # STATIC_STDCPLUS to "yes" to link against static version instead. | |
112 ifndef STATIC_STDCPLUS | |
113 STATIC_STDCPLUS=no | |
114 endif | |
115 | |
7 | 116 ### See feature.h for a list of optionals. |
117 ### Any other defines can be included here. | |
118 | |
119 DEFINES = -DWIN32 -DHAVE_PATHDEF -DFEAT_$(FEATURES) \ | |
120 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) | |
39 | 121 INCLUDES = -march=$(ARCH) -Iproto |
7 | 122 |
123 #>>>>> name of the compiler and linker, name of lib directory | |
4124 | 124 ifeq (yes, $(USEDLL)) |
125 # CROSS_COMPILE is used for the gvimext DLL. | |
126 CROSS_COMPILE = i686-pc-mingw32- | |
7 | 127 CC = gcc |
128 RC = windres | |
4124 | 129 else |
130 # i686-pc-mingw32-gcc, i686-w64-mingw32-gcc or gcc-3 can be used. | |
131 CROSS_COMPILE = i686-pc-mingw32- | |
132 CC = $(CROSS_COMPILE)gcc | |
133 RC = $(CROSS_COMPILE)windres | |
134 endif | |
7 | 135 |
136 ############################## | |
137 # DYNAMIC_PERL=yes and no both work | |
138 ############################## | |
139 ifdef PERL | |
140 DEFINES += -DFEAT_PERL | |
141 INCLUDES += -I$(PERL)/lib/CORE | |
142 EXTRA_OBJS += $(OUTDIR)/if_perl.o | |
143 | |
144 ifndef DYNAMIC_PERL | |
145 DYNAMIC_PERL = yes | |
146 endif | |
147 | |
148 ifndef PERL_VER | |
149 PERL_VER = 56 | |
150 endif | |
151 | |
152 ifeq (yes, $(DYNAMIC_PERL)) | |
153 DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" | |
154 else | |
155 EXTRA_LIBS += $(PERL)/lib/CORE/perl$(PERL_VER).lib | |
156 endif | |
157 endif | |
158 | |
159 ############################## | |
160 # DYNAMIC_PYTHON=yes works. | |
161 # DYNAMIC_PYTHON=no does not (unresolved externals on link). | |
162 ############################## | |
163 ifdef PYTHON | |
164 DEFINES += -DFEAT_PYTHON | |
165 EXTRA_OBJS += $(OUTDIR)/if_python.o | |
166 | |
167 ifndef DYNAMIC_PYTHON | |
168 DYNAMIC_PYTHON = yes | |
169 endif | |
170 | |
171 ifndef PYTHON_VER | |
172 PYTHON_VER = 22 | |
173 endif | |
174 | |
175 ifeq (yes, $(DYNAMIC_PYTHON)) | |
176 DEFINES += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" | |
177 else | |
178 EXTRA_LIBS += $(PYTHON)/libs/python$(PYTHON_VER).lib | |
179 endif | |
180 endif | |
181 | |
182 ############################## | |
2329
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
183 # DYNAMIC_PYTHON3=yes works. |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
184 # DYNAMIC_PYTHON3=no does not (unresolved externals on link). |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
185 ############################## |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
186 ifdef PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
187 DEFINES += -DFEAT_PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
188 EXTRA_OBJS += $(OUTDIR)/if_python3.o |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
189 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
190 ifndef DYNAMIC_PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
191 DYNAMIC_PYTHON3 = yes |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
192 endif |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
193 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
194 ifndef PYTHON3_VER |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
195 PYTHON3_VER = 31 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
196 endif |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
197 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
198 ifeq (yes, $(DYNAMIC_PYTHON3)) |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
199 DEFINES += -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\" |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
200 else |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
201 EXTRA_LIBS += $(PYTHON3)/libs/python$(PYTHON3_VER).lib |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
202 endif |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
203 endif |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
204 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
205 ############################## |
7 | 206 # DYNAMIC_RUBY=yes works. |
207 # DYNAMIC_RUBY=no does not (process exits). | |
208 ############################## | |
209 ifdef RUBY | |
210 | |
4124 | 211 ifndef DYNAMIC_RUBY |
212 DYNAMIC_RUBY=yes | |
213 endif | |
214 # Set default value | |
7 | 215 ifndef RUBY_VER |
4124 | 216 RUBY_VER = 16 |
7 | 217 endif |
218 ifndef RUBY_VER_LONG | |
4124 | 219 RUBY_VER_LONG = 1.6 |
7 | 220 endif |
4124 | 221 ifndef RUBY_API_VER |
222 RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG)) | |
7 | 223 endif |
224 | |
4124 | 225 ifndef RUBY_PLATFORM |
7 | 226 ifeq ($(RUBY_VER), 16) |
227 RUBY_PLATFORM = i586-mswin32 | |
228 else | |
4124 | 229 ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),) |
230 RUBY_PLATFORM = i386-mingw32 | |
231 else | |
4193 | 232 ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),) |
233 RUBY_PLATFORM = x64-mingw32 | |
234 else | |
7 | 235 RUBY_PLATFORM = i386-mswin32 |
236 endif | |
4124 | 237 endif |
238 endif | |
4193 | 239 endif |
4124 | 240 |
7 | 241 ifndef RUBY_INSTALL_NAME |
4124 | 242 ifeq ($(RUBY_VER), 16) |
243 RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER) | |
244 else | |
4193 | 245 ifeq ($(ARCH),x86-64) |
246 RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER) | |
247 else | |
4124 | 248 RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER) |
7 | 249 endif |
250 endif | |
4193 | 251 endif |
7 | 252 |
3959 | 253 ifeq (19, $(word 1,$(sort 19 $(RUBY_VER)))) |
254 RUBY_19_OR_LATER = 1 | |
255 endif | |
256 | |
7 | 257 DEFINES += -DFEAT_RUBY |
4124 | 258 ifneq ($(findstring w64-mingw32,$(CC)),) |
259 # A workaround for mingw-w64 | |
260 DEFINES += -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE | |
261 endif | |
7 | 262 INCLUDES += -I$(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM) |
3959 | 263 ifdef RUBY_19_OR_LATER |
264 INCLUDES += -I$(RUBY)/include/ruby-$(RUBY_VER_LONG) -I$(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM) | |
265 endif | |
7 | 266 EXTRA_OBJS += $(OUTDIR)/if_ruby.o |
267 | |
268 ifeq (yes, $(DYNAMIC_RUBY)) | |
269 DEFINES += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" | |
270 DEFINES += -DDYNAMIC_RUBY_VER=$(RUBY_VER) | |
271 else | |
272 EXTRA_LIBS += $(RUBY)/lib/$(RUBY_INSTALL_NAME).lib | |
273 endif | |
274 endif | |
275 | |
276 ############################## | |
128 | 277 # DYNAMIC_MZSCHEME=yes works |
278 # DYNAMIC_MZSCHEME=no works too | |
279 ############################## | |
280 ifdef MZSCHEME | |
281 DEFINES += -DFEAT_MZSCHEME | |
282 INCLUDES += -I$(MZSCHEME)/include | |
283 EXTRA_OBJS += $(OUTDIR)/if_mzsch.o | |
284 | |
285 ifndef DYNAMIC_MZSCHEME | |
286 DYNAMIC_MZSCHEME = yes | |
287 endif | |
288 | |
289 ifndef MZSCHEME_VER | |
290 MZSCHEME_VER = 209_000 | |
291 endif | |
292 | |
1951 | 293 ifndef MZSCHEME_PRECISE_GC |
294 MZSCHEME_PRECISE_GC=no | |
295 endif | |
296 | |
297 # for version 4.x we need to generate byte-code for Scheme base | |
298 ifndef MZSCHEME_GENERATE_BASE | |
299 MZSCHEME_GENERATE_BASE=no | |
300 endif | |
301 | |
2628 | 302 ifndef MZSCHEME_USE_RACKET |
303 MZSCHEME_MAIN_LIB=mzsch | |
304 else | |
305 MZSCHEME_MAIN_LIB=racket | |
306 endif | |
307 | |
128 | 308 ifeq (yes, $(DYNAMIC_MZSCHEME)) |
2628 | 309 DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\" |
128 | 310 else |
311 ifndef MZSCHEME_DLLS | |
312 MZSCHEME_DLLS = $(MZSCHEME) | |
313 endif | |
1951 | 314 ifeq (yes,$(MZSCHEME_PRECISE_GC)) |
2628 | 315 MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) |
1951 | 316 else |
2628 | 317 MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER) |
1951 | 318 endif |
319 EXTRA_LIBS += -L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)/lib $(MZSCHEME_LIB) | |
320 endif | |
321 ifeq (yes,$(MZSCHEME_GENERATE_BASE)) | |
322 DEFINES += -DINCLUDE_MZSCHEME_BASE | |
323 MZ_EXTRA_DEP += mzscheme_base.c | |
324 endif | |
325 ifeq (yes,$(MZSCHEME_PRECISE_GC)) | |
326 DEFINES += -DMZ_PRECISE_GC | |
128 | 327 endif |
328 endif | |
329 | |
330 ############################## | |
7 | 331 # DYNAMIC_TCL=yes and no both work. |
332 ############################## | |
333 ifdef TCL | |
334 DEFINES += -DFEAT_TCL | |
335 INCLUDES += -I$(TCL)/include | |
336 EXTRA_OBJS += $(OUTDIR)/if_tcl.o | |
337 | |
338 ifndef DYNAMIC_TCL | |
339 DYNAMIC_TCL = yes | |
340 endif | |
341 | |
342 ifndef TCL_VER | |
343 TCL_VER = 83 | |
344 endif | |
345 | |
346 ifeq (yes, $(DYNAMIC_TCL)) | |
347 DEFINES += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\" | |
348 EXTRA_LIBS += $(TCL)/lib/tclstub$(TCL_VER).lib | |
349 else | |
350 EXTRA_LIBS += $(TCL)/lib/tcl$(TCL_VER).lib | |
351 endif | |
352 endif | |
353 | |
354 ############################## | |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
355 # DYNAMIC_LUA=yes works. |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
356 # DYNAMIC_LUA=no does not (unresolved externals on link). |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
357 ############################## |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
358 ifdef LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
359 DEFINES += -DFEAT_LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
360 INCLUDES += -I$(LUA)/include |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
361 EXTRA_OBJS += $(OUTDIR)/if_lua.o |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
362 |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
363 ifndef DYNAMIC_LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
364 DYNAMIC_LUA = yes |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
365 endif |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
366 |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
367 ifndef LUA_VER |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
368 LUA_VER = 51 |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
369 endif |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
370 |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
371 ifeq (yes, $(DYNAMIC_LUA)) |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
372 DEFINES += -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\" |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
373 else |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
374 EXTRA_LIBS += $(LUA)/lib/lua$(LUA_VER).lib |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
375 endif |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
376 endif |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
377 |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2309
diff
changeset
|
378 ############################## |
7 | 379 ifeq (yes, $(GETTEXT)) |
380 DEFINES += -DDYNAMIC_GETTEXT | |
381 endif | |
382 | |
383 ############################## | |
384 ifeq (yes, $(ICONV)) | |
385 DEFINES += -DDYNAMIC_ICONV | |
386 endif | |
387 | |
388 ############################## | |
389 ifeq (yes, $(MBYTE)) | |
390 DEFINES += -DFEAT_MBYTE | |
391 endif | |
392 | |
393 ############################## | |
394 ifeq (yes, $(IME)) | |
395 DEFINES += -DFEAT_MBYTE_IME | |
396 | |
397 ifndef DYNAMIC_IME | |
398 DYNAMIC_IME = yes | |
399 endif | |
400 | |
401 ifeq (yes, $(DYNAMIC_IME)) | |
402 DEFINES += -DDYNAMIC_IME | |
403 else | |
404 EXTRA_LIBS += -limm32 | |
405 endif | |
406 endif | |
407 | |
408 ############################## | |
409 ifeq (yes, $(DEBUG)) | |
410 DEFINES += -DDEBUG | |
411 INCLUDES += -g -fstack-check | |
412 DEBUG_SUFFIX = d | |
413 else | |
414 | |
415 ifeq ($(OPTIMIZE), SIZE) | |
416 OPTFLAG = -Os | |
417 else | |
418 ifeq ($(OPTIMIZE), MAXSPEED) | |
39 | 419 OPTFLAG = -O3 -fomit-frame-pointer -freg-struct-return |
7 | 420 else |
421 OPTFLAG = -O2 | |
422 endif | |
423 endif | |
424 | |
425 # A bug in the GCC <= 3.2 optimizer can cause a crash. The | |
426 # following option removes the problem optimization. | |
427 OPTFLAG += -fno-strength-reduce | |
428 | |
429 INCLUDES += -s | |
430 | |
431 endif | |
432 | |
433 ############################## | |
434 # USEDLL=yes will build a Cygwin32 executable that relies on cygwin1.dll. | |
435 # USEDLL=no will build a Mingw32 executable with no extra dll dependencies. | |
436 ############################## | |
437 ifeq (yes, $(USEDLL)) | |
438 DEFINES += -D_MAX_PATH=256 -D__CYGWIN__ | |
439 else | |
440 INCLUDES += -mno-cygwin | |
441 endif | |
442 | |
443 ############################## | |
444 ifeq (yes, $(POSTSCRIPT)) | |
445 DEFINES += -DMSWINPS | |
446 endif | |
447 | |
448 ############################## | |
449 ifeq (yes, $(CSCOPE)) | |
450 DEFINES += -DFEAT_CSCOPE | |
451 EXTRA_OBJS += $(OUTDIR)/if_cscope.o | |
452 endif | |
453 | |
454 ############################## | |
12 | 455 ifeq ($(GUI),yes) |
456 | |
457 ############################## | |
7 | 458 ifeq (yes, $(NETBEANS)) |
12 | 459 # Only allow NETBEANS for a GUI build. |
7 | 460 DEFINES += -DFEAT_NETBEANS_INTG |
185 | 461 EXTRA_OBJS += $(OUTDIR)/netbeans.o |
7 | 462 EXTRA_LIBS += -lwsock32 |
463 | |
12 | 464 ifeq (yes, $(NBDEBUG)) |
7 | 465 DEFINES += -DNBDEBUG |
466 NBDEBUG_DEP = nbdebug.h nbdebug.c | |
467 endif | |
468 | |
469 endif | |
470 | |
471 ############################## | |
472 ifdef XPM | |
12 | 473 # Only allow XPM for a GUI build. |
7 | 474 DEFINES += -DFEAT_XPM_W32 |
475 INCLUDES += -I$(XPM)/include | |
476 EXTRA_OBJS += $(OUTDIR)/xpm_w32.o | |
477 EXTRA_LIBS += -L$(XPM)/lib -lXpm | |
478 endif | |
479 | |
480 ############################## | |
481 EXE = gvim$(DEBUG_SUFFIX).exe | |
482 OUTDIR = gobj$(DEBUG_SUFFIX) | |
483 DEFINES += -DFEAT_GUI_W32 -DFEAT_CLIPBOARD | |
185 | 484 EXTRA_OBJS += $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o |
435 | 485 EXTRA_LIBS += -mwindows -lcomctl32 -lversion |
7 | 486 else |
487 EXE = vim$(DEBUG_SUFFIX).exe | |
488 OUTDIR = obj$(DEBUG_SUFFIX) | |
489 LIBS += -luser32 -lgdi32 -lcomdlg32 | |
490 endif | |
491 | |
492 ############################## | |
12 | 493 ifeq (yes, $(OLE)) |
494 DEFINES += -DFEAT_OLE | |
495 EXTRA_OBJS += $(OUTDIR)/if_ole.o | |
4137 | 496 EXTRA_LIBS += -loleaut32 |
497 ifeq (yes, $(STATIC_STDCPLUS)) | |
4141 | 498 EXTRA_LIBS += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic |
4137 | 499 else |
500 EXTRA_LIBS += -lstdc++ | |
501 endif | |
12 | 502 endif |
503 | |
504 ############################## | |
7 | 505 ifneq (sh.exe, $(SHELL)) |
506 DEL = rm | |
106 | 507 MKDIR = mkdir -p |
7 | 508 DIRSLASH = / |
509 else | |
510 DEL = del | |
106 | 511 MKDIR = mkdir |
7 | 512 DIRSLASH = \\ |
513 endif | |
514 | |
515 #>>>>> end of choices | |
516 ########################################################################### | |
517 | |
518 INCL = vim.h globals.h option.h keymap.h macros.h ascii.h term.h os_win32.h \ | |
519 structs.h version.h | |
520 | |
521 CFLAGS = $(OPTFLAG) $(DEFINES) $(INCLUDES) | |
522 | |
523 RCFLAGS = -O coff $(DEFINES) | |
524 | |
525 OBJ = \ | |
2192
40edf1be1cd8
Add blowfish and sha256 source files to more Makefiles.
Bram Moolenaar <bram@vim.org>
parents:
2088
diff
changeset
|
526 $(OUTDIR)/blowfish.o \ |
7 | 527 $(OUTDIR)/buffer.o \ |
528 $(OUTDIR)/charset.o \ | |
529 $(OUTDIR)/diff.o \ | |
530 $(OUTDIR)/digraph.o \ | |
531 $(OUTDIR)/edit.o \ | |
532 $(OUTDIR)/eval.o \ | |
533 $(OUTDIR)/ex_cmds.o \ | |
534 $(OUTDIR)/ex_cmds2.o \ | |
535 $(OUTDIR)/ex_docmd.o \ | |
536 $(OUTDIR)/ex_eval.o \ | |
537 $(OUTDIR)/ex_getln.o \ | |
538 $(OUTDIR)/fileio.o \ | |
539 $(OUTDIR)/fold.o \ | |
540 $(OUTDIR)/getchar.o \ | |
440 | 541 $(OUTDIR)/hardcopy.o \ |
800 | 542 $(OUTDIR)/hashtab.o \ |
7 | 543 $(OUTDIR)/main.o \ |
544 $(OUTDIR)/mark.o \ | |
545 $(OUTDIR)/memfile.o \ | |
546 $(OUTDIR)/memline.o \ | |
547 $(OUTDIR)/menu.o \ | |
548 $(OUTDIR)/message.o \ | |
549 $(OUTDIR)/misc1.o \ | |
550 $(OUTDIR)/misc2.o \ | |
551 $(OUTDIR)/move.o \ | |
552 $(OUTDIR)/mbyte.o \ | |
553 $(OUTDIR)/normal.o \ | |
554 $(OUTDIR)/ops.o \ | |
555 $(OUTDIR)/option.o \ | |
556 $(OUTDIR)/os_win32.o \ | |
557 $(OUTDIR)/os_mswin.o \ | |
4168 | 558 $(OUTDIR)/winclip.o \ |
7 | 559 $(OUTDIR)/pathdef.o \ |
800 | 560 $(OUTDIR)/popupmnu.o \ |
7 | 561 $(OUTDIR)/quickfix.o \ |
562 $(OUTDIR)/regexp.o \ | |
563 $(OUTDIR)/screen.o \ | |
564 $(OUTDIR)/search.o \ | |
2192
40edf1be1cd8
Add blowfish and sha256 source files to more Makefiles.
Bram Moolenaar <bram@vim.org>
parents:
2088
diff
changeset
|
565 $(OUTDIR)/sha256.o \ |
226 | 566 $(OUTDIR)/spell.o \ |
7 | 567 $(OUTDIR)/syntax.o \ |
568 $(OUTDIR)/tag.o \ | |
569 $(OUTDIR)/term.o \ | |
570 $(OUTDIR)/ui.o \ | |
571 $(OUTDIR)/undo.o \ | |
572 $(OUTDIR)/version.o \ | |
573 $(OUTDIR)/vimrc.o \ | |
574 $(OUTDIR)/window.o \ | |
575 $(EXTRA_OBJS) | |
576 | |
577 all: $(EXE) xxd/xxd.exe vimrun.exe install.exe uninstal.exe GvimExt/gvimext.dll | |
578 | |
579 # According to the Cygwin doc 1.2 FAQ, kernel32 should not be specified for | |
580 # linking unless calling ld directly. | |
581 # See /usr/doc/cygwin-doc-1.2/html/faq_toc.html#TOC93 for more information. | |
582 $(EXE): $(OUTDIR) $(OBJ) | |
583 $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS) | |
584 | |
585 xxd/xxd.exe: xxd/xxd.c | |
2088
4ec11bb387a5
updated for version 7.2.372
Bram Moolenaar <bram@zimbu.org>
parents:
1951
diff
changeset
|
586 $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL) |
7 | 587 |
588 GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h | |
3110 | 589 $(MAKE) -C GvimExt -f Make_cyg.mak CROSS_COMPILE=$(CROSS_COMPILE) |
7 | 590 |
591 vimrun.exe: vimrun.c | |
592 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS) | |
593 | |
594 install.exe: dosinst.c | |
595 $(CC) $(CFLAGS) -o install.exe dosinst.c $(LIBS) -luuid -lole32 | |
596 | |
597 uninstal.exe: uninstal.c | |
598 $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIBS) | |
599 | |
600 $(OUTDIR): | |
106 | 601 $(MKDIR) $(OUTDIR) |
7 | 602 |
603 tags: | |
604 command /c ctags *.c $(INCL) | |
605 | |
606 clean: | |
607 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o | |
608 -rmdir $(OUTDIR) | |
84 | 609 -$(DEL) $(EXE) vimrun.exe install.exe uninstal.exe |
7 | 610 ifdef PERL |
611 -$(DEL) if_perl.c | |
612 endif | |
1951 | 613 ifdef MZSCHEME |
614 -$(DEL) mzscheme_base.c | |
615 endif | |
7 | 616 -$(DEL) pathdef.c |
617 $(MAKE) -C xxd -f Make_cyg.mak clean | |
3110 | 618 $(MAKE) -C GvimExt -f Make_cyg.mak clean |
7 | 619 |
84 | 620 distclean: clean |
621 -$(DEL) obj$(DIRSLASH)*.o | |
622 -rmdir obj | |
623 -$(DEL) gobj$(DIRSLASH)*.o | |
624 -rmdir gobj | |
625 -$(DEL) objd$(DIRSLASH)*.o | |
626 -rmdir objd | |
627 -$(DEL) gobjd$(DIRSLASH)*.o | |
628 -rmdir gobjd | |
629 -$(DEL) *.exe | |
630 | |
7 | 631 ########################################################################### |
632 | |
633 $(OUTDIR)/%.o : %.c $(INCL) | |
634 $(CC) -c $(CFLAGS) $< -o $@ | |
635 | |
636 $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h | |
637 $(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o | |
638 | |
639 $(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h | |
640 $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o | |
641 | |
4041 | 642 $(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL) |
643 $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o | |
644 | |
7 | 645 $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h |
646 $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o | |
647 | |
648 $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) | |
1413 | 649 $(CC) -c $(CFLAGS) if_ole.cpp -o $(OUTDIR)/if_ole.o |
7 | 650 |
4724
450e13fe1621
updated for version 7.3.1109
Bram Moolenaar <bram@vim.org>
parents:
4444
diff
changeset
|
651 $(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL) |
2329
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
652 $(CC) -c $(CFLAGS) -I$(PYTHON)/include $< -o $@ |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
653 |
4724
450e13fe1621
updated for version 7.3.1109
Bram Moolenaar <bram@vim.org>
parents:
4444
diff
changeset
|
654 $(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL) |
2329
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
655 $(CC) -c $(CFLAGS) -I$(PYTHON3)/include $< -o $@ |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
656 |
7 | 657 if_perl.c: if_perl.xs typemap |
84 | 658 $(PERL)/bin/perl `cygpath -d $(PERL)/lib/ExtUtils/xsubpp` \ |
659 -prototypes -typemap \ | |
660 `cygpath -d $(PERL)/lib/ExtUtils/typemap` if_perl.xs > $@ | |
7 | 661 |
662 $(OUTDIR)/if_perl.o: if_perl.c $(INCL) | |
663 ifeq (yes, $(USEDLL)) | |
664 $(CC) -c $(CFLAGS) -I/usr/include/mingw -D__MINGW32__ if_perl.c -o $(OUTDIR)/if_perl.o | |
665 endif | |
666 | |
667 $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL) | |
668 ifeq (16, $(RUBY_VER)) | |
669 $(CC) -c $(CFLAGS) -U_WIN32 if_ruby.c -o $(OUTDIR)/if_ruby.o | |
670 endif | |
671 | |
672 $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_DEP) | |
673 $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o | |
674 | |
4444 | 675 $(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL) |
676 $(CC) -c $(CFLAGS) regexp.c -o $(OUTDIR)/regexp.o | |
677 | |
1951 | 678 $(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP) |
679 $(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o | |
680 | |
7 | 681 $(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h |
682 $(RC) $(RCFLAGS) vim.rc -o $(OUTDIR)/vimrc.o | |
683 | |
1951 | 684 mzscheme_base.c: |
685 $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base | |
686 | |
7 | 687 pathdef.c: $(INCL) |
688 ifneq (sh.exe, $(SHELL)) | |
689 @echo creating pathdef.c | |
690 @echo '/* pathdef.c */' > pathdef.c | |
691 @echo '#include "vim.h"' >> pathdef.c | |
692 @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c | |
693 @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c | |
694 @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c | |
695 @echo 'char_u *all_lflags = (char_u *)"$(CC) -s -o $(EXE) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)";' >> pathdef.c | |
696 @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c | |
697 @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c | |
698 else | |
699 @echo creating pathdef.c | |
700 @echo /* pathdef.c */ > pathdef.c | |
701 @echo #include "vim.h" >> pathdef.c | |
702 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c | |
703 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c | |
704 @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c | |
705 @echo char_u *all_lflags = (char_u *)"$(CC) -s -o $(EXE) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)"; >> pathdef.c | |
706 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c | |
707 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c | |
708 endif | |
2329
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
709 |