blob: 4074a88ea832fc729197490357833a1ee99bd23f [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
226WINDRES = i586-pc-mingw32msvc-windres
227else
228# normal (Windows) compilation:
229CC = gcc
230ifneq (sh.exe, $(SHELL))
231DEL = rm
232DIRSLASH = /
233else
234DEL = del
235DIRSLASH = \\
236endif
237WINDRES = windres
238endif
239
240#>>>>> end of choices
241###########################################################################
242
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000243CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
Bram Moolenaar071d4272004-06-13 20:20:40 +0000244
245ifdef GETTEXT
246DEFINES +=-DHAVE_GETTEXT -DHAVE_LOCALE_H
247GETTEXTINCLUDE = $(GETTEXT)/include
248GETTEXTLIB = $(INTLPATH)
249ifeq (yes, $(GETTEXT))
250DEFINES +=-DDYNAMIC_GETTEXT
251else
252ifdef DYNAMIC_GETTEXT
253DEFINES +=-D$(DYNAMIC_GETTEXT)
254ifdef GETTEXT_DYNAMIC
255DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\"
256endif
257endif
258endif
259endif
260
261ifdef PERL
262CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -L$(PERLLIBS)
263ifeq (yes, $(DYNAMIC_PERL))
264CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
265endif
266endif
267
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000268ifdef MZSCHEME
269CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
270endif
271
Bram Moolenaar071d4272004-06-13 20:20:40 +0000272ifdef RUBY
273CFLAGS += -DFEAT_RUBY $(RUBYINC)
274ifeq (yes, $(DYNAMIC_RUBY))
275CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
276CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
277endif
278endif
279
280ifdef PYTHON
281CFLAGS += -DFEAT_PYTHON $(PYTHONINC)
282ifeq (yes, $(DYNAMIC_PYTHON))
283CFLAGS += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
284endif
285endif
286
287ifdef TCL
288CFLAGS += -DFEAT_TCL $(TCLINC)
289ifeq (yes, $(DYNAMIC_TCL))
290CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
291endif
292endif
293
294ifeq ($(POSTSCRIPT),yes)
295DEFINES += -DMSWINPS
296endif
297
298ifeq (yes, $(OLE))
299DEFINES += -DFEAT_OLE
300endif
301
302ifeq ($(CSCOPE),yes)
303DEFINES += -DFEAT_CSCOPE
304endif
305
306ifeq ($(NETBEANS),yes)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000307# Only allow NETBEANS for a GUI build.
308ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000309DEFINES += -DFEAT_NETBEANS_INTG
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000310
311ifeq ($(NBDEBUG), yes)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000312DEFINES += -DNBDEBUG
313NBDEBUG_INCL = nbdebug.h
314NBDEBUG_SRC = nbdebug.c
315endif
316endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000317endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000318
319ifdef XPM
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000320# Only allow XPM for a GUI build.
321ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000322CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include
323endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000324endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000325
326ifeq ($(DEBUG),yes)
327CFLAGS += -g -fstack-check
328DEBUG_SUFFIX=d
329else
330ifeq ($(OPTIMIZE), SIZE)
331CFLAGS += -Os
332else
333ifeq ($(OPTIMIZE), MAXSPEED)
334CFLAGS += -O3
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000335CFLAGS += -fomit-frame-pointer -freg-struct-return
Bram Moolenaar071d4272004-06-13 20:20:40 +0000336else # SPEED
337CFLAGS += -O2
338endif
339endif
340CFLAGS += -s
341endif
342
343LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32
344GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/os_w32exe.o
345OBJ = \
346 $(OUTDIR)/buffer.o \
347 $(OUTDIR)/charset.o \
348 $(OUTDIR)/diff.o \
349 $(OUTDIR)/digraph.o \
350 $(OUTDIR)/edit.o \
351 $(OUTDIR)/eval.o \
352 $(OUTDIR)/ex_cmds.o \
353 $(OUTDIR)/ex_cmds2.o \
354 $(OUTDIR)/ex_docmd.o \
355 $(OUTDIR)/ex_eval.o \
356 $(OUTDIR)/ex_getln.o \
357 $(OUTDIR)/fileio.o \
358 $(OUTDIR)/fold.o \
359 $(OUTDIR)/getchar.o \
360 $(OUTDIR)/main.o \
361 $(OUTDIR)/mark.o \
362 $(OUTDIR)/memfile.o \
363 $(OUTDIR)/memline.o \
364 $(OUTDIR)/menu.o \
365 $(OUTDIR)/message.o \
366 $(OUTDIR)/misc1.o \
367 $(OUTDIR)/misc2.o \
368 $(OUTDIR)/move.o \
369 $(OUTDIR)/mbyte.o \
370 $(OUTDIR)/normal.o \
371 $(OUTDIR)/ops.o \
372 $(OUTDIR)/option.o \
373 $(OUTDIR)/os_win32.o \
374 $(OUTDIR)/os_mswin.o \
375 $(OUTDIR)/pathdef.o \
376 $(OUTDIR)/quickfix.o \
377 $(OUTDIR)/regexp.o \
378 $(OUTDIR)/screen.o \
379 $(OUTDIR)/search.o \
380 $(OUTDIR)/syntax.o \
381 $(OUTDIR)/tag.o \
382 $(OUTDIR)/term.o \
383 $(OUTDIR)/ui.o \
384 $(OUTDIR)/undo.o \
385 $(OUTDIR)/version.o \
386 $(OUTDIR)/vimrc.o \
387 $(OUTDIR)/window.o
388
389ifdef PERL
390OBJ += $(OUTDIR)/if_perl.o
391endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000392ifdef MZSCHEME
393OBJ += $(OUTDIR)/if_mzsch.o
394MZSCHEME_INCL = if_mzsch.h
395endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000396ifdef PYTHON
397OBJ += $(OUTDIR)/if_python.o
398endif
399ifdef RUBY
400OBJ += $(OUTDIR)/if_ruby.o
401endif
402ifdef TCL
403OBJ += $(OUTDIR)/if_tcl.o
404endif
405ifeq ($(CSCOPE),yes)
406OBJ += $(OUTDIR)/if_cscope.o
407endif
408ifeq ($(NETBEANS),yes)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000409# Only allow NETBEANS for a GUI build.
410ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000411OBJ += $(OUTDIR)/netbeans.o $(OUTDIR)/gui_beval.o
412LIB += -lwsock32
413endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000414endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000415ifdef XPM
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000416# Only allow XPM for a GUI build.
417ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000418OBJ += $(OUTDIR)/xpm_w32.o
419# You'll need libXpm.a from http://gnuwin32.sf.net
420LIB += -L $(XPM)/lib -lXpm
421endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000422endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000423
424
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000425ifdef MZSCHEME
426MZSCHEME_SUFFIX = Z
427endif
428
Bram Moolenaar071d4272004-06-13 20:20:40 +0000429ifeq ($(GUI),yes)
430TARGET := gvim$(DEBUG_SUFFIX).exe
431DEFINES += $(DEF_GUI)
432OBJ += $(GUIOBJ)
433LFLAGS += -mwindows
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000434OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000435else
436TARGET := vim$(DEBUG_SUFFIX).exe
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000437OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000438endif
439
440ifdef GETTEXT
441ifneq (yes, $(GETTEXT))
442CFLAGS += -I$(GETTEXTINCLUDE)
443ifndef STATIC_GETTEXT
444LIB += -L$(GETTEXTLIB) -l$(INTLLIB)
445ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT))
446OBJ+=$(SAFE_GETTEXT_DLL_OBJ)
447endif
448else
449LIB += -L$(GETTEXTLIB) -lintl
450endif
451endif
452endif
453
454ifdef PERL
455ifeq (no, $(DYNAMIC_PERL))
456LIB += -lperl$(PERL_VER)
457endif
458endif
459
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000460ifdef MZSCHEME
461MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
462endif
463
Bram Moolenaar071d4272004-06-13 20:20:40 +0000464ifdef TCL
465LIB += -L$(TCL)/lib
466ifeq (yes, $(DYNAMIC_TCL))
467LIB += -ltclstub$(TCL_VER)
468else
469LIB += -ltcl$(TCL_VER)
470endif
471endif
472
473ifeq (yes, $(OLE))
474LIB += -loleaut32 -lstdc++
475OBJ += $(OUTDIR)/if_ole.o
476endif
477
478ifeq (yes, $(MBYTE))
479DEFINES += -DFEAT_MBYTE
480endif
481
482ifeq (yes, $(IME))
483DEFINES += -DFEAT_MBYTE_IME
484ifeq (yes, $(DYNAMIC_IME))
485DEFINES += -DDYNAMIC_IME
486else
487LIB += -limm32
488endif
489endif
490
491ifdef ICONV
492ifneq (yes, $(ICONV))
493LIB += -L$(ICONV)
494CFLAGS += -I$(ICONV)
495endif
496DEFINES+=-DDYNAMIC_ICONV
497endif
498
499all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
500
501vimrun.exe: vimrun.c
502 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB)
503
504install.exe: dosinst.c
505 $(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid
506
507uninstal.exe: uninstal.c
508 $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
509
510$(TARGET): $(OUTDIR) $(OBJ)
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000511 $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000512
513upx: exes
514 upx gvim.exe
515 upx vim.exe
516
517xxd/xxd.exe: xxd/xxd.c
518 $(MAKE) -C xxd -f Make_cyg.mak
519
520GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
521 $(MAKE) -C GvimExt -f Make_ming.mak
522
523clean:
524 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
525 -$(DEL) $(OUTDIR)$(DIRSLASH)*.res
526 -rmdir $(OUTDIR)
527 -$(DEL) *.exe
528 -$(DEL) pathdef.c
529ifdef PERL
530 -$(DEL) if_perl.c
531endif
532 $(MAKE) -C GvimExt -f Make_ming.mak clean
533 $(MAKE) -C xxd -f Make_cyg.mak clean
534
535###########################################################################
536INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
537 structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \
538 gui.h
539
540$(OUTDIR)/%.o : %.c $(INCL)
541 $(CC) -c $(CFLAGS) $< -o $@
542
543$(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
544 $(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
545
546$(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
547 $(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
548
549$(OUTDIR):
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000550 mkdir -p $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000551
552$(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
553 $(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
554
555$(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
556 $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
557
558$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
559 $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
560
561$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
562 $(CC) $(CFLAGS) -D__IID_DEFINED__ -c -o $(OUTDIR)/if_ole.o if_ole.cpp
563
564$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
565ifeq (16, $(RUBY))
566 $(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c
567endif
568
569if_perl.c: if_perl.xs typemap
570 perl $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \
571 $(PERLLIB)/ExtUtils/typemap if_perl.xs > $@
572
573$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
574 $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
575
576pathdef.c: $(INCL)
577ifneq (sh.exe, $(SHELL))
578 @echo creating pathdef.c
579 @echo '/* pathdef.c */' > pathdef.c
580 @echo '#include "vim.h"' >> pathdef.c
581 @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
582 @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
583 @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
584 @echo 'char_u *all_lflags = (char_u *)"$(CC) -s -o $(TARGET) $(LIB) -luuid -lole32 $(PYTHONLIB) $(RUBYLIB)";' >> pathdef.c
585 @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
586 @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
587else
588 @echo creating pathdef.c
589 @echo /* pathdef.c */ > pathdef.c
590 @echo #include "vim.h" >> pathdef.c
591 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c
592 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c
593 @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c
594 @echo char_u *all_lflags = (char_u *)"$(CC) -s -o $(TARGET) $(LIB) -luuid -lole32 $(PYTHONLIB) $(RUBYLIB)"; >> pathdef.c
595 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c
596 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c
597endif