Mercurial > vim
annotate src/Make_ming.mak @ 2105:8562c6804861 v7.2.388
updated for version 7.2.388
Problem: Ruby with MingW still doesn't build all versions.
Solution: Different approach to build file. (Sergey Khorev)
author | Bram Moolenaar <bram@zimbu.org> |
---|---|
date | Wed, 10 Mar 2010 13:20:40 +0100 |
parents | 0e4631bf9441 |
children | 2832243e801e |
rev | line source |
---|---|
7 | 1 # Makefile for VIM on Win32, using 'EGCS/mingw32 1.1.2'. |
2 # Info at http://www.mingw.org | |
3 # Also requires 'GNU make 3.77', which you can get through a link | |
4 # to 'JanJaap's page from the above page. | |
5 # Get missing libraries from http://gnuwin32.sf.net. | |
6 # | |
7 # Tested on Win32 NT 4 and Win95. | |
8 # | |
9 # To make everything, just 'make -f Make_ming.mak' | |
10 # To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe' | |
11 # After a run, you can 'make -f Make_ming.mak clean' to clean up | |
12 # | |
13 # NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think | |
14 # it's just run out of memory or something. Run again, and it will continue | |
15 # with 'xxd'. | |
16 # | |
17 # "make upx" makes *compressed* versions of the GUI and console EXEs, using the | |
18 # excellent UPX compressor: | |
19 # http://upx.sourceforge.net/ | |
20 # | |
21 # Maintained by Ron Aaron <ronaharon@yahoo.com> | |
22 # updated 2003 Jan 20 | |
23 | |
24 #>>>>> choose options: | |
25 # set to yes for a debug build | |
26 DEBUG=no | |
1201 | 27 # set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization |
7 | 28 OPTIMIZE=MAXSPEED |
29 # set to yes to make gvim, no for vim | |
30 GUI=yes | |
31 # FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE] | |
32 # set to TINY to make minimal version (few features) | |
33 FEATURES=BIG | |
39 | 34 # set to one of i386, i486, i586, i686 as the minimum target processor |
7 | 35 ARCH=i386 |
36 # set to yes to cross-compile from unix; no=native Windows | |
37 CROSS=no | |
38 # set to path to iconv.h and libiconv.a to enable using 'iconv.dll' | |
39 #ICONV="." | |
40 ICONV=yes | |
41 GETTEXT=yes | |
42 # set to yes to include multibyte support | |
43 MBYTE=yes | |
44 # set to yes to include IME support | |
45 IME=yes | |
46 DYNAMIC_IME=yes | |
47 # set to yes to enable writing a postscript file with :hardcopy | |
48 POSTSCRIPT=no | |
49 # set to yes to enable OLE support | |
50 OLE=no | |
51 # Set the default $(WINVER) to make it work with pre-Win2k | |
52 WINVER = 0x0400 | |
53 # Set to yes to enable Cscope support | |
54 CSCOPE=yes | |
55 # Set to yes to enable Netbeans support | |
56 NETBEANS=$(GUI) | |
57 | |
58 | |
59 # If the user doesn't want gettext, undefine it. | |
60 ifeq (no, $(GETTEXT)) | |
61 GETTEXT= | |
62 endif | |
63 # Added by E.F. Amatria <eferna1@platea.ptic.mec.es> 2001 Feb 23 | |
64 # Uncomment the first line and one of the following three if you want Native Language | |
65 # Support. You'll need gnu_gettext.win32, a MINGW32 Windows PORT of gettext by | |
66 # Franco Bez <franco.bez@gmx.de>. It may be found at | |
67 # http://home.a-city.de/franco.bez/gettext/gettext_win32_en.html | |
68 # Tested with mingw32 with GCC-2.95.2 on Win98 | |
69 # Updated 2001 Jun 9 | |
70 #GETTEXT=c:/gettext.win32.msvcrt | |
71 #STATIC_GETTEXT=USE_STATIC_GETTEXT | |
72 #DYNAMIC_GETTEXT=USE_GETTEXT_DLL | |
73 #DYNAMIC_GETTEXT=USE_SAFE_GETTEXT_DLL | |
74 SAFE_GETTEXT_DLL_OBJ = $(GETTEXT)/src/safe_gettext_dll/safe_gettext_dll.o | |
75 # Alternatively, if you uncomment the two following lines, you get a "safe" version | |
76 # without linking the safe_gettext_dll.o object file. | |
77 #DYNAMIC_GETTEXT=DYNAMIC_GETTEXT | |
78 #GETTEXT_DYNAMIC=gnu_gettext.dll | |
79 INTLPATH=$(GETTEXT)/lib/mingw32 | |
80 INTLLIB=gnu_gettext | |
81 | |
82 # If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext | |
83 # or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/ | |
84 # uncomment the following, but I can't build a static versión with them, ?-(| | |
85 #GETTEXT=c:/gettext-0.10.37-20010430 | |
86 #STATIC_GETTEXT=USE_STATIC_GETTEXT | |
87 #DYNAMIC_GETTEXT=DYNAMIC_GETTEXT | |
88 #INTLPATH=$(GETTEXT)/lib | |
89 #INTLLIB=intl | |
90 | |
91 # uncomment 'PERL' if you want a perl-enabled version | |
92 #PERL=C:/perl | |
93 ifdef PERL | |
94 ifndef PERL_VER | |
95 PERL_VER=56 | |
96 endif | |
97 ifndef DYNAMIC_PERL | |
98 DYNAMIC_PERL=yes | |
99 endif | |
100 # on Linux, for cross-compile, it's here: | |
101 #PERLLIB=/home/ron/ActivePerl/lib | |
102 # on NT, it's here: | |
103 PERLLIB=$(PERL)/lib | |
104 PERLLIBS=$(PERLLIB)/Core | |
105 endif | |
106 | |
14 | 107 # uncomment 'MZSCHEME' if you want a MzScheme-enabled version |
108 #MZSCHEME=d:/plt | |
109 ifdef MZSCHEME | |
128 | 110 ifndef DYNAMIC_MZSCHEME |
111 DYNAMIC_MZSCHEME=yes | |
112 endif | |
113 | |
14 | 114 ifndef MZSCHEME_VER |
115 MZSCHEME_VER=205_000 | |
116 endif | |
128 | 117 |
1894 | 118 ifndef MZSCHEME_PRECISE_GC |
119 MZSCHEME_PRECISE_GC=no | |
120 endif | |
121 | |
122 # for version 4.x we need to generate byte-code for Scheme base | |
123 ifndef MZSCHEME_GENERATE_BASE | |
124 MZSCHEME_GENERATE_BASE=no | |
125 endif | |
126 | |
128 | 127 ifeq (no,$(DYNAMIC_MZSCHEME)) |
1894 | 128 ifeq (yes,$(MZSCHEME_PRECISE_GC)) |
129 MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER) | |
130 else | |
128 | 131 MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER) |
1894 | 132 endif |
128 | 133 # the modern MinGW can dynamically link to dlls directly. |
134 # point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll | |
135 ifndef MZSCHEME_DLLS | |
136 MZSCHEME_DLLS=$(MZSCHEME) | |
14 | 137 endif |
1951 | 138 MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib |
128 | 139 endif |
140 | |
14 | 141 endif |
142 | |
7 | 143 # Python support -- works with the ActiveState python 2.0 release (and others |
144 # too, probably) | |
145 # | |
146 # uncomment 'PYTHON' to make python-enabled version | |
147 # Put the path to the python distro here. If cross compiling from Linux, you | |
148 # will also need to convert the header files to unix instead of dos format: | |
149 # for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil | |
150 # and also, you will need to make a mingw32 'libpython20.a' to link with: | |
151 # cd $PYTHON/libs | |
152 # pexports python20.dll > python20.def | |
153 # dlltool -d python20.def -l libpython20.a | |
154 # on my Linux box, I put the Python stuff here: | |
155 #PYTHON=/home/ron/ActivePython-2.0.0-202/src/Core | |
156 # on my NT box, it's here: | |
157 #PYTHON=c:/python20 | |
158 | |
159 ifdef PYTHON | |
160 ifndef DYNAMIC_PYTHON | |
161 DYNAMIC_PYTHON=yes | |
162 endif | |
163 | |
164 ifndef PYTHON_VER | |
165 PYTHON_VER=22 | |
166 endif | |
167 | |
168 ifeq (no,$(DYNAMIC_PYTHON)) | |
169 PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER) | |
170 endif | |
171 # my include files are in 'win32inc' on Linux, and 'include' in the standard | |
172 # NT distro (ActiveState) | |
173 ifeq ($(CROSS),no) | |
174 PYTHONINC=-I $(PYTHON)/include | |
175 else | |
176 PYTHONINC=-I $(PYTHON)/win32inc | |
177 endif | |
178 endif | |
179 | |
180 # TCL interface: | |
181 # TCL=[Path to TCL directory] | |
182 # DYNAMIC_TCL=yes (to load the TCL DLL dynamically) | |
183 # TCL_VER=[TCL version, eg 83, 84] (default is 83) | |
184 #TCL=c:/tcl | |
185 ifdef TCL | |
186 ifndef DYNAMIC_TCL | |
187 DYNAMIC_TCL=yes | |
188 endif | |
189 ifndef TCL_VER | |
190 TCL_VER = 83 | |
191 endif | |
192 TCLINC += -I$(TCL)/include | |
193 endif | |
194 | |
195 | |
196 # Ruby interface: | |
197 # RUBY=[Path to Ruby directory] | |
198 # DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically) | |
199 # RUBY_VER=[Ruby version, eg 16, 17] (default is 16) | |
200 # RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.6) | |
201 # You must set RUBY_VER_LONG when change RUBY_VER. | |
202 #RUBY=c:/ruby | |
203 ifdef RUBY | |
204 ifndef DYNAMIC_RUBY | |
205 DYNAMIC_RUBY=yes | |
206 endif | |
207 # Set default value | |
208 ifndef RUBY_VER | |
209 RUBY_VER = 16 | |
210 endif | |
211 ifndef RUBY_VER_LONG | |
212 RUBY_VER_LONG = 1.6 | |
213 endif | |
214 | |
2105
8562c6804861
updated for version 7.2.388
Bram Moolenaar <bram@zimbu.org>
parents:
2093
diff
changeset
|
215 ifndef RUBY_PLATFORM |
7 | 216 ifeq ($(RUBY_VER), 16) |
217 RUBY_PLATFORM = i586-mswin32 | |
2105
8562c6804861
updated for version 7.2.388
Bram Moolenaar <bram@zimbu.org>
parents:
2093
diff
changeset
|
218 else ifneq ("X$(wildcard, $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32)", X) |
8562c6804861
updated for version 7.2.388
Bram Moolenaar <bram@zimbu.org>
parents:
2093
diff
changeset
|
219 RUBY_PLATFORM = i386-mingw32 |
7 | 220 else |
221 RUBY_PLATFORM = i386-mswin32 | |
222 endif | |
2105
8562c6804861
updated for version 7.2.388
Bram Moolenaar <bram@zimbu.org>
parents:
2093
diff
changeset
|
223 endif |
8562c6804861
updated for version 7.2.388
Bram Moolenaar <bram@zimbu.org>
parents:
2093
diff
changeset
|
224 |
7 | 225 ifndef RUBY_INSTALL_NAME |
2105
8562c6804861
updated for version 7.2.388
Bram Moolenaar <bram@zimbu.org>
parents:
2093
diff
changeset
|
226 ifeq ($(RUBY_VER), 16) |
8562c6804861
updated for version 7.2.388
Bram Moolenaar <bram@zimbu.org>
parents:
2093
diff
changeset
|
227 RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) |
8562c6804861
updated for version 7.2.388
Bram Moolenaar <bram@zimbu.org>
parents:
2093
diff
changeset
|
228 else |
7 | 229 RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER) |
230 endif | |
231 endif | |
232 | |
2105
8562c6804861
updated for version 7.2.388
Bram Moolenaar <bram@zimbu.org>
parents:
2093
diff
changeset
|
233 RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM) |
7 | 234 ifeq (no, $(DYNAMIC_RUBY)) |
235 RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME) | |
236 endif | |
237 | |
238 endif # RUBY | |
239 | |
240 # See feature.h for a list of options. | |
241 # Any other defines can be included here. | |
242 DEF_GUI=-DFEAT_GUI_W32 -DFEAT_CLIPBOARD | |
243 DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ | |
244 -DHAVE_PATHDEF -DFEAT_$(FEATURES) | |
245 ifeq ($(CROSS),yes) | |
2088
4ec11bb387a5
updated for version 7.2.372
Bram Moolenaar <bram@zimbu.org>
parents:
1951
diff
changeset
|
246 # cross-compiler prefix: |
4ec11bb387a5
updated for version 7.2.372
Bram Moolenaar <bram@zimbu.org>
parents:
1951
diff
changeset
|
247 CROSS_COMPILE = i586-pc-mingw32msvc- |
7 | 248 DEL = rm |
107 | 249 MKDIR = mkdir -p |
2088
4ec11bb387a5
updated for version 7.2.372
Bram Moolenaar <bram@zimbu.org>
parents:
1951
diff
changeset
|
250 DIRSLASH = / |
7 | 251 else |
252 # normal (Windows) compilation: | |
2093
0e4631bf9441
updated for version 7.2.377
Bram Moolenaar <bram@zimbu.org>
parents:
2088
diff
changeset
|
253 CROSS_COMPILE = |
7 | 254 ifneq (sh.exe, $(SHELL)) |
255 DEL = rm | |
107 | 256 MKDIR = mkdir -p |
7 | 257 DIRSLASH = / |
258 else | |
259 DEL = del | |
107 | 260 MKDIR = mkdir |
7 | 261 DIRSLASH = \\ |
262 endif | |
263 endif | |
2088
4ec11bb387a5
updated for version 7.2.372
Bram Moolenaar <bram@zimbu.org>
parents:
1951
diff
changeset
|
264 CC := $(CROSS_COMPILE)gcc |
4ec11bb387a5
updated for version 7.2.372
Bram Moolenaar <bram@zimbu.org>
parents:
1951
diff
changeset
|
265 WINDRES := $(CROSS_COMPILE)windres |
7 | 266 |
267 #>>>>> end of choices | |
268 ########################################################################### | |
269 | |
39 | 270 CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall |
7 | 271 |
272 ifdef GETTEXT | |
177 | 273 DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H |
7 | 274 GETTEXTINCLUDE = $(GETTEXT)/include |
275 GETTEXTLIB = $(INTLPATH) | |
276 ifeq (yes, $(GETTEXT)) | |
177 | 277 DEFINES += -DDYNAMIC_GETTEXT |
7 | 278 else |
279 ifdef DYNAMIC_GETTEXT | |
177 | 280 DEFINES += -D$(DYNAMIC_GETTEXT) |
7 | 281 ifdef GETTEXT_DYNAMIC |
282 DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\" | |
283 endif | |
284 endif | |
285 endif | |
286 endif | |
287 | |
288 ifdef PERL | |
289 CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -L$(PERLLIBS) | |
290 ifeq (yes, $(DYNAMIC_PERL)) | |
291 CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" | |
292 endif | |
293 endif | |
294 | |
14 | 295 ifdef MZSCHEME |
296 CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\" | |
128 | 297 ifeq (yes, $(DYNAMIC_MZSCHEME)) |
298 CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\" | |
299 endif | |
14 | 300 endif |
301 | |
7 | 302 ifdef RUBY |
303 CFLAGS += -DFEAT_RUBY $(RUBYINC) | |
304 ifeq (yes, $(DYNAMIC_RUBY)) | |
305 CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" | |
306 CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER) | |
307 endif | |
308 endif | |
309 | |
310 ifdef PYTHON | |
311 CFLAGS += -DFEAT_PYTHON $(PYTHONINC) | |
312 ifeq (yes, $(DYNAMIC_PYTHON)) | |
313 CFLAGS += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" | |
314 endif | |
315 endif | |
316 | |
317 ifdef TCL | |
318 CFLAGS += -DFEAT_TCL $(TCLINC) | |
319 ifeq (yes, $(DYNAMIC_TCL)) | |
320 CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\" | |
321 endif | |
322 endif | |
323 | |
324 ifeq ($(POSTSCRIPT),yes) | |
325 DEFINES += -DMSWINPS | |
326 endif | |
327 | |
328 ifeq (yes, $(OLE)) | |
329 DEFINES += -DFEAT_OLE | |
330 endif | |
331 | |
332 ifeq ($(CSCOPE),yes) | |
333 DEFINES += -DFEAT_CSCOPE | |
334 endif | |
335 | |
336 ifeq ($(NETBEANS),yes) | |
12 | 337 # Only allow NETBEANS for a GUI build. |
338 ifeq (yes, $(GUI)) | |
7 | 339 DEFINES += -DFEAT_NETBEANS_INTG |
12 | 340 |
341 ifeq ($(NBDEBUG), yes) | |
7 | 342 DEFINES += -DNBDEBUG |
343 NBDEBUG_INCL = nbdebug.h | |
344 NBDEBUG_SRC = nbdebug.c | |
345 endif | |
346 endif | |
12 | 347 endif |
7 | 348 |
349 ifdef XPM | |
12 | 350 # Only allow XPM for a GUI build. |
351 ifeq (yes, $(GUI)) | |
7 | 352 CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include |
353 endif | |
12 | 354 endif |
7 | 355 |
356 ifeq ($(DEBUG),yes) | |
357 CFLAGS += -g -fstack-check | |
358 DEBUG_SUFFIX=d | |
359 else | |
360 ifeq ($(OPTIMIZE), SIZE) | |
361 CFLAGS += -Os | |
362 else | |
363 ifeq ($(OPTIMIZE), MAXSPEED) | |
364 CFLAGS += -O3 | |
39 | 365 CFLAGS += -fomit-frame-pointer -freg-struct-return |
7 | 366 else # SPEED |
367 CFLAGS += -O2 | |
368 endif | |
369 endif | |
370 CFLAGS += -s | |
371 endif | |
372 | |
434 | 373 LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion |
188 | 374 GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o |
7 | 375 OBJ = \ |
376 $(OUTDIR)/buffer.o \ | |
377 $(OUTDIR)/charset.o \ | |
378 $(OUTDIR)/diff.o \ | |
379 $(OUTDIR)/digraph.o \ | |
380 $(OUTDIR)/edit.o \ | |
381 $(OUTDIR)/eval.o \ | |
382 $(OUTDIR)/ex_cmds.o \ | |
383 $(OUTDIR)/ex_cmds2.o \ | |
384 $(OUTDIR)/ex_docmd.o \ | |
385 $(OUTDIR)/ex_eval.o \ | |
386 $(OUTDIR)/ex_getln.o \ | |
387 $(OUTDIR)/fileio.o \ | |
388 $(OUTDIR)/fold.o \ | |
389 $(OUTDIR)/getchar.o \ | |
440 | 390 $(OUTDIR)/hardcopy.o \ |
799 | 391 $(OUTDIR)/hashtab.o \ |
7 | 392 $(OUTDIR)/main.o \ |
393 $(OUTDIR)/mark.o \ | |
394 $(OUTDIR)/memfile.o \ | |
395 $(OUTDIR)/memline.o \ | |
396 $(OUTDIR)/menu.o \ | |
397 $(OUTDIR)/message.o \ | |
398 $(OUTDIR)/misc1.o \ | |
399 $(OUTDIR)/misc2.o \ | |
400 $(OUTDIR)/move.o \ | |
401 $(OUTDIR)/mbyte.o \ | |
402 $(OUTDIR)/normal.o \ | |
403 $(OUTDIR)/ops.o \ | |
404 $(OUTDIR)/option.o \ | |
405 $(OUTDIR)/os_win32.o \ | |
406 $(OUTDIR)/os_mswin.o \ | |
407 $(OUTDIR)/pathdef.o \ | |
799 | 408 $(OUTDIR)/popupmnu.o \ |
7 | 409 $(OUTDIR)/quickfix.o \ |
410 $(OUTDIR)/regexp.o \ | |
411 $(OUTDIR)/screen.o \ | |
412 $(OUTDIR)/search.o \ | |
227 | 413 $(OUTDIR)/spell.o \ |
7 | 414 $(OUTDIR)/syntax.o \ |
415 $(OUTDIR)/tag.o \ | |
416 $(OUTDIR)/term.o \ | |
417 $(OUTDIR)/ui.o \ | |
418 $(OUTDIR)/undo.o \ | |
419 $(OUTDIR)/version.o \ | |
420 $(OUTDIR)/vimrc.o \ | |
421 $(OUTDIR)/window.o | |
422 | |
423 ifdef PERL | |
424 OBJ += $(OUTDIR)/if_perl.o | |
425 endif | |
14 | 426 ifdef MZSCHEME |
427 OBJ += $(OUTDIR)/if_mzsch.o | |
428 MZSCHEME_INCL = if_mzsch.h | |
1894 | 429 ifeq (yes,$(MZSCHEME_GENERATE_BASE)) |
430 CFLAGS += -DINCLUDE_MZSCHEME_BASE | |
431 MZ_EXTRA_DEP += mzscheme_base.c | |
432 endif | |
433 ifeq (yes,$(MZSCHEME_PRECISE_GC)) | |
434 CFLAGS += -DMZ_PRECISE_GC | |
435 endif | |
14 | 436 endif |
7 | 437 ifdef PYTHON |
438 OBJ += $(OUTDIR)/if_python.o | |
439 endif | |
440 ifdef RUBY | |
441 OBJ += $(OUTDIR)/if_ruby.o | |
442 endif | |
443 ifdef TCL | |
444 OBJ += $(OUTDIR)/if_tcl.o | |
445 endif | |
446 ifeq ($(CSCOPE),yes) | |
447 OBJ += $(OUTDIR)/if_cscope.o | |
448 endif | |
449 ifeq ($(NETBEANS),yes) | |
12 | 450 # Only allow NETBEANS for a GUI build. |
451 ifeq (yes, $(GUI)) | |
188 | 452 OBJ += $(OUTDIR)/netbeans.o |
7 | 453 LIB += -lwsock32 |
454 endif | |
12 | 455 endif |
7 | 456 ifdef XPM |
12 | 457 # Only allow XPM for a GUI build. |
458 ifeq (yes, $(GUI)) | |
7 | 459 OBJ += $(OUTDIR)/xpm_w32.o |
460 # You'll need libXpm.a from http://gnuwin32.sf.net | |
461 LIB += -L $(XPM)/lib -lXpm | |
462 endif | |
12 | 463 endif |
7 | 464 |
465 | |
14 | 466 ifdef MZSCHEME |
467 MZSCHEME_SUFFIX = Z | |
468 endif | |
469 | |
7 | 470 ifeq ($(GUI),yes) |
471 TARGET := gvim$(DEBUG_SUFFIX).exe | |
472 DEFINES += $(DEF_GUI) | |
473 OBJ += $(GUIOBJ) | |
474 LFLAGS += -mwindows | |
14 | 475 OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX) |
7 | 476 else |
477 TARGET := vim$(DEBUG_SUFFIX).exe | |
14 | 478 OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX) |
7 | 479 endif |
480 | |
481 ifdef GETTEXT | |
482 ifneq (yes, $(GETTEXT)) | |
483 CFLAGS += -I$(GETTEXTINCLUDE) | |
484 ifndef STATIC_GETTEXT | |
485 LIB += -L$(GETTEXTLIB) -l$(INTLLIB) | |
486 ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT)) | |
487 OBJ+=$(SAFE_GETTEXT_DLL_OBJ) | |
488 endif | |
489 else | |
490 LIB += -L$(GETTEXTLIB) -lintl | |
491 endif | |
492 endif | |
493 endif | |
494 | |
495 ifdef PERL | |
496 ifeq (no, $(DYNAMIC_PERL)) | |
497 LIB += -lperl$(PERL_VER) | |
498 endif | |
499 endif | |
500 | |
501 ifdef TCL | |
502 LIB += -L$(TCL)/lib | |
503 ifeq (yes, $(DYNAMIC_TCL)) | |
504 LIB += -ltclstub$(TCL_VER) | |
505 else | |
506 LIB += -ltcl$(TCL_VER) | |
507 endif | |
508 endif | |
509 | |
510 ifeq (yes, $(OLE)) | |
511 LIB += -loleaut32 -lstdc++ | |
512 OBJ += $(OUTDIR)/if_ole.o | |
513 endif | |
514 | |
515 ifeq (yes, $(MBYTE)) | |
516 DEFINES += -DFEAT_MBYTE | |
517 endif | |
518 | |
519 ifeq (yes, $(IME)) | |
520 DEFINES += -DFEAT_MBYTE_IME | |
521 ifeq (yes, $(DYNAMIC_IME)) | |
522 DEFINES += -DDYNAMIC_IME | |
523 else | |
524 LIB += -limm32 | |
525 endif | |
526 endif | |
527 | |
528 ifdef ICONV | |
529 ifneq (yes, $(ICONV)) | |
530 LIB += -L$(ICONV) | |
531 CFLAGS += -I$(ICONV) | |
532 endif | |
533 DEFINES+=-DDYNAMIC_ICONV | |
534 endif | |
535 | |
536 all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll | |
537 | |
538 vimrun.exe: vimrun.c | |
539 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB) | |
540 | |
541 install.exe: dosinst.c | |
542 $(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid | |
543 | |
544 uninstal.exe: uninstal.c | |
545 $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB) | |
546 | |
547 $(TARGET): $(OUTDIR) $(OBJ) | |
24 | 548 $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB) |
7 | 549 |
550 upx: exes | |
551 upx gvim.exe | |
552 upx vim.exe | |
553 | |
554 xxd/xxd.exe: xxd/xxd.c | |
2088
4ec11bb387a5
updated for version 7.2.372
Bram Moolenaar <bram@zimbu.org>
parents:
1951
diff
changeset
|
555 $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) |
7 | 556 |
557 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
|
558 $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) |
7 | 559 |
560 clean: | |
561 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o | |
562 -$(DEL) $(OUTDIR)$(DIRSLASH)*.res | |
563 -rmdir $(OUTDIR) | |
564 -$(DEL) *.exe | |
565 -$(DEL) pathdef.c | |
566 ifdef PERL | |
567 -$(DEL) if_perl.c | |
568 endif | |
1951 | 569 ifdef MZSCHEME |
570 -$(DEL) mzscheme_base.c | |
571 endif | |
7 | 572 $(MAKE) -C GvimExt -f Make_ming.mak clean |
573 $(MAKE) -C xxd -f Make_cyg.mak clean | |
574 | |
575 ########################################################################### | |
576 INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \ | |
577 structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \ | |
578 gui.h | |
579 | |
580 $(OUTDIR)/%.o : %.c $(INCL) | |
581 $(CC) -c $(CFLAGS) $< -o $@ | |
582 | |
583 $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h | |
584 $(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res | |
585 | |
586 $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res | |
587 $(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o | |
588 | |
589 $(OUTDIR): | |
107 | 590 $(MKDIR) $(OUTDIR) |
7 | 591 |
592 $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h | |
593 $(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o | |
594 | |
595 $(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h | |
596 $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o | |
597 | |
598 $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h | |
599 $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o | |
600 | |
1351 | 601 # Remove -D__IID_DEFINED__ for newer versions of the w32api |
7 | 602 $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) |
1351 | 603 $(CC) $(CFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp |
7 | 604 |
605 $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL) | |
606 ifeq (16, $(RUBY)) | |
607 $(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c | |
608 endif | |
609 | |
610 if_perl.c: if_perl.xs typemap | |
611 perl $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \ | |
612 $(PERLLIB)/ExtUtils/typemap if_perl.xs > $@ | |
613 | |
614 $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC) | |
615 $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o | |
616 | |
1894 | 617 $(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP) |
618 $(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o | |
619 | |
620 mzscheme_base.c: | |
621 $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base | |
622 | |
7 | 623 pathdef.c: $(INCL) |
624 ifneq (sh.exe, $(SHELL)) | |
625 @echo creating pathdef.c | |
626 @echo '/* pathdef.c */' > pathdef.c | |
627 @echo '#include "vim.h"' >> pathdef.c | |
628 @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c | |
629 @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c | |
630 @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c | |
89 | 631 @echo 'char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)";' >> pathdef.c |
7 | 632 @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c |
633 @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c | |
634 else | |
635 @echo creating pathdef.c | |
636 @echo /* pathdef.c */ > pathdef.c | |
637 @echo #include "vim.h" >> pathdef.c | |
638 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c | |
639 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c | |
640 @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c | |
89 | 641 @echo char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)"; >> pathdef.c |
7 | 642 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c |
643 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c | |
644 endif |