blob: b90cf79fb08d236fc57e8d760654ba8e12934bf0 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001# 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
26DEBUG=no
27# set to SIZE for size, SPEED for speed, MAXSPEED for maximium optimization
28OPTIMIZE=MAXSPEED
29# set to yes to make gvim, no for vim
30GUI=yes
31# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
32# set to TINY to make minimal version (few features)
33FEATURES=BIG
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000034# set to one of i386, i486, i586, i686 as the minimum target processor
Bram Moolenaar071d4272004-06-13 20:20:40 +000035ARCH=i386
36# set to yes to cross-compile from unix; no=native Windows
37CROSS=no
38# set to path to iconv.h and libiconv.a to enable using 'iconv.dll'
39#ICONV="."
40ICONV=yes
41GETTEXT=yes
42# set to yes to include multibyte support
43MBYTE=yes
44# set to yes to include IME support
45IME=yes
46DYNAMIC_IME=yes
47# set to yes to enable writing a postscript file with :hardcopy
48POSTSCRIPT=no
49# set to yes to enable OLE support
50OLE=no
51# Set the default $(WINVER) to make it work with pre-Win2k
52WINVER = 0x0400
53# Set to yes to enable Cscope support
54CSCOPE=yes
55# Set to yes to enable Netbeans support
56NETBEANS=$(GUI)
57
58
59# If the user doesn't want gettext, undefine it.
60ifeq (no, $(GETTEXT))
61GETTEXT=
62endif
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
74SAFE_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
79INTLPATH=$(GETTEXT)/lib/mingw32
80INTLLIB=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
93ifdef PERL
94ifndef PERL_VER
95PERL_VER=56
96endif
97ifndef DYNAMIC_PERL
98DYNAMIC_PERL=yes
99endif
100# on Linux, for cross-compile, it's here:
101#PERLLIB=/home/ron/ActivePerl/lib
102# on NT, it's here:
103PERLLIB=$(PERL)/lib
104PERLLIBS=$(PERLLIB)/Core
105endif
106
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000107# uncomment 'MZSCHEME' if you want a MzScheme-enabled version
108#MZSCHEME=d:/plt
109ifdef MZSCHEME
110ifndef MZSCHEME_VER
111MZSCHEME_VER=205_000
112endif
113# the modern MinGW can dynamically link to dlls directly
114# point MZSCHEME_LIBDIR to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
115# c:/windows/system32 isn't a good idea, use some other dir;
116# to build you can put them in temp dir)
117ifndef MZSCHEME_LIBDIR
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000118MZSCHEME_LIBDIR=-L$(MZSCHEME)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000119endif
120endif
121
Bram Moolenaar071d4272004-06-13 20:20:40 +0000122# Python support -- works with the ActiveState python 2.0 release (and others
123# too, probably)
124#
125# uncomment 'PYTHON' to make python-enabled version
126# Put the path to the python distro here. If cross compiling from Linux, you
127# will also need to convert the header files to unix instead of dos format:
128# for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
129# and also, you will need to make a mingw32 'libpython20.a' to link with:
130# cd $PYTHON/libs
131# pexports python20.dll > python20.def
132# dlltool -d python20.def -l libpython20.a
133# on my Linux box, I put the Python stuff here:
134#PYTHON=/home/ron/ActivePython-2.0.0-202/src/Core
135# on my NT box, it's here:
136#PYTHON=c:/python20
137
138ifdef PYTHON
139ifndef DYNAMIC_PYTHON
140DYNAMIC_PYTHON=yes
141endif
142
143ifndef PYTHON_VER
144PYTHON_VER=22
145endif
146
147ifeq (no,$(DYNAMIC_PYTHON))
148PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
149endif
150# my include files are in 'win32inc' on Linux, and 'include' in the standard
151# NT distro (ActiveState)
152ifeq ($(CROSS),no)
153PYTHONINC=-I $(PYTHON)/include
154else
155PYTHONINC=-I $(PYTHON)/win32inc
156endif
157endif
158
159# TCL interface:
160# TCL=[Path to TCL directory]
161# DYNAMIC_TCL=yes (to load the TCL DLL dynamically)
162# TCL_VER=[TCL version, eg 83, 84] (default is 83)
163#TCL=c:/tcl
164ifdef TCL
165ifndef DYNAMIC_TCL
166DYNAMIC_TCL=yes
167endif
168ifndef TCL_VER
169TCL_VER = 83
170endif
171TCLINC += -I$(TCL)/include
172endif
173
174
175# Ruby interface:
176# RUBY=[Path to Ruby directory]
177# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
178# RUBY_VER=[Ruby version, eg 16, 17] (default is 16)
179# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.6)
180# You must set RUBY_VER_LONG when change RUBY_VER.
181#RUBY=c:/ruby
182ifdef RUBY
183ifndef DYNAMIC_RUBY
184DYNAMIC_RUBY=yes
185endif
186# Set default value
187ifndef RUBY_VER
188RUBY_VER = 16
189endif
190ifndef RUBY_VER_LONG
191RUBY_VER_LONG = 1.6
192endif
193
194ifeq ($(RUBY_VER), 16)
195ifndef RUBY_PLATFORM
196RUBY_PLATFORM = i586-mswin32
197endif
198ifndef RUBY_INSTALL_NAME
199RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
200endif
201else
202ifndef RUBY_PLATFORM
203RUBY_PLATFORM = i386-mswin32
204endif
205ifndef RUBY_INSTALL_NAME
206RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
207endif
208endif
209
210RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
211ifeq (no, $(DYNAMIC_RUBY))
212RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
213endif
214
215endif # RUBY
216
217# See feature.h for a list of options.
218# Any other defines can be included here.
219DEF_GUI=-DFEAT_GUI_W32 -DFEAT_CLIPBOARD
220DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
221 -DHAVE_PATHDEF -DFEAT_$(FEATURES)
222ifeq ($(CROSS),yes)
223# cross-compiler:
224CC = i586-pc-mingw32msvc-gcc
225DEL = rm
Bram Moolenaar0cf6f542005-01-16 21:59:36 +0000226MKDIR = mkdir -p
Bram Moolenaar071d4272004-06-13 20:20:40 +0000227WINDRES = i586-pc-mingw32msvc-windres
228else
229# normal (Windows) compilation:
230CC = gcc
231ifneq (sh.exe, $(SHELL))
232DEL = rm
Bram Moolenaar0cf6f542005-01-16 21:59:36 +0000233MKDIR = mkdir -p
Bram Moolenaar071d4272004-06-13 20:20:40 +0000234DIRSLASH = /
235else
236DEL = del
Bram Moolenaar0cf6f542005-01-16 21:59:36 +0000237MKDIR = mkdir
Bram Moolenaar071d4272004-06-13 20:20:40 +0000238DIRSLASH = \\
239endif
240WINDRES = windres
241endif
242
243#>>>>> end of choices
244###########################################################################
245
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000246CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
Bram Moolenaar071d4272004-06-13 20:20:40 +0000247
248ifdef GETTEXT
249DEFINES +=-DHAVE_GETTEXT -DHAVE_LOCALE_H
250GETTEXTINCLUDE = $(GETTEXT)/include
251GETTEXTLIB = $(INTLPATH)
252ifeq (yes, $(GETTEXT))
253DEFINES +=-DDYNAMIC_GETTEXT
254else
255ifdef DYNAMIC_GETTEXT
256DEFINES +=-D$(DYNAMIC_GETTEXT)
257ifdef GETTEXT_DYNAMIC
258DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\"
259endif
260endif
261endif
262endif
263
264ifdef PERL
265CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -L$(PERLLIBS)
266ifeq (yes, $(DYNAMIC_PERL))
267CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
268endif
269endif
270
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000271ifdef MZSCHEME
272CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
273endif
274
Bram Moolenaar071d4272004-06-13 20:20:40 +0000275ifdef RUBY
276CFLAGS += -DFEAT_RUBY $(RUBYINC)
277ifeq (yes, $(DYNAMIC_RUBY))
278CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
279CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
280endif
281endif
282
283ifdef PYTHON
284CFLAGS += -DFEAT_PYTHON $(PYTHONINC)
285ifeq (yes, $(DYNAMIC_PYTHON))
286CFLAGS += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
287endif
288endif
289
290ifdef TCL
291CFLAGS += -DFEAT_TCL $(TCLINC)
292ifeq (yes, $(DYNAMIC_TCL))
293CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
294endif
295endif
296
297ifeq ($(POSTSCRIPT),yes)
298DEFINES += -DMSWINPS
299endif
300
301ifeq (yes, $(OLE))
302DEFINES += -DFEAT_OLE
303endif
304
305ifeq ($(CSCOPE),yes)
306DEFINES += -DFEAT_CSCOPE
307endif
308
309ifeq ($(NETBEANS),yes)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000310# Only allow NETBEANS for a GUI build.
311ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000312DEFINES += -DFEAT_NETBEANS_INTG
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000313
314ifeq ($(NBDEBUG), yes)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000315DEFINES += -DNBDEBUG
316NBDEBUG_INCL = nbdebug.h
317NBDEBUG_SRC = nbdebug.c
318endif
319endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000320endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000321
322ifdef XPM
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000323# Only allow XPM for a GUI build.
324ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000325CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include
326endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000327endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000328
329ifeq ($(DEBUG),yes)
330CFLAGS += -g -fstack-check
331DEBUG_SUFFIX=d
332else
333ifeq ($(OPTIMIZE), SIZE)
334CFLAGS += -Os
335else
336ifeq ($(OPTIMIZE), MAXSPEED)
337CFLAGS += -O3
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000338CFLAGS += -fomit-frame-pointer -freg-struct-return
Bram Moolenaar071d4272004-06-13 20:20:40 +0000339else # SPEED
340CFLAGS += -O2
341endif
342endif
343CFLAGS += -s
344endif
345
346LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32
347GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/os_w32exe.o
348OBJ = \
349 $(OUTDIR)/buffer.o \
350 $(OUTDIR)/charset.o \
351 $(OUTDIR)/diff.o \
352 $(OUTDIR)/digraph.o \
353 $(OUTDIR)/edit.o \
354 $(OUTDIR)/eval.o \
355 $(OUTDIR)/ex_cmds.o \
356 $(OUTDIR)/ex_cmds2.o \
357 $(OUTDIR)/ex_docmd.o \
358 $(OUTDIR)/ex_eval.o \
359 $(OUTDIR)/ex_getln.o \
360 $(OUTDIR)/fileio.o \
361 $(OUTDIR)/fold.o \
362 $(OUTDIR)/getchar.o \
363 $(OUTDIR)/main.o \
364 $(OUTDIR)/mark.o \
365 $(OUTDIR)/memfile.o \
366 $(OUTDIR)/memline.o \
367 $(OUTDIR)/menu.o \
368 $(OUTDIR)/message.o \
369 $(OUTDIR)/misc1.o \
370 $(OUTDIR)/misc2.o \
371 $(OUTDIR)/move.o \
372 $(OUTDIR)/mbyte.o \
373 $(OUTDIR)/normal.o \
374 $(OUTDIR)/ops.o \
375 $(OUTDIR)/option.o \
376 $(OUTDIR)/os_win32.o \
377 $(OUTDIR)/os_mswin.o \
378 $(OUTDIR)/pathdef.o \
379 $(OUTDIR)/quickfix.o \
380 $(OUTDIR)/regexp.o \
381 $(OUTDIR)/screen.o \
382 $(OUTDIR)/search.o \
383 $(OUTDIR)/syntax.o \
384 $(OUTDIR)/tag.o \
385 $(OUTDIR)/term.o \
386 $(OUTDIR)/ui.o \
387 $(OUTDIR)/undo.o \
388 $(OUTDIR)/version.o \
389 $(OUTDIR)/vimrc.o \
390 $(OUTDIR)/window.o
391
392ifdef PERL
393OBJ += $(OUTDIR)/if_perl.o
394endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000395ifdef MZSCHEME
396OBJ += $(OUTDIR)/if_mzsch.o
397MZSCHEME_INCL = if_mzsch.h
398endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000399ifdef PYTHON
400OBJ += $(OUTDIR)/if_python.o
401endif
402ifdef RUBY
403OBJ += $(OUTDIR)/if_ruby.o
404endif
405ifdef TCL
406OBJ += $(OUTDIR)/if_tcl.o
407endif
408ifeq ($(CSCOPE),yes)
409OBJ += $(OUTDIR)/if_cscope.o
410endif
411ifeq ($(NETBEANS),yes)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000412# Only allow NETBEANS for a GUI build.
413ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000414OBJ += $(OUTDIR)/netbeans.o $(OUTDIR)/gui_beval.o
415LIB += -lwsock32
416endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000417endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000418ifdef XPM
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000419# Only allow XPM for a GUI build.
420ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000421OBJ += $(OUTDIR)/xpm_w32.o
422# You'll need libXpm.a from http://gnuwin32.sf.net
423LIB += -L $(XPM)/lib -lXpm
424endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000425endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000426
427
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000428ifdef MZSCHEME
429MZSCHEME_SUFFIX = Z
430endif
431
Bram Moolenaar071d4272004-06-13 20:20:40 +0000432ifeq ($(GUI),yes)
433TARGET := gvim$(DEBUG_SUFFIX).exe
434DEFINES += $(DEF_GUI)
435OBJ += $(GUIOBJ)
436LFLAGS += -mwindows
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000437OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000438else
439TARGET := vim$(DEBUG_SUFFIX).exe
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000440OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000441endif
442
443ifdef GETTEXT
444ifneq (yes, $(GETTEXT))
445CFLAGS += -I$(GETTEXTINCLUDE)
446ifndef STATIC_GETTEXT
447LIB += -L$(GETTEXTLIB) -l$(INTLLIB)
448ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT))
449OBJ+=$(SAFE_GETTEXT_DLL_OBJ)
450endif
451else
452LIB += -L$(GETTEXTLIB) -lintl
453endif
454endif
455endif
456
457ifdef PERL
458ifeq (no, $(DYNAMIC_PERL))
459LIB += -lperl$(PERL_VER)
460endif
461endif
462
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000463ifdef MZSCHEME
464MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
465endif
466
Bram Moolenaar071d4272004-06-13 20:20:40 +0000467ifdef TCL
468LIB += -L$(TCL)/lib
469ifeq (yes, $(DYNAMIC_TCL))
470LIB += -ltclstub$(TCL_VER)
471else
472LIB += -ltcl$(TCL_VER)
473endif
474endif
475
476ifeq (yes, $(OLE))
477LIB += -loleaut32 -lstdc++
478OBJ += $(OUTDIR)/if_ole.o
479endif
480
481ifeq (yes, $(MBYTE))
482DEFINES += -DFEAT_MBYTE
483endif
484
485ifeq (yes, $(IME))
486DEFINES += -DFEAT_MBYTE_IME
487ifeq (yes, $(DYNAMIC_IME))
488DEFINES += -DDYNAMIC_IME
489else
490LIB += -limm32
491endif
492endif
493
494ifdef ICONV
495ifneq (yes, $(ICONV))
496LIB += -L$(ICONV)
497CFLAGS += -I$(ICONV)
498endif
499DEFINES+=-DDYNAMIC_ICONV
500endif
501
502all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
503
504vimrun.exe: vimrun.c
505 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB)
506
507install.exe: dosinst.c
508 $(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid
509
510uninstal.exe: uninstal.c
511 $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
512
513$(TARGET): $(OUTDIR) $(OBJ)
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000514 $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000515
516upx: exes
517 upx gvim.exe
518 upx vim.exe
519
520xxd/xxd.exe: xxd/xxd.c
521 $(MAKE) -C xxd -f Make_cyg.mak
522
523GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
524 $(MAKE) -C GvimExt -f Make_ming.mak
525
526clean:
527 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
528 -$(DEL) $(OUTDIR)$(DIRSLASH)*.res
529 -rmdir $(OUTDIR)
530 -$(DEL) *.exe
531 -$(DEL) pathdef.c
532ifdef PERL
533 -$(DEL) if_perl.c
534endif
535 $(MAKE) -C GvimExt -f Make_ming.mak clean
536 $(MAKE) -C xxd -f Make_cyg.mak clean
537
538###########################################################################
539INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
540 structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \
541 gui.h
542
543$(OUTDIR)/%.o : %.c $(INCL)
544 $(CC) -c $(CFLAGS) $< -o $@
545
546$(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
547 $(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
548
549$(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
550 $(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
551
552$(OUTDIR):
Bram Moolenaar0cf6f542005-01-16 21:59:36 +0000553 $(MKDIR) $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000554
555$(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
556 $(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
557
558$(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
559 $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
560
561$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
562 $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
563
564$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
565 $(CC) $(CFLAGS) -D__IID_DEFINED__ -c -o $(OUTDIR)/if_ole.o if_ole.cpp
566
567$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
568ifeq (16, $(RUBY))
569 $(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c
570endif
571
572if_perl.c: if_perl.xs typemap
573 perl $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \
574 $(PERLLIB)/ExtUtils/typemap if_perl.xs > $@
575
576$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
577 $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
578
579pathdef.c: $(INCL)
580ifneq (sh.exe, $(SHELL))
581 @echo creating pathdef.c
582 @echo '/* pathdef.c */' > pathdef.c
583 @echo '#include "vim.h"' >> pathdef.c
584 @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
585 @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
586 @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
Bram Moolenaara40c5002005-01-09 21:16:21 +0000587 @echo 'char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)";' >> pathdef.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000588 @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
589 @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
590else
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
Bram Moolenaara40c5002005-01-09 21:16:21 +0000597 @echo char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)"; >> pathdef.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000598 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c
599 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c
600endif