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
|
|
27 # set to SIZE for size, SPEED for speed, MAXSPEED for maximium optimization
|
|
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
|
|
118 ifeq (no,$(DYNAMIC_MZSCHEME))
|
|
119 MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
|
|
120 # the modern MinGW can dynamically link to dlls directly.
|
|
121 # point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
|
|
122 ifndef MZSCHEME_DLLS
|
|
123 MZSCHEME_DLLS=$(MZSCHEME)
|
14
|
124 endif
|
128
|
125 MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS)
|
|
126 endif
|
|
127
|
14
|
128 endif
|
|
129
|
7
|
130 # Python support -- works with the ActiveState python 2.0 release (and others
|
|
131 # too, probably)
|
|
132 #
|
|
133 # uncomment 'PYTHON' to make python-enabled version
|
|
134 # Put the path to the python distro here. If cross compiling from Linux, you
|
|
135 # will also need to convert the header files to unix instead of dos format:
|
|
136 # for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
|
|
137 # and also, you will need to make a mingw32 'libpython20.a' to link with:
|
|
138 # cd $PYTHON/libs
|
|
139 # pexports python20.dll > python20.def
|
|
140 # dlltool -d python20.def -l libpython20.a
|
|
141 # on my Linux box, I put the Python stuff here:
|
|
142 #PYTHON=/home/ron/ActivePython-2.0.0-202/src/Core
|
|
143 # on my NT box, it's here:
|
|
144 #PYTHON=c:/python20
|
|
145
|
|
146 ifdef PYTHON
|
|
147 ifndef DYNAMIC_PYTHON
|
|
148 DYNAMIC_PYTHON=yes
|
|
149 endif
|
|
150
|
|
151 ifndef PYTHON_VER
|
|
152 PYTHON_VER=22
|
|
153 endif
|
|
154
|
|
155 ifeq (no,$(DYNAMIC_PYTHON))
|
|
156 PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
|
|
157 endif
|
|
158 # my include files are in 'win32inc' on Linux, and 'include' in the standard
|
|
159 # NT distro (ActiveState)
|
|
160 ifeq ($(CROSS),no)
|
|
161 PYTHONINC=-I $(PYTHON)/include
|
|
162 else
|
|
163 PYTHONINC=-I $(PYTHON)/win32inc
|
|
164 endif
|
|
165 endif
|
|
166
|
|
167 # TCL interface:
|
|
168 # TCL=[Path to TCL directory]
|
|
169 # DYNAMIC_TCL=yes (to load the TCL DLL dynamically)
|
|
170 # TCL_VER=[TCL version, eg 83, 84] (default is 83)
|
|
171 #TCL=c:/tcl
|
|
172 ifdef TCL
|
|
173 ifndef DYNAMIC_TCL
|
|
174 DYNAMIC_TCL=yes
|
|
175 endif
|
|
176 ifndef TCL_VER
|
|
177 TCL_VER = 83
|
|
178 endif
|
|
179 TCLINC += -I$(TCL)/include
|
|
180 endif
|
|
181
|
|
182
|
|
183 # Ruby interface:
|
|
184 # RUBY=[Path to Ruby directory]
|
|
185 # DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
|
|
186 # RUBY_VER=[Ruby version, eg 16, 17] (default is 16)
|
|
187 # RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.6)
|
|
188 # You must set RUBY_VER_LONG when change RUBY_VER.
|
|
189 #RUBY=c:/ruby
|
|
190 ifdef RUBY
|
|
191 ifndef DYNAMIC_RUBY
|
|
192 DYNAMIC_RUBY=yes
|
|
193 endif
|
|
194 # Set default value
|
|
195 ifndef RUBY_VER
|
|
196 RUBY_VER = 16
|
|
197 endif
|
|
198 ifndef RUBY_VER_LONG
|
|
199 RUBY_VER_LONG = 1.6
|
|
200 endif
|
|
201
|
|
202 ifeq ($(RUBY_VER), 16)
|
|
203 ifndef RUBY_PLATFORM
|
|
204 RUBY_PLATFORM = i586-mswin32
|
|
205 endif
|
|
206 ifndef RUBY_INSTALL_NAME
|
|
207 RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
|
|
208 endif
|
|
209 else
|
|
210 ifndef RUBY_PLATFORM
|
|
211 RUBY_PLATFORM = i386-mswin32
|
|
212 endif
|
|
213 ifndef RUBY_INSTALL_NAME
|
|
214 RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
|
|
215 endif
|
|
216 endif
|
|
217
|
|
218 RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
|
|
219 ifeq (no, $(DYNAMIC_RUBY))
|
|
220 RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
|
|
221 endif
|
|
222
|
|
223 endif # RUBY
|
|
224
|
|
225 # See feature.h for a list of options.
|
|
226 # Any other defines can be included here.
|
|
227 DEF_GUI=-DFEAT_GUI_W32 -DFEAT_CLIPBOARD
|
|
228 DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
|
|
229 -DHAVE_PATHDEF -DFEAT_$(FEATURES)
|
|
230 ifeq ($(CROSS),yes)
|
|
231 # cross-compiler:
|
|
232 CC = i586-pc-mingw32msvc-gcc
|
|
233 DEL = rm
|
107
|
234 MKDIR = mkdir -p
|
7
|
235 WINDRES = i586-pc-mingw32msvc-windres
|
|
236 else
|
|
237 # normal (Windows) compilation:
|
|
238 CC = gcc
|
|
239 ifneq (sh.exe, $(SHELL))
|
|
240 DEL = rm
|
107
|
241 MKDIR = mkdir -p
|
7
|
242 DIRSLASH = /
|
|
243 else
|
|
244 DEL = del
|
107
|
245 MKDIR = mkdir
|
7
|
246 DIRSLASH = \\
|
|
247 endif
|
|
248 WINDRES = windres
|
|
249 endif
|
|
250
|
|
251 #>>>>> end of choices
|
|
252 ###########################################################################
|
|
253
|
39
|
254 CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
|
7
|
255
|
|
256 ifdef GETTEXT
|
177
|
257 DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
|
7
|
258 GETTEXTINCLUDE = $(GETTEXT)/include
|
|
259 GETTEXTLIB = $(INTLPATH)
|
|
260 ifeq (yes, $(GETTEXT))
|
177
|
261 DEFINES += -DDYNAMIC_GETTEXT
|
7
|
262 else
|
|
263 ifdef DYNAMIC_GETTEXT
|
177
|
264 DEFINES += -D$(DYNAMIC_GETTEXT)
|
7
|
265 ifdef GETTEXT_DYNAMIC
|
|
266 DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\"
|
|
267 endif
|
|
268 endif
|
|
269 endif
|
|
270 endif
|
|
271
|
|
272 ifdef PERL
|
|
273 CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -L$(PERLLIBS)
|
|
274 ifeq (yes, $(DYNAMIC_PERL))
|
|
275 CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
|
|
276 endif
|
|
277 endif
|
|
278
|
14
|
279 ifdef MZSCHEME
|
|
280 CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
|
128
|
281 ifeq (yes, $(DYNAMIC_MZSCHEME))
|
|
282 CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
|
|
283 endif
|
14
|
284 endif
|
|
285
|
7
|
286 ifdef RUBY
|
|
287 CFLAGS += -DFEAT_RUBY $(RUBYINC)
|
|
288 ifeq (yes, $(DYNAMIC_RUBY))
|
|
289 CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
|
|
290 CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
|
|
291 endif
|
|
292 endif
|
|
293
|
|
294 ifdef PYTHON
|
|
295 CFLAGS += -DFEAT_PYTHON $(PYTHONINC)
|
|
296 ifeq (yes, $(DYNAMIC_PYTHON))
|
|
297 CFLAGS += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
|
|
298 endif
|
|
299 endif
|
|
300
|
|
301 ifdef TCL
|
|
302 CFLAGS += -DFEAT_TCL $(TCLINC)
|
|
303 ifeq (yes, $(DYNAMIC_TCL))
|
|
304 CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
|
|
305 endif
|
|
306 endif
|
|
307
|
|
308 ifeq ($(POSTSCRIPT),yes)
|
|
309 DEFINES += -DMSWINPS
|
|
310 endif
|
|
311
|
|
312 ifeq (yes, $(OLE))
|
|
313 DEFINES += -DFEAT_OLE
|
|
314 endif
|
|
315
|
|
316 ifeq ($(CSCOPE),yes)
|
|
317 DEFINES += -DFEAT_CSCOPE
|
|
318 endif
|
|
319
|
|
320 ifeq ($(NETBEANS),yes)
|
12
|
321 # Only allow NETBEANS for a GUI build.
|
|
322 ifeq (yes, $(GUI))
|
7
|
323 DEFINES += -DFEAT_NETBEANS_INTG
|
12
|
324
|
|
325 ifeq ($(NBDEBUG), yes)
|
7
|
326 DEFINES += -DNBDEBUG
|
|
327 NBDEBUG_INCL = nbdebug.h
|
|
328 NBDEBUG_SRC = nbdebug.c
|
|
329 endif
|
|
330 endif
|
12
|
331 endif
|
7
|
332
|
|
333 ifdef XPM
|
12
|
334 # Only allow XPM for a GUI build.
|
|
335 ifeq (yes, $(GUI))
|
7
|
336 CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include
|
|
337 endif
|
12
|
338 endif
|
7
|
339
|
|
340 ifeq ($(DEBUG),yes)
|
|
341 CFLAGS += -g -fstack-check
|
|
342 DEBUG_SUFFIX=d
|
|
343 else
|
|
344 ifeq ($(OPTIMIZE), SIZE)
|
|
345 CFLAGS += -Os
|
|
346 else
|
|
347 ifeq ($(OPTIMIZE), MAXSPEED)
|
|
348 CFLAGS += -O3
|
39
|
349 CFLAGS += -fomit-frame-pointer -freg-struct-return
|
7
|
350 else # SPEED
|
|
351 CFLAGS += -O2
|
|
352 endif
|
|
353 endif
|
|
354 CFLAGS += -s
|
|
355 endif
|
|
356
|
434
|
357 LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion
|
188
|
358 GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o
|
7
|
359 OBJ = \
|
|
360 $(OUTDIR)/buffer.o \
|
|
361 $(OUTDIR)/charset.o \
|
|
362 $(OUTDIR)/diff.o \
|
|
363 $(OUTDIR)/digraph.o \
|
|
364 $(OUTDIR)/edit.o \
|
|
365 $(OUTDIR)/eval.o \
|
|
366 $(OUTDIR)/ex_cmds.o \
|
|
367 $(OUTDIR)/ex_cmds2.o \
|
|
368 $(OUTDIR)/ex_docmd.o \
|
|
369 $(OUTDIR)/ex_eval.o \
|
|
370 $(OUTDIR)/ex_getln.o \
|
|
371 $(OUTDIR)/fileio.o \
|
|
372 $(OUTDIR)/fold.o \
|
|
373 $(OUTDIR)/getchar.o \
|
440
|
374 $(OUTDIR)/hardcopy.o \
|
119
|
375 $(OUTDIR)/hashtable.o \
|
7
|
376 $(OUTDIR)/main.o \
|
|
377 $(OUTDIR)/mark.o \
|
|
378 $(OUTDIR)/memfile.o \
|
|
379 $(OUTDIR)/memline.o \
|
|
380 $(OUTDIR)/menu.o \
|
|
381 $(OUTDIR)/message.o \
|
|
382 $(OUTDIR)/misc1.o \
|
|
383 $(OUTDIR)/misc2.o \
|
|
384 $(OUTDIR)/move.o \
|
|
385 $(OUTDIR)/mbyte.o \
|
|
386 $(OUTDIR)/normal.o \
|
|
387 $(OUTDIR)/ops.o \
|
|
388 $(OUTDIR)/option.o \
|
|
389 $(OUTDIR)/os_win32.o \
|
|
390 $(OUTDIR)/os_mswin.o \
|
|
391 $(OUTDIR)/pathdef.o \
|
|
392 $(OUTDIR)/quickfix.o \
|
|
393 $(OUTDIR)/regexp.o \
|
|
394 $(OUTDIR)/screen.o \
|
|
395 $(OUTDIR)/search.o \
|
227
|
396 $(OUTDIR)/spell.o \
|
7
|
397 $(OUTDIR)/syntax.o \
|
|
398 $(OUTDIR)/tag.o \
|
|
399 $(OUTDIR)/term.o \
|
|
400 $(OUTDIR)/ui.o \
|
|
401 $(OUTDIR)/undo.o \
|
|
402 $(OUTDIR)/version.o \
|
|
403 $(OUTDIR)/vimrc.o \
|
|
404 $(OUTDIR)/window.o
|
|
405
|
|
406 ifdef PERL
|
|
407 OBJ += $(OUTDIR)/if_perl.o
|
|
408 endif
|
14
|
409 ifdef MZSCHEME
|
|
410 OBJ += $(OUTDIR)/if_mzsch.o
|
|
411 MZSCHEME_INCL = if_mzsch.h
|
|
412 endif
|
7
|
413 ifdef PYTHON
|
|
414 OBJ += $(OUTDIR)/if_python.o
|
|
415 endif
|
|
416 ifdef RUBY
|
|
417 OBJ += $(OUTDIR)/if_ruby.o
|
|
418 endif
|
|
419 ifdef TCL
|
|
420 OBJ += $(OUTDIR)/if_tcl.o
|
|
421 endif
|
|
422 ifeq ($(CSCOPE),yes)
|
|
423 OBJ += $(OUTDIR)/if_cscope.o
|
|
424 endif
|
|
425 ifeq ($(NETBEANS),yes)
|
12
|
426 # Only allow NETBEANS for a GUI build.
|
|
427 ifeq (yes, $(GUI))
|
188
|
428 OBJ += $(OUTDIR)/netbeans.o
|
7
|
429 LIB += -lwsock32
|
|
430 endif
|
12
|
431 endif
|
7
|
432 ifdef XPM
|
12
|
433 # Only allow XPM for a GUI build.
|
|
434 ifeq (yes, $(GUI))
|
7
|
435 OBJ += $(OUTDIR)/xpm_w32.o
|
|
436 # You'll need libXpm.a from http://gnuwin32.sf.net
|
|
437 LIB += -L $(XPM)/lib -lXpm
|
|
438 endif
|
12
|
439 endif
|
7
|
440
|
|
441
|
14
|
442 ifdef MZSCHEME
|
|
443 MZSCHEME_SUFFIX = Z
|
|
444 endif
|
|
445
|
7
|
446 ifeq ($(GUI),yes)
|
|
447 TARGET := gvim$(DEBUG_SUFFIX).exe
|
|
448 DEFINES += $(DEF_GUI)
|
|
449 OBJ += $(GUIOBJ)
|
|
450 LFLAGS += -mwindows
|
14
|
451 OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
|
7
|
452 else
|
|
453 TARGET := vim$(DEBUG_SUFFIX).exe
|
14
|
454 OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
|
7
|
455 endif
|
|
456
|
|
457 ifdef GETTEXT
|
|
458 ifneq (yes, $(GETTEXT))
|
|
459 CFLAGS += -I$(GETTEXTINCLUDE)
|
|
460 ifndef STATIC_GETTEXT
|
|
461 LIB += -L$(GETTEXTLIB) -l$(INTLLIB)
|
|
462 ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT))
|
|
463 OBJ+=$(SAFE_GETTEXT_DLL_OBJ)
|
|
464 endif
|
|
465 else
|
|
466 LIB += -L$(GETTEXTLIB) -lintl
|
|
467 endif
|
|
468 endif
|
|
469 endif
|
|
470
|
|
471 ifdef PERL
|
|
472 ifeq (no, $(DYNAMIC_PERL))
|
|
473 LIB += -lperl$(PERL_VER)
|
|
474 endif
|
|
475 endif
|
|
476
|
|
477 ifdef TCL
|
|
478 LIB += -L$(TCL)/lib
|
|
479 ifeq (yes, $(DYNAMIC_TCL))
|
|
480 LIB += -ltclstub$(TCL_VER)
|
|
481 else
|
|
482 LIB += -ltcl$(TCL_VER)
|
|
483 endif
|
|
484 endif
|
|
485
|
|
486 ifeq (yes, $(OLE))
|
|
487 LIB += -loleaut32 -lstdc++
|
|
488 OBJ += $(OUTDIR)/if_ole.o
|
|
489 endif
|
|
490
|
|
491 ifeq (yes, $(MBYTE))
|
|
492 DEFINES += -DFEAT_MBYTE
|
|
493 endif
|
|
494
|
|
495 ifeq (yes, $(IME))
|
|
496 DEFINES += -DFEAT_MBYTE_IME
|
|
497 ifeq (yes, $(DYNAMIC_IME))
|
|
498 DEFINES += -DDYNAMIC_IME
|
|
499 else
|
|
500 LIB += -limm32
|
|
501 endif
|
|
502 endif
|
|
503
|
|
504 ifdef ICONV
|
|
505 ifneq (yes, $(ICONV))
|
|
506 LIB += -L$(ICONV)
|
|
507 CFLAGS += -I$(ICONV)
|
|
508 endif
|
|
509 DEFINES+=-DDYNAMIC_ICONV
|
|
510 endif
|
|
511
|
|
512 all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
|
|
513
|
|
514 vimrun.exe: vimrun.c
|
|
515 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB)
|
|
516
|
|
517 install.exe: dosinst.c
|
|
518 $(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid
|
|
519
|
|
520 uninstal.exe: uninstal.c
|
|
521 $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
|
|
522
|
|
523 $(TARGET): $(OUTDIR) $(OBJ)
|
24
|
524 $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)
|
7
|
525
|
|
526 upx: exes
|
|
527 upx gvim.exe
|
|
528 upx vim.exe
|
|
529
|
|
530 xxd/xxd.exe: xxd/xxd.c
|
|
531 $(MAKE) -C xxd -f Make_cyg.mak
|
|
532
|
|
533 GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
|
|
534 $(MAKE) -C GvimExt -f Make_ming.mak
|
|
535
|
|
536 clean:
|
|
537 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
|
|
538 -$(DEL) $(OUTDIR)$(DIRSLASH)*.res
|
|
539 -rmdir $(OUTDIR)
|
|
540 -$(DEL) *.exe
|
|
541 -$(DEL) pathdef.c
|
|
542 ifdef PERL
|
|
543 -$(DEL) if_perl.c
|
|
544 endif
|
|
545 $(MAKE) -C GvimExt -f Make_ming.mak clean
|
|
546 $(MAKE) -C xxd -f Make_cyg.mak clean
|
|
547
|
|
548 ###########################################################################
|
|
549 INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
|
|
550 structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \
|
|
551 gui.h
|
|
552
|
|
553 $(OUTDIR)/%.o : %.c $(INCL)
|
|
554 $(CC) -c $(CFLAGS) $< -o $@
|
|
555
|
|
556 $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
|
|
557 $(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
|
|
558
|
|
559 $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
|
|
560 $(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
|
|
561
|
|
562 $(OUTDIR):
|
107
|
563 $(MKDIR) $(OUTDIR)
|
7
|
564
|
|
565 $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
|
|
566 $(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
|
|
567
|
|
568 $(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
|
|
569 $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
|
|
570
|
|
571 $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
|
|
572 $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
|
|
573
|
|
574 $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
|
|
575 $(CC) $(CFLAGS) -D__IID_DEFINED__ -c -o $(OUTDIR)/if_ole.o if_ole.cpp
|
|
576
|
|
577 $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
|
|
578 ifeq (16, $(RUBY))
|
|
579 $(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c
|
|
580 endif
|
|
581
|
|
582 if_perl.c: if_perl.xs typemap
|
|
583 perl $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \
|
|
584 $(PERLLIB)/ExtUtils/typemap if_perl.xs > $@
|
|
585
|
|
586 $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
|
|
587 $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
|
|
588
|
|
589 pathdef.c: $(INCL)
|
|
590 ifneq (sh.exe, $(SHELL))
|
|
591 @echo creating pathdef.c
|
|
592 @echo '/* pathdef.c */' > pathdef.c
|
|
593 @echo '#include "vim.h"' >> pathdef.c
|
|
594 @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
|
|
595 @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
|
|
596 @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
|
89
|
597 @echo 'char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)";' >> pathdef.c
|
7
|
598 @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
|
|
599 @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
|
|
600 else
|
|
601 @echo creating pathdef.c
|
|
602 @echo /* pathdef.c */ > pathdef.c
|
|
603 @echo #include "vim.h" >> pathdef.c
|
|
604 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c
|
|
605 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c
|
|
606 @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c
|
89
|
607 @echo char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)"; >> pathdef.c
|
7
|
608 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c
|
|
609 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c
|
|
610 endif
|