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