blob: b80c258e3f8d61d007724d47084070b5b831fa6f [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#
2# Makefile for VIM on Win32, using Cygnus gcc
Bram Moolenaar48f80c22010-02-24 15:08:27 +01003# Last updated by Dan Sharp. Last Change: 2010 Feb 24
Bram Moolenaar65c1b012005-01-31 19:02:28 +00004#
5# Also read INSTALLpc.txt!
Bram Moolenaar071d4272004-06-13 20:20:40 +00006#
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)
17# TCL define to path to TCL dir to get TCL support (not defined)
18# TCL_VER define to version of TCL being used (83)
19# DYNAMIC_TCL no or yes: use yes to load the TCL DLL dynamically (yes)
20# RUBY define to path to Ruby dir to get Ruby support (not defined)
21# RUBY_VER define to version of Ruby being used (16)
22# DYNAMIC_RUBY no or yes: use yes to load the Ruby DLL dynamically (yes)
Bram Moolenaar281bdce2005-01-25 21:53:18 +000023# MZSCHEME define to path to MzScheme dir to get MZSCHEME support (not defined)
24# MZSCHEME_VER define to version of MzScheme being used (209_000)
25# DYNAMIC_MZSCHEME no or yes: use yes to load the MzScheme DLLs dynamically (yes)
Bram Moolenaar65c1b012005-01-31 19:02:28 +000026# MZSCHEME_DLLS path to MzScheme DLLs (libmzgc and libmzsch), for "static" build.
Bram Moolenaar071d4272004-06-13 20:20:40 +000027# GETTEXT no or yes: set to yes for dynamic gettext support (yes)
28# ICONV no or yes: set to yes for dynamic iconv support (yes)
29# MBYTE no or yes: set to yes to include multibyte support (yes)
30# IME no or yes: set to yes to include IME support (yes)
31# DYNAMIC_IME no or yes: set to yes to load imm32.dll dynamically (yes)
32# OLE no or yes: set to yes to make OLE gvim (no)
33# DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000034# CPUNR No longer supported, use ARCH.
Bram Moolenaar48f80c22010-02-24 15:08:27 +010035# ARCH i386 through pentium4: select -march argument to compile with
36# (i386)
Bram Moolenaar071d4272004-06-13 20:20:40 +000037# USEDLL no or yes: set to yes to use the Runtime library DLL (no)
38# For USEDLL=yes the cygwin1.dll is required to run Vim.
Bram Moolenaar48f80c22010-02-24 15:08:27 +010039# "no" does not work with latest version of Cygwin, use
40# Make_ming.mak instead. Or set CC to gcc-3.
Bram Moolenaar071d4272004-06-13 20:20:40 +000041# POSTSCRIPT no or yes: set to yes for PostScript printing (no)
42# FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG)
43# WINVER Lowest Win32 version to support. (0x0400)
44# CSCOPE no or yes: to include cscope interface support (yes)
45# OPTIMIZE SPACE, SPEED, or MAXSPEED: set optimization level (MAXSPEED)
46# NETBEANS no or yes: to include netbeans interface support (yes when GUI
47# is yes)
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000048# NBDEBUG no or yes: to include netbeans interface debugging support (no)
Bram Moolenaar071d4272004-06-13 20:20:40 +000049# XPM define to path to XPM dir to get XPM image support (not defined)
50#>>>>> choose options:
51ifndef GUI
52GUI=yes
53endif
54
55ifndef FEATURES
56FEATURES = BIG
57endif
58
59ifndef GETTEXT
60GETTEXT = yes
61endif
62
63ifndef ICONV
64ICONV = yes
65endif
66
67ifndef MBYTE
68MBYTE = yes
69endif
70
71ifndef IME
72IME = yes
73endif
74
Bram Moolenaar071d4272004-06-13 20:20:40 +000075ifndef ARCH
76ARCH = i386
77endif
78
79ifndef WINVER
80WINVER = 0x0400
81endif
82
83ifndef CSCOPE
84CSCOPE = yes
85endif
86
87ifndef NETBEANS
88ifeq ($(GUI),yes)
89NETBEANS = yes
90endif
91endif
92
93ifndef OPTIMIZE
94OPTIMIZE = MAXSPEED
95endif
96
97### See feature.h for a list of optionals.
98### Any other defines can be included here.
99
100DEFINES = -DWIN32 -DHAVE_PATHDEF -DFEAT_$(FEATURES) \
101 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000102INCLUDES = -march=$(ARCH) -Iproto
Bram Moolenaar071d4272004-06-13 20:20:40 +0000103
104#>>>>> name of the compiler and linker, name of lib directory
Bram Moolenaar48f80c22010-02-24 15:08:27 +0100105CROSS_COMPILE =
Bram Moolenaar071d4272004-06-13 20:20:40 +0000106CC = gcc
107RC = windres
108
109##############################
110# DYNAMIC_PERL=yes and no both work
111##############################
112ifdef PERL
113DEFINES += -DFEAT_PERL
114INCLUDES += -I$(PERL)/lib/CORE
115EXTRA_OBJS += $(OUTDIR)/if_perl.o
116
117ifndef DYNAMIC_PERL
118DYNAMIC_PERL = yes
119endif
120
121ifndef PERL_VER
122PERL_VER = 56
123endif
124
125ifeq (yes, $(DYNAMIC_PERL))
126DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
127else
128EXTRA_LIBS += $(PERL)/lib/CORE/perl$(PERL_VER).lib
129endif
130endif
131
132##############################
133# DYNAMIC_PYTHON=yes works.
134# DYNAMIC_PYTHON=no does not (unresolved externals on link).
135##############################
136ifdef PYTHON
137DEFINES += -DFEAT_PYTHON
138INCLUDES += -I$(PYTHON)/include
139EXTRA_OBJS += $(OUTDIR)/if_python.o
140
141ifndef DYNAMIC_PYTHON
142DYNAMIC_PYTHON = yes
143endif
144
145ifndef PYTHON_VER
146PYTHON_VER = 22
147endif
148
149ifeq (yes, $(DYNAMIC_PYTHON))
150DEFINES += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
151else
152EXTRA_LIBS += $(PYTHON)/libs/python$(PYTHON_VER).lib
153endif
154endif
155
156##############################
157# DYNAMIC_RUBY=yes works.
158# DYNAMIC_RUBY=no does not (process exits).
159##############################
160ifdef RUBY
161
162ifndef RUBY_VER
163RUBY_VER=16
164endif
165
166ifndef RUBY_VER_LONG
167RUBY_VER_LONG=1.6
168endif
169
170ifndef DYNAMIC_RUBY
171DYNAMIC_RUBY = yes
172endif
173
174ifeq ($(RUBY_VER), 16)
175ifndef RUBY_PLATFORM
176RUBY_PLATFORM = i586-mswin32
177endif
178ifndef RUBY_INSTALL_NAME
179RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
180endif
181else
182ifndef RUBY_PLATFORM
183RUBY_PLATFORM = i386-mswin32
184endif
185ifndef RUBY_INSTALL_NAME
186RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
187endif
188endif
189
190DEFINES += -DFEAT_RUBY
191INCLUDES += -I$(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
192EXTRA_OBJS += $(OUTDIR)/if_ruby.o
193
194ifeq (yes, $(DYNAMIC_RUBY))
195DEFINES += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
196DEFINES += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
197else
198EXTRA_LIBS += $(RUBY)/lib/$(RUBY_INSTALL_NAME).lib
199endif
200endif
201
202##############################
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000203# DYNAMIC_MZSCHEME=yes works
204# DYNAMIC_MZSCHEME=no works too
205##############################
206ifdef MZSCHEME
207DEFINES += -DFEAT_MZSCHEME
208INCLUDES += -I$(MZSCHEME)/include
209EXTRA_OBJS += $(OUTDIR)/if_mzsch.o
210
211ifndef DYNAMIC_MZSCHEME
212DYNAMIC_MZSCHEME = yes
213endif
214
215ifndef MZSCHEME_VER
216MZSCHEME_VER = 209_000
217endif
218
Bram Moolenaar2d6db762009-09-11 10:49:58 +0000219ifndef MZSCHEME_PRECISE_GC
220MZSCHEME_PRECISE_GC=no
221endif
222
223# for version 4.x we need to generate byte-code for Scheme base
224ifndef MZSCHEME_GENERATE_BASE
225MZSCHEME_GENERATE_BASE=no
226endif
227
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000228ifeq (yes, $(DYNAMIC_MZSCHEME))
229DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
230else
231ifndef MZSCHEME_DLLS
232MZSCHEME_DLLS = $(MZSCHEME)
233endif
Bram Moolenaar2d6db762009-09-11 10:49:58 +0000234ifeq (yes,$(MZSCHEME_PRECISE_GC))
235MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER)
236else
237MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
238endif
239EXTRA_LIBS += -L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)/lib $(MZSCHEME_LIB)
240endif
241ifeq (yes,$(MZSCHEME_GENERATE_BASE))
242DEFINES += -DINCLUDE_MZSCHEME_BASE
243MZ_EXTRA_DEP += mzscheme_base.c
244endif
245ifeq (yes,$(MZSCHEME_PRECISE_GC))
246DEFINES += -DMZ_PRECISE_GC
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000247endif
248endif
249
250##############################
Bram Moolenaar071d4272004-06-13 20:20:40 +0000251# DYNAMIC_TCL=yes and no both work.
252##############################
253ifdef TCL
254DEFINES += -DFEAT_TCL
255INCLUDES += -I$(TCL)/include
256EXTRA_OBJS += $(OUTDIR)/if_tcl.o
257
258ifndef DYNAMIC_TCL
259DYNAMIC_TCL = yes
260endif
261
262ifndef TCL_VER
263TCL_VER = 83
264endif
265
266ifeq (yes, $(DYNAMIC_TCL))
267DEFINES += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
268EXTRA_LIBS += $(TCL)/lib/tclstub$(TCL_VER).lib
269else
270EXTRA_LIBS += $(TCL)/lib/tcl$(TCL_VER).lib
271endif
272endif
273
274##############################
275ifeq (yes, $(GETTEXT))
276DEFINES += -DDYNAMIC_GETTEXT
277endif
278
279##############################
280ifeq (yes, $(ICONV))
281DEFINES += -DDYNAMIC_ICONV
282endif
283
284##############################
285ifeq (yes, $(MBYTE))
286DEFINES += -DFEAT_MBYTE
287endif
288
289##############################
290ifeq (yes, $(IME))
291DEFINES += -DFEAT_MBYTE_IME
292
293ifndef DYNAMIC_IME
294DYNAMIC_IME = yes
295endif
296
297ifeq (yes, $(DYNAMIC_IME))
298DEFINES += -DDYNAMIC_IME
299else
300EXTRA_LIBS += -limm32
301endif
302endif
303
304##############################
305ifeq (yes, $(DEBUG))
306DEFINES += -DDEBUG
307INCLUDES += -g -fstack-check
308DEBUG_SUFFIX = d
309else
310
311ifeq ($(OPTIMIZE), SIZE)
312OPTFLAG = -Os
313else
314ifeq ($(OPTIMIZE), MAXSPEED)
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000315OPTFLAG = -O3 -fomit-frame-pointer -freg-struct-return
Bram Moolenaar071d4272004-06-13 20:20:40 +0000316else
317OPTFLAG = -O2
318endif
319endif
320
321# A bug in the GCC <= 3.2 optimizer can cause a crash. The
322# following option removes the problem optimization.
323OPTFLAG += -fno-strength-reduce
324
325INCLUDES += -s
326
327endif
328
329##############################
330# USEDLL=yes will build a Cygwin32 executable that relies on cygwin1.dll.
331# USEDLL=no will build a Mingw32 executable with no extra dll dependencies.
332##############################
333ifeq (yes, $(USEDLL))
334DEFINES += -D_MAX_PATH=256 -D__CYGWIN__
335else
336INCLUDES += -mno-cygwin
337endif
338
339##############################
340ifeq (yes, $(POSTSCRIPT))
341DEFINES += -DMSWINPS
342endif
343
344##############################
345ifeq (yes, $(CSCOPE))
346DEFINES += -DFEAT_CSCOPE
347EXTRA_OBJS += $(OUTDIR)/if_cscope.o
348endif
349
350##############################
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000351ifeq ($(GUI),yes)
352
353##############################
Bram Moolenaar071d4272004-06-13 20:20:40 +0000354ifeq (yes, $(NETBEANS))
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000355# Only allow NETBEANS for a GUI build.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000356DEFINES += -DFEAT_NETBEANS_INTG
Bram Moolenaar408fb622005-03-07 23:03:19 +0000357EXTRA_OBJS += $(OUTDIR)/netbeans.o
Bram Moolenaar071d4272004-06-13 20:20:40 +0000358EXTRA_LIBS += -lwsock32
359
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000360ifeq (yes, $(NBDEBUG))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000361DEFINES += -DNBDEBUG
362NBDEBUG_DEP = nbdebug.h nbdebug.c
363endif
364
365endif
366
367##############################
368ifdef XPM
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000369# Only allow XPM for a GUI build.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000370DEFINES += -DFEAT_XPM_W32
371INCLUDES += -I$(XPM)/include
372EXTRA_OBJS += $(OUTDIR)/xpm_w32.o
373EXTRA_LIBS += -L$(XPM)/lib -lXpm
374endif
375
376##############################
Bram Moolenaar071d4272004-06-13 20:20:40 +0000377EXE = gvim$(DEBUG_SUFFIX).exe
378OUTDIR = gobj$(DEBUG_SUFFIX)
379DEFINES += -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
Bram Moolenaar408fb622005-03-07 23:03:19 +0000380EXTRA_OBJS += $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o
Bram Moolenaar45360022005-07-21 21:08:21 +0000381EXTRA_LIBS += -mwindows -lcomctl32 -lversion
Bram Moolenaar071d4272004-06-13 20:20:40 +0000382else
383EXE = vim$(DEBUG_SUFFIX).exe
384OUTDIR = obj$(DEBUG_SUFFIX)
385LIBS += -luser32 -lgdi32 -lcomdlg32
386endif
387
388##############################
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000389ifeq (yes, $(OLE))
390DEFINES += -DFEAT_OLE
391EXTRA_OBJS += $(OUTDIR)/if_ole.o
392EXTRA_LIBS += -loleaut32 -lstdc++
393endif
394
395##############################
Bram Moolenaar071d4272004-06-13 20:20:40 +0000396ifneq (sh.exe, $(SHELL))
397DEL = rm
Bram Moolenaar32e4e1f2005-01-16 21:57:33 +0000398MKDIR = mkdir -p
Bram Moolenaar071d4272004-06-13 20:20:40 +0000399DIRSLASH = /
400else
401DEL = del
Bram Moolenaar32e4e1f2005-01-16 21:57:33 +0000402MKDIR = mkdir
Bram Moolenaar071d4272004-06-13 20:20:40 +0000403DIRSLASH = \\
404endif
405
406#>>>>> end of choices
407###########################################################################
408
409INCL = vim.h globals.h option.h keymap.h macros.h ascii.h term.h os_win32.h \
410 structs.h version.h
411
412CFLAGS = $(OPTFLAG) $(DEFINES) $(INCLUDES)
413
414RCFLAGS = -O coff $(DEFINES)
415
416OBJ = \
Bram Moolenaaredac1852010-05-18 20:34:20 +0200417 $(OUTDIR)/blowfish.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000418 $(OUTDIR)/buffer.o \
419 $(OUTDIR)/charset.o \
420 $(OUTDIR)/diff.o \
421 $(OUTDIR)/digraph.o \
422 $(OUTDIR)/edit.o \
423 $(OUTDIR)/eval.o \
424 $(OUTDIR)/ex_cmds.o \
425 $(OUTDIR)/ex_cmds2.o \
426 $(OUTDIR)/ex_docmd.o \
427 $(OUTDIR)/ex_eval.o \
428 $(OUTDIR)/ex_getln.o \
429 $(OUTDIR)/fileio.o \
430 $(OUTDIR)/fold.o \
431 $(OUTDIR)/getchar.o \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000432 $(OUTDIR)/hardcopy.o \
Bram Moolenaar76b92b22006-03-24 22:46:53 +0000433 $(OUTDIR)/hashtab.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000434 $(OUTDIR)/main.o \
435 $(OUTDIR)/mark.o \
436 $(OUTDIR)/memfile.o \
437 $(OUTDIR)/memline.o \
438 $(OUTDIR)/menu.o \
439 $(OUTDIR)/message.o \
440 $(OUTDIR)/misc1.o \
441 $(OUTDIR)/misc2.o \
442 $(OUTDIR)/move.o \
443 $(OUTDIR)/mbyte.o \
444 $(OUTDIR)/normal.o \
445 $(OUTDIR)/ops.o \
446 $(OUTDIR)/option.o \
447 $(OUTDIR)/os_win32.o \
448 $(OUTDIR)/os_mswin.o \
449 $(OUTDIR)/pathdef.o \
Bram Moolenaar76b92b22006-03-24 22:46:53 +0000450 $(OUTDIR)/popupmnu.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000451 $(OUTDIR)/quickfix.o \
452 $(OUTDIR)/regexp.o \
453 $(OUTDIR)/screen.o \
454 $(OUTDIR)/search.o \
Bram Moolenaaredac1852010-05-18 20:34:20 +0200455 $(OUTDIR)/sha256.o \
Bram Moolenaarfc735152005-03-22 22:54:12 +0000456 $(OUTDIR)/spell.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000457 $(OUTDIR)/syntax.o \
458 $(OUTDIR)/tag.o \
459 $(OUTDIR)/term.o \
460 $(OUTDIR)/ui.o \
461 $(OUTDIR)/undo.o \
462 $(OUTDIR)/version.o \
463 $(OUTDIR)/vimrc.o \
464 $(OUTDIR)/window.o \
465 $(EXTRA_OBJS)
466
467all: $(EXE) xxd/xxd.exe vimrun.exe install.exe uninstal.exe GvimExt/gvimext.dll
468
469# According to the Cygwin doc 1.2 FAQ, kernel32 should not be specified for
470# linking unless calling ld directly.
471# See /usr/doc/cygwin-doc-1.2/html/faq_toc.html#TOC93 for more information.
472$(EXE): $(OUTDIR) $(OBJ)
473 $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)
474
475xxd/xxd.exe: xxd/xxd.c
Bram Moolenaar48f80c22010-02-24 15:08:27 +0100476 $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000477
478GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
Bram Moolenaar48f80c22010-02-24 15:08:27 +0100479 $(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000480
481vimrun.exe: vimrun.c
482 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS)
483
484install.exe: dosinst.c
485 $(CC) $(CFLAGS) -o install.exe dosinst.c $(LIBS) -luuid -lole32
486
487uninstal.exe: uninstal.c
488 $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIBS)
489
490$(OUTDIR):
Bram Moolenaar32e4e1f2005-01-16 21:57:33 +0000491 $(MKDIR) $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000492
493tags:
494 command /c ctags *.c $(INCL)
495
496clean:
497 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
498 -rmdir $(OUTDIR)
Bram Moolenaarcf3630f2005-01-08 16:04:29 +0000499 -$(DEL) $(EXE) vimrun.exe install.exe uninstal.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000500ifdef PERL
501 -$(DEL) if_perl.c
502endif
Bram Moolenaar2d6db762009-09-11 10:49:58 +0000503ifdef MZSCHEME
504 -$(DEL) mzscheme_base.c
505endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000506 -$(DEL) pathdef.c
507 $(MAKE) -C xxd -f Make_cyg.mak clean
508 $(MAKE) -C GvimExt -f Make_ming.mak clean
509
Bram Moolenaarcf3630f2005-01-08 16:04:29 +0000510distclean: clean
511 -$(DEL) obj$(DIRSLASH)*.o
512 -rmdir obj
513 -$(DEL) gobj$(DIRSLASH)*.o
514 -rmdir gobj
515 -$(DEL) objd$(DIRSLASH)*.o
516 -rmdir objd
517 -$(DEL) gobjd$(DIRSLASH)*.o
518 -rmdir gobjd
519 -$(DEL) *.exe
520
Bram Moolenaar071d4272004-06-13 20:20:40 +0000521###########################################################################
522
523$(OUTDIR)/%.o : %.c $(INCL)
524 $(CC) -c $(CFLAGS) $< -o $@
525
526$(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
527 $(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
528
529$(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
530 $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
531
532$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
533 $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
534
535$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
Bram Moolenaar61bfb9f2007-09-30 20:28:48 +0000536 $(CC) -c $(CFLAGS) if_ole.cpp -o $(OUTDIR)/if_ole.o
Bram Moolenaar071d4272004-06-13 20:20:40 +0000537
538if_perl.c: if_perl.xs typemap
Bram Moolenaarcf3630f2005-01-08 16:04:29 +0000539 $(PERL)/bin/perl `cygpath -d $(PERL)/lib/ExtUtils/xsubpp` \
540 -prototypes -typemap \
541 `cygpath -d $(PERL)/lib/ExtUtils/typemap` if_perl.xs > $@
Bram Moolenaar071d4272004-06-13 20:20:40 +0000542
543$(OUTDIR)/if_perl.o: if_perl.c $(INCL)
544ifeq (yes, $(USEDLL))
545 $(CC) -c $(CFLAGS) -I/usr/include/mingw -D__MINGW32__ if_perl.c -o $(OUTDIR)/if_perl.o
546endif
547
548$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
549ifeq (16, $(RUBY_VER))
550 $(CC) -c $(CFLAGS) -U_WIN32 if_ruby.c -o $(OUTDIR)/if_ruby.o
551endif
552
553$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_DEP)
554 $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
555
Bram Moolenaar2d6db762009-09-11 10:49:58 +0000556$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP)
557 $(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
558
Bram Moolenaar071d4272004-06-13 20:20:40 +0000559$(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
560 $(RC) $(RCFLAGS) vim.rc -o $(OUTDIR)/vimrc.o
561
Bram Moolenaar2d6db762009-09-11 10:49:58 +0000562mzscheme_base.c:
563 $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
564
Bram Moolenaar071d4272004-06-13 20:20:40 +0000565pathdef.c: $(INCL)
566ifneq (sh.exe, $(SHELL))
567 @echo creating pathdef.c
568 @echo '/* pathdef.c */' > pathdef.c
569 @echo '#include "vim.h"' >> pathdef.c
570 @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
571 @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
572 @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
573 @echo 'char_u *all_lflags = (char_u *)"$(CC) -s -o $(EXE) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)";' >> pathdef.c
574 @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
575 @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
576else
577 @echo creating pathdef.c
578 @echo /* pathdef.c */ > pathdef.c
579 @echo #include "vim.h" >> pathdef.c
580 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c
581 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c
582 @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c
583 @echo char_u *all_lflags = (char_u *)"$(CC) -s -o $(EXE) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)"; >> pathdef.c
584 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c
585 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c
586endif