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