blob: e569b9a83206fa86d97214b725bb80c926891bd4 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001# Makefile for Vim on Win32 (Windows NT and Windows 95), using the
2# Microsoft Visual C++ 2.x and MSVC 4.x compilers (or newer).
3# It builds on Windows 95 and all four NT platforms: i386, Alpha, MIPS, and
4# PowerPC. The NT/i386 binary and the Windows 95 binary are identical.
5#
Bram Moolenaar7887d882005-07-01 22:33:52 +00006# To build using Borland C++, use Make_bc3.mak or Make_bc5.mak.
7#
Bram Moolenaar071d4272004-06-13 20:20:40 +00008# This makefile can build the console, GUI, OLE-enable, Perl-enabled and
9# Python-enabled versions of vim for Win32 platforms.
10#
Bram Moolenaar071d4272004-06-13 20:20:40 +000011# The basic command line to build vim is:
Bram Moolenaar7887d882005-07-01 22:33:52 +000012#
Bram Moolenaar071d4272004-06-13 20:20:40 +000013# nmake -f Make_mvc.mak
Bram Moolenaar7887d882005-07-01 22:33:52 +000014#
Bram Moolenaar071d4272004-06-13 20:20:40 +000015# This will build the console version of vim with no additional interfaces.
Bram Moolenaar7887d882005-07-01 22:33:52 +000016# To add features, define any of the following:
17#
18# !!!! After changing features do "nmake clean" first !!!!
19#
20# Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is BIG)
21#
Bram Moolenaar071d4272004-06-13 20:20:40 +000022# GUI interface: GUI=yes (default is no)
Bram Moolenaar7887d882005-07-01 22:33:52 +000023#
Bram Moolenaar071d4272004-06-13 20:20:40 +000024# OLE interface: OLE=yes (usually with GUI=yes)
Bram Moolenaar7887d882005-07-01 22:33:52 +000025#
Bram Moolenaar071d4272004-06-13 20:20:40 +000026# Multibyte support: MBYTE=yes
Bram Moolenaar7887d882005-07-01 22:33:52 +000027#
Bram Moolenaar071d4272004-06-13 20:20:40 +000028# IME support: IME=yes (requires GUI=yes)
29# DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default
30# is yes)
31# Global IME support: GIME=yes (requires GUI=yes)
Bram Moolenaar7887d882005-07-01 22:33:52 +000032#
Bram Moolenaar65c1b012005-01-31 19:02:28 +000033# MzScheme interface:
34# MZSCHEME=[Path to MzScheme directory]
35# DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically)
36# MZSCHEME_VER=[version, 205_000, ...]
Bram Moolenaar7887d882005-07-01 22:33:52 +000037#
Bram Moolenaar071d4272004-06-13 20:20:40 +000038# Perl interface:
39# PERL=[Path to Perl directory]
40# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
Bram Moolenaar7887d882005-07-01 22:33:52 +000041# PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc]
42# (default is 56)
43#
Bram Moolenaar071d4272004-06-13 20:20:40 +000044# Python interface:
45# PYTHON=[Path to Python directory]
46# DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
47# PYTHON_VER=[Python version, eg 15, 20] (default is 22)
Bram Moolenaar7887d882005-07-01 22:33:52 +000048#
Bram Moolenaar071d4272004-06-13 20:20:40 +000049# Ruby interface:
50# RUBY=[Path to Ruby directory]
51# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
52# RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
53# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
54# You must set RUBY_VER_LONG when change RUBY_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000055#
Bram Moolenaar071d4272004-06-13 20:20:40 +000056# Tcl interface:
57# TCL=[Path to Tcl directory]
58# DYNAMIC_TCL=yes (to load the Tcl DLL dynamically)
59# TCL_VER=[Tcl version, e.g. 80, 83] (default is 83)
60# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
61# You must set TCL_VER_LONG when you set TCL_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000062#
63# SNiFF+ interface: SNIFF=yes
64#
65# Cscope support: CSCOPE=yes
66#
67# Iconv library support (always dynamically loaded):
68# ICONV=[yes or no] (default is yes)
69#
70# Intl library support (always dynamically loaded):
71# GETTEXT=[yes or no] (default is yes)
72# See http://sourceforge.net/projects/gettext/
73#
74# PostScript printing: POSTSCRIPT=yes (default is no)
75#
76# Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
77#
78# XPM Image Support: XPM=[path to XPM directory]
79#
80# Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
81#
82# Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is
83# i386)
84#
85# Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400)
86#
Bram Moolenaar071d4272004-06-13 20:20:40 +000087# Debug version: DEBUG=yes
88# Mapfile: MAP=[no, yes or lines] (default is yes)
89# no: Don't write a mapfile.
90# yes: Write a normal mapfile.
91# lines: Write a mapfile with line numbers (only for VC6 and later)
Bram Moolenaar7887d882005-07-01 22:33:52 +000092#
93# Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
94# doesn't work)
Bram Moolenaar071d4272004-06-13 20:20:40 +000095#
96# You can combine any of these interfaces
97#
98# Example: To build the non-debug, GUI version with Perl interface:
99# nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
100#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101# DEBUG with Make_mvc.mak and Make_dvc.mak:
102# This makefile gives a fineness of control which is not supported in
103# Visual C++ configuration files. Therefore, debugging requires a bit of
104# extra work.
105# Make_dvc.mak is a Visual C++ project to access that support.
106# To use Make_dvc.mak:
107# 1) Build Vim with Make_mvc.mak.
108# Use a "DEBUG=yes" argument to build Vim with debug support.
109# E.g. the following builds gvimd.exe:
110# nmake -f Make_mvc.mak debug=yes gui=yes
111# 2) Use MS Devstudio and set it up to allow that file to be debugged:
112# i) Pass Make_dvc.mak to the IDE.
113# Use the "open workspace" menu entry to load Make_dvc.mak.
114# Alternatively, from the command line:
115# msdev /nologo Make_dvc.mak
116# Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
117# this and offer to convert it to their own format. Accept that.
118# It creates a file called Make_dvc.dsw which can then be used
119# for further operations. E.g.
120# msdev /nologo Make_dvc.dsw
121# ii) Set the built executable for debugging:
122# a) Alt+F7/Debug takes you to the Debug dialog.
123# b) Fill "Executable for debug session". e.g. gvimd.exe
124# c) Fill "Program arguments". e.g. -R dosinst.c
125# d) Complete the dialog
126# 3) You can now debug the executable you built with Make_mvc.mak
127#
128# Note: Make_dvc.mak builds vimrun.exe, because it must build something
129# to be a valid makefile..
130
131### See feature.h for a list of optionals.
132# If you want to build some optional features without modifying the source,
133# you can set DEFINES on the command line, e.g.,
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000134# nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000135
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000136# Build on both Windows NT/XP and Windows 9x
Bram Moolenaar071d4272004-06-13 20:20:40 +0000137
138TARGETOS = BOTH
139
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000140# Select one of eight object code directories, depends on GUI, OLE, DEBUG and
141# interfaces.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000142# If you change something else, do "make clean" first!
143!if "$(GUI)" == "yes"
144OBJDIR = .\ObjG
145!else
146OBJDIR = .\ObjC
147!endif
148!if "$(OLE)" == "yes"
149OBJDIR = $(OBJDIR)O
150!endif
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000151!ifdef PERL
152OBJDIR = $(OBJDIR)L
153!endif
154!ifdef PYTHON
155OBJDIR = $(OBJDIR)Y
156!endif
157!ifdef TCL
158OBJDIR = $(OBJDIR)T
159!endif
160!ifdef RUBY
161OBJDIR = $(OBJDIR)R
162!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000163!ifdef MZSCHEME
164OBJDIR = $(OBJDIR)Z
165!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000166!if "$(DEBUG)" == "yes"
167OBJDIR = $(OBJDIR)d
168!endif
169
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000170# Win32.mak requires that CPU be set appropriately
Bram Moolenaar071d4272004-06-13 20:20:40 +0000171
172!ifdef PROCESSOR_ARCHITECTURE
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000173# We're on Windows NT or using VC 6+
Bram Moolenaar071d4272004-06-13 20:20:40 +0000174CPU = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000175! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000176CPU = i386
177! endif
178!else # !PROCESSOR_ARCHITECTURE
179# We're on Windows 95
180CPU = i386
181!endif # !PROCESSOR_ARCHITECTURE
182
183
184# Build a retail version by default
185
186!if "$(DEBUG)" != "yes"
187NODEBUG = 1
188!else
189MAKEFLAGS_GVIMEXT = DEBUG=yes
190!endif
191
192
Bram Moolenaar071d4272004-06-13 20:20:40 +0000193# Get all sorts of useful, standard macros from the SDK. (Note that
194# MSVC 2.2 does not install <ntwin32.mak> in the \msvc20\include
195# directory, but you can find it in \msvc20\include on the CD-ROM.
196# You may also need <win32.mak> from the same place.)
197
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000198!include <Win32.mak>
Bram Moolenaar071d4272004-06-13 20:20:40 +0000199
200
201#>>>>> path of the compiler and linker; name of include and lib directories
202# PATH = c:\msvc20\bin;$(PATH)
203# INCLUDE = c:\msvc20\include
204# LIB = c:\msvc20\lib
205
206!ifndef CTAGS
207CTAGS = ctags
208!endif
209
210!if "$(SNIFF)" == "yes"
211# SNIFF - Include support for SNiFF+.
212SNIFF_INCL = if_sniff.h
213SNIFF_OBJ = $(OBJDIR)/if_sniff.obj
Bram Moolenaarb6356332005-07-18 21:40:44 +0000214SNIFF_LIB = shell32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000215SNIFF_DEFS = -DFEAT_SNIFF
216# The SNiFF integration needs multithreaded libraries!
217MULTITHREADED = yes
218!endif
219
220!ifndef CSCOPE
221CSCOPE = yes
222!endif
223
224!if "$(CSCOPE)" == "yes"
225# CSCOPE - Include support for Cscope
226CSCOPE_INCL = if_cscope.h
227CSCOPE_OBJ = $(OBJDIR)/if_cscope.obj
228CSCOPE_DEFS = -DFEAT_CSCOPE
229!endif
230
231!ifndef NETBEANS
232NETBEANS = $(GUI)
233!endif
234
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000235# Only allow NETBEANS and XPM for a GUI build.
236!if "$(GUI)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000237!if "$(NETBEANS)" == "yes"
238# NETBEANS - Include support for Netbeans integration
239NETBEANS_PRO = proto/netbeans.pro
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000240NETBEANS_OBJ = $(OBJDIR)/netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000241NETBEANS_DEFS = -DFEAT_NETBEANS_INTG
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000242
243!if "$(NBDEBUG)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000244NBDEBUG_DEFS = -DNBDEBUG
245NBDEBUG_INCL = nbdebug.h
246NBDEBUG_SRC = nbdebug.c
247!endif
Bram Moolenaarb6356332005-07-18 21:40:44 +0000248NETBEANS_LIB = WSock32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000249!endif
250
251!ifdef XPM
252# XPM - Include support for XPM signs
253# you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
254XPM_OBJ = $(OBJDIR)/xpm_w32.obj
255XPM_DEFS = -DFEAT_XPM_W32
256XPM_LIB = $(XPM)\lib\libXpm.lib
257XPM_INC = -I $(XPM)\include
258!endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000259!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000260
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000261# Set which version of the CRT to use
Bram Moolenaar071d4272004-06-13 20:20:40 +0000262!if defined(USE_MSVCRT)
263CVARS = $(cvarsdll)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000264# !elseif defined(MULTITHREADED)
265# CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000266!else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000267# CVARS = $(cvars)
268CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000269!endif
270
271# need advapi32.lib for GetUserName()
272# need shell32.lib for ExtractIcon()
273# gdi32.lib and comdlg32.lib for printing support
274# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
275CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000276!if "$(DELAYLOAD)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000277CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
278!endif
279
280### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
281# When set to 0x0500 ":browse" stops working.
282!ifndef WINVER
283WINVER = 0x0400
284!endif
285
286# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
287# default, use these lines.
288#VIMRCLOC = somewhere
289#VIMRUNTIMEDIR = somewhere
290
291CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
292 $(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) \
293 $(NBDEBUG_DEFS) $(XPM_DEFS) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000294 $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
295 /Fo$(OUTDIR)/
Bram Moolenaar071d4272004-06-13 20:20:40 +0000296
297#>>>>> end of choices
298###########################################################################
299
300!ifdef OS
301OS_TYPE = winnt
302DEL_TREE = rmdir /s /q
303!else
304OS_TYPE = win95
305DEL_TREE = deltree /y
306!endif
307
308INTDIR=$(OBJDIR)
309OUTDIR=$(OBJDIR)
310
311# Convert processor ID to MVC-compatible number
312!if "$(CPUNR)" == "i386"
313CPUARG = /G3
314!elseif "$(CPUNR)" == "i486"
315CPUARG = /G4
316!elseif "$(CPUNR)" == "i586"
317CPUARG = /G5
318!elseif "$(CPUNR)" == "i686"
319CPUARG = /G6
Bram Moolenaarcf3630f2005-01-08 16:04:29 +0000320!elseif "$(CPUNR)" == "pentium4"
Bram Moolenaar34114692005-01-02 11:28:13 +0000321CPUARG = /G7 /arch:SSE2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000322!else
323CPUARG =
324!endif
325
326!ifdef NODEBUG
327VIM = vim
328!if "$(OPTIMIZE)" == "SPACE"
329OPTFLAG = /O1
330!elseif "$(OPTIMIZE)" == "SPEED"
331OPTFLAG = /O2
332!else # MAXSPEED
333OPTFLAG = /Ox
334!endif
Bram Moolenaar34114692005-01-02 11:28:13 +0000335CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000336RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000337! ifdef USE_MSVCRT
338CFLAGS = $(CFLAGS) -MD
339LIBC = msvcrt.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000340# CFLAGS = $(CFLAGS) $(cvarsdll)
341# ! elseif defined(MULTITHREADED)
342# LIBC = libcmt.lib
343# CFLAGS = $(CFLAGS) $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000344! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000345# LIBC = libc.lib
346LIBC = libcmt.lib
347# CFLAGS = $(CFLAGS) $(cvars)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000348! endif
349!else # DEBUG
350VIM = vimd
Bram Moolenaard9d30582005-05-18 22:10:28 +0000351CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
Bram Moolenaar071d4272004-06-13 20:20:40 +0000352RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
353# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
354! if "$(_NMAKE_VER)" == ""
355LIBC =
356! else
357LIBC = /fixed:no
358! endif
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000359! ifdef USE_MSVCRT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000360CFLAGS = $(CFLAGS) -MDd
361LIBC = $(LIBC) msvcrtd.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000362# CFLAGS = $(CFLAGS) $(cvarsdll)
363# ! elseif defined(MULTITHREADED)
364# LIBC = $(LIBC) libcmtd.lib
365# CFLAGS = $(CFLAGS) $(cvarsmt)
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000366! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000367# LIBC = $(LIBC) libcd.lib
368LIBC = $(LIBC) libcmtd.lib
369# CFLAGS = $(CFLAGS) $(cvars)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000370! endif
371!endif # DEBUG
372
373INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
374 proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \
375 $(NBDEBUG_INCL)
376
377OBJ = \
378 $(OUTDIR)\buffer.obj \
379 $(OUTDIR)\charset.obj \
380 $(OUTDIR)\diff.obj \
381 $(OUTDIR)\digraph.obj \
382 $(OUTDIR)\edit.obj \
383 $(OUTDIR)\eval.obj \
384 $(OUTDIR)\ex_cmds.obj \
385 $(OUTDIR)\ex_cmds2.obj \
386 $(OUTDIR)\ex_docmd.obj \
387 $(OUTDIR)\ex_eval.obj \
388 $(OUTDIR)\ex_getln.obj \
389 $(OUTDIR)\fileio.obj \
390 $(OUTDIR)\fold.obj \
391 $(OUTDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000392 $(OUTDIR)\hardcopy.obj \
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000393 $(OUTDIR)\hashtable.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000394 $(OUTDIR)\main.obj \
395 $(OUTDIR)\mark.obj \
396 $(OUTDIR)\mbyte.obj \
397 $(OUTDIR)\memfile.obj \
398 $(OUTDIR)\memline.obj \
399 $(OUTDIR)\menu.obj \
400 $(OUTDIR)\message.obj \
401 $(OUTDIR)\misc1.obj \
402 $(OUTDIR)\misc2.obj \
403 $(OUTDIR)\move.obj \
404 $(OUTDIR)\normal.obj \
405 $(OUTDIR)\ops.obj \
406 $(OUTDIR)\option.obj \
407 $(OUTDIR)\os_mswin.obj \
408 $(OUTDIR)\os_win32.obj \
409 $(OUTDIR)\pathdef.obj \
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000410 $(OUTDIR)\popupmenu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000411 $(OUTDIR)\quickfix.obj \
412 $(OUTDIR)\regexp.obj \
413 $(OUTDIR)\screen.obj \
414 $(OUTDIR)\search.obj \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000415 $(OUTDIR)\spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000416 $(OUTDIR)\syntax.obj \
417 $(OUTDIR)\tag.obj \
418 $(OUTDIR)\term.obj \
419 $(OUTDIR)\ui.obj \
420 $(OUTDIR)\undo.obj \
421 $(OUTDIR)\window.obj \
422 $(OUTDIR)\vim.res
423
424!if "$(OLE)" == "yes"
425CFLAGS = $(CFLAGS) -DFEAT_OLE
426RCFLAGS = $(RCFLAGS) -DFEAT_OLE
427OLE_OBJ = $(OUTDIR)\if_ole.obj
428OLE_IDL = if_ole.idl
429OLE_LIB = oleaut32.lib
430!endif
431
432!if "$(IME)" == "yes"
433CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME
434!ifndef DYNAMIC_IME
435DYNAMIC_IME = yes
436!endif
437!if "$(DYNAMIC_IME)" == "yes"
438CFLAGS = $(CFLAGS) -DDYNAMIC_IME
439!else
440IME_LIB = imm32.lib
441!endif
442!endif
443
444!if "$(GIME)" == "yes"
445CFLAGS = $(CFLAGS) -DGLOBAL_IME
446OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj
447MBYTE = yes
448!endif
449
450!if "$(MBYTE)" == "yes"
451CFLAGS = $(CFLAGS) -DFEAT_MBYTE
452!endif
453
454!if "$(GUI)" == "yes"
455SUBSYSTEM = windows
456CFLAGS = $(CFLAGS) -DFEAT_GUI_W32
457RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32
458VIM = g$(VIM)
459GUI_INCL = \
460 gui.h \
461 regexp.h \
462 ascii.h \
463 ex_cmds.h \
464 farsi.h \
465 feature.h \
466 globals.h \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000467 gui_beval.h \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000468 keymap.h \
469 macros.h \
470 option.h \
471 os_dos.h \
472 os_win32.h
473GUI_OBJ = \
474 $(OUTDIR)\gui.obj \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000475 $(OUTDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000476 $(OUTDIR)\gui_w32.obj \
477 $(OUTDIR)\os_w32exe.obj
478GUI_LIB = \
Bram Moolenaara3ffd9c2005-07-21 21:03:15 +0000479 oldnames.lib kernel32.lib gdi32.lib version.lib $(IME_LIB) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000480 winspool.lib comctl32.lib advapi32.lib shell32.lib \
481 /machine:$(CPU) /nodefaultlib
482!else
483SUBSYSTEM = console
484!endif
485
486# iconv.dll library (dynamically loaded)
487!ifndef ICONV
488ICONV = yes
489!endif
490!if "$(ICONV)" == "yes"
491CFLAGS = $(CFLAGS) -DDYNAMIC_ICONV
492!endif
493
494# libintl.dll library
495!ifndef GETTEXT
496GETTEXT = yes
497!endif
498!if "$(GETTEXT)" == "yes"
499CFLAGS = $(CFLAGS) -DDYNAMIC_GETTEXT
500!endif
501
502# TCL interface
503!ifdef TCL
504!ifndef TCL_VER
505TCL_VER = 83
506TCL_VER_LONG = 8.3
507!endif
508!message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)"
509!if "$(DYNAMIC_TCL)" == "yes"
510!message Tcl DLL will be loaded dynamically
511TCL_DLL = tcl$(TCL_VER).dll
Bram Moolenaarb6356332005-07-18 21:40:44 +0000512CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \
513 -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000514TCL_OBJ = $(OUTDIR)\if_tcl.obj
515TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
516TCL_LIB = $(TCL)\lib\tclstub$(TCL_VER).lib
517!else
518CFLAGS = $(CFLAGS) -DFEAT_TCL
519TCL_OBJ = $(OUTDIR)\if_tcl.obj
520TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
521TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib
522!endif
523!endif
524
525# PYTHON interface
526!ifdef PYTHON
527!ifndef PYTHON_VER
528PYTHON_VER = 22
529!endif
530!message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)"
531!if "$(DYNAMIC_PYTHON)" == "yes"
532!message Python DLL will be loaded dynamically
533!endif
534CFLAGS = $(CFLAGS) -DFEAT_PYTHON
535PYTHON_OBJ = $(OUTDIR)\if_python.obj
536PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC"
537!if "$(DYNAMIC_PYTHON)" == "yes"
Bram Moolenaarb6356332005-07-18 21:40:44 +0000538CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \
539 -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000540PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib
541!else
542PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
543!endif
544!endif
545
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000546# MzScheme interface
547!ifdef MZSCHEME
548!message MzScheme requested - root dir is "$(MZSCHEME)"
549!ifndef MZSCHEME_VER
550MZSCHEME_VER = 205_000
551!endif
552CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000553!if "$(DYNAMIC_MZSCHEME)" == "yes"
554!message MzScheme DLLs will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000555CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
556 -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" \
557 -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000558!else
Bram Moolenaarb6356332005-07-18 21:40:44 +0000559MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
560 $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000561!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000562MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
563!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000564
Bram Moolenaar071d4272004-06-13 20:20:40 +0000565# Perl interface
566!ifdef PERL
567!ifndef PERL_VER
568PERL_VER = 56
569!endif
570!message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)"
571!if "$(DYNAMIC_PERL)" == "yes"
572!if $(PERL_VER) >= 56
573!message Perl DLL will be loaded dynamically
574!else
575!message Dynamic loading is not supported for Perl versions earlier than 5.6.0
576!message Reverting to static loading...
577!undef DYNAMIC_PERL
578!endif
579!endif
580
581# Is Perl installed in architecture-specific directories?
582!if exist($(PERL)\Bin\MSWin32-x86)
583PERL_ARCH = \MSWin32-x86
584!endif
585
586PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core
587
588# Version-dependent stuff
589!if $(PERL_VER) == 55
590PERL_LIB = $(PERL_INCDIR)\perl.lib
591!else
592PERL_DLL = perl$(PERL_VER).dll
593PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib
594!endif
595
596CFLAGS = $(CFLAGS) -DFEAT_PERL
597
598# Do we want to load Perl dynamically?
599!if "$(DYNAMIC_PERL)" == "yes"
600CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
601!undef PERL_LIB
602!endif
603
604PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
605PERL_INC = /I $(PERL_INCDIR)
606PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
607XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
608XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
609
610!endif
611
612#
613# Support Ruby interface
614#
615!ifdef RUBY
616# Set default value
617!ifndef RUBY_VER
618RUBY_VER = 18
619!endif
620!ifndef RUBY_VER_LONG
621RUBY_VER_LONG = 1.8
622!endif
623
624!if $(RUBY_VER) >= 18
625!ifndef RUBY_PLATFORM
626RUBY_PLATFORM = i386-mswin32
627!endif
628!ifndef RUBY_INSTALL_NAME
629RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
630!endif
631!else
632!ifndef RUBY_PLATFORM
633RUBY_PLATFORM = i586-mswin32
634!endif
635!ifndef RUBY_INSTALL_NAME
636RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
637!endif
638!endif # $(RUBY_VER) >= 18
639
640!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
641CFLAGS = $(CFLAGS) -DFEAT_RUBY
642RUBY_OBJ = $(OUTDIR)\if_ruby.obj
643RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
644RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
645# Do we want to load Ruby dynamically?
646!if "$(DYNAMIC_RUBY)" == "yes"
647!message Ruby DLL will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000648CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=$(RUBY_VER) \
649 -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000650!undef RUBY_LIB
651!endif
652!endif # RUBY
653
654#
655# Support PostScript printing
656#
657!if "$(POSTSCRIPT)" == "yes"
658CFLAGS = $(CFLAGS) -DMSWINPS
659!endif # POSTSCRIPT
660
661#
662# FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
663#
664!if "$(FEATURES)"==""
665FEATURES = BIG
666!endif
667CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
668
669#
Bram Moolenaard9d30582005-05-18 22:10:28 +0000670# Always generate the .pdb file, so that we get debug symbols that can be used
671# on a crash (doesn't add overhead to the executable).
672#
Bram Moolenaarb6356332005-07-18 21:40:44 +0000673CFLAGS = $(CFLAGS) /Zi /Fd$(OUTDIR)/
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000674LINK_PDB = /PDB:$(OUTDIR)/$(VIM).pdb -debug # -debug:full -debugtype:cv,fixup
Bram Moolenaard9d30582005-05-18 22:10:28 +0000675
676#
677# End extra feature include
Bram Moolenaar071d4272004-06-13 20:20:40 +0000678#
679!message
680
681conflags = /nologo /subsystem:$(SUBSYSTEM) /incremental:no
682
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000683PATHDEF_SRC = $(OUTDIR)\pathdef.c
684
Bram Moolenaar071d4272004-06-13 20:20:40 +0000685!IF "$(MAP)" == "yes"
686# "/map" is for debugging
687conflags = $(conflags) /map
688!ELSEIF "$(MAP)" == "lines"
689# "/mapinfo:lines" is for debugging, only works for VC6 and later
690conflags = $(conflags) /map /mapinfo:lines
691!ENDIF
692
693LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc
694LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000695 $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \
696 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000697
Bram Moolenaarb6356332005-07-18 21:40:44 +0000698all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \
699 GvimExt/gvimext.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +0000700
Bram Moolenaarb6356332005-07-18 21:40:44 +0000701$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
702 $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
703 $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) version.c version.h
704 $(CC) $(CFLAGS) version.c
Bram Moolenaar0dc065e2005-07-04 22:49:24 +0000705 $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000706 $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) \
707 $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
708 $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000709
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000710$(VIM): $(VIM).exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000711
712$(OUTDIR):
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000713 if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000714
715install.exe: dosinst.c
Bram Moolenaarb6356332005-07-18 21:40:44 +0000716 $(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \
717 ole32.lib advapi32.lib uuid.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000718 - if exist install.exe del install.exe
719 ren dosinst.exe install.exe
720
721uninstal.exe: uninstal.c
722 $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
723
724vimrun.exe: vimrun.c
725 $(CC) /nologo -DNDEBUG vimrun.c
726
727xxd/xxd.exe: xxd/xxd.c
728 cd xxd
729 $(MAKE) /NOLOGO -f Make_mvc.mak
730 cd ..
731
732GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
733 cd GvimExt
734 $(MAKE) /NOLOGO -f Makefile $(MAKEFLAGS_GVIMEXT)
735 cd ..
736
737
738tags: notags
739 $(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro
740
741notags:
742 - if exist tags del tags
743
744clean:
Bram Moolenaar02743632005-07-25 20:42:36 +0000745 - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000746 - if exist *.obj del *.obj
747 - if exist $(VIM).exe del $(VIM).exe
748 - if exist $(VIM).ilk del $(VIM).ilk
749 - if exist $(VIM).pdb del $(VIM).pdb
750 - if exist $(VIM).map del $(VIM).map
751 - if exist $(VIM).ncb del $(VIM).ncb
752 - if exist vimrun.exe del vimrun.exe
753 - if exist install.exe del install.exe
754 - if exist uninstal.exe del uninstal.exe
755 - if exist if_perl.c del if_perl.c
756 - if exist dimm.h del dimm.h
757 - if exist dimm_i.c del dimm_i.c
758 - if exist dimm.tlb del dimm.tlb
759 - if exist dosinst.exe del dosinst.exe
760 cd xxd
761 $(MAKE) /NOLOGO -f Make_mvc.mak clean
762 cd ..
763 cd GvimExt
764 $(MAKE) /NOLOGO -f Makefile clean
765 cd ..
766 cd GvimExt
767 $(MAKE) /NOLOGO -f Makefile clean
768 cd ..
769 - if exist testdir\*.out del testdir\*.out
770
771test:
772 cd testdir
773 $(MAKE) /NOLOGO -f Make_dos.mak win32
774 cd ..
775
Bram Moolenaar34114692005-01-02 11:28:13 +0000776testclean:
777 cd testdir
778 $(MAKE) /NOLOGO -f Make_dos.mak clean
779 cd ..
780
Bram Moolenaar071d4272004-06-13 20:20:40 +0000781###########################################################################
782
783# Create a default rule for transforming .c files to .obj files in $(OUTDIR)
784# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
785!IF "$(_NMAKE_VER)" == ""
786.c{$(OUTDIR)/}.obj:
787!ELSE
788.c{$(OUTDIR)/}.obj::
789!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000790 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000791
792# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
793# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
794!IF "$(_NMAKE_VER)" == ""
795.cpp{$(OUTDIR)/}.obj:
796!ELSE
797.cpp{$(OUTDIR)/}.obj::
798!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000799 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000800
801$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
802
803$(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
804
805$(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
806
807$(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL)
808
809$(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL)
810
811$(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL)
812
813$(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL)
814
815$(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL)
816
817$(OUTDIR)/ex_docmd.obj: $(OUTDIR) ex_docmd.c $(INCL) ex_cmds.h
818
819$(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h
820
821$(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL)
822
823$(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
824
825$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
826
827$(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL)
828
Bram Moolenaar58d98232005-07-23 22:25:46 +0000829$(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL)
830
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000831$(OUTDIR)/hashtable.obj: $(OUTDIR) hashtable.c $(INCL)
832
Bram Moolenaar071d4272004-06-13 20:20:40 +0000833$(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL)
834
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000835$(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
836
Bram Moolenaar071d4272004-06-13 20:20:40 +0000837$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL)
838
839$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
840
841if_perl.c : if_perl.xs typemap
Bram Moolenaarb6356332005-07-18 21:40:44 +0000842 $(PERL_EXE) $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
843 -typemap typemap if_perl.xs > if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000844
845$(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000846 $(CC) $(CFLAGS) $(PERL_INC) if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000847
848$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000849 $(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000850
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000851$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL)
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000852 $(CC) $(CFLAGS) if_mzsch.c \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000853 -DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000854
Bram Moolenaar071d4272004-06-13 20:20:40 +0000855$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000856 $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000857
858$(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h
859
860$(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000861 $(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000862
863$(OUTDIR)/if_sniff.obj: $(OUTDIR) if_sniff.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000864 $(CC) $(CFLAGS) if_sniff.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000865
866$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000867 $(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000868
869$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL)
870
871$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL)
872
873$(OUTDIR)/memfile.obj: $(OUTDIR) memfile.c $(INCL)
874
875$(OUTDIR)/memline.obj: $(OUTDIR) memline.c $(INCL)
876
877$(OUTDIR)/menu.obj: $(OUTDIR) menu.c $(INCL)
878
879$(OUTDIR)/message.obj: $(OUTDIR) message.c $(INCL)
880
881$(OUTDIR)/misc1.obj: $(OUTDIR) misc1.c $(INCL)
882
883$(OUTDIR)/misc2.obj: $(OUTDIR) misc2.c $(INCL)
884
885$(OUTDIR)/move.obj: $(OUTDIR) move.c $(INCL)
886
887$(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL)
888
889$(OUTDIR)/netbeans.obj: $(OUTDIR) netbeans.c $(NBDEBUG_SRC) $(INCL)
890
891$(OUTDIR)/normal.obj: $(OUTDIR) normal.c $(INCL)
892
893$(OUTDIR)/option.obj: $(OUTDIR) option.c $(INCL)
894
895$(OUTDIR)/ops.obj: $(OUTDIR) ops.c $(INCL)
896
897$(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL)
898
899$(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h
900
901$(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
902
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000903$(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
904 $(CC) $(CFLAGS) $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000906$(OUTDIR)/popupmenu.obj: $(OUTDIR) popupmenu.c $(INCL)
907
Bram Moolenaar071d4272004-06-13 20:20:40 +0000908$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
909
910$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c $(INCL)
911
912$(OUTDIR)/screen.obj: $(OUTDIR) screen.c $(INCL)
913
914$(OUTDIR)/search.obj: $(OUTDIR) search.c $(INCL)
915
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000916$(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL)
917
Bram Moolenaar071d4272004-06-13 20:20:40 +0000918$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
919
920$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
921
922$(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL)
923
924$(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
925
926$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
927
928$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
929
930$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
Bram Moolenaarb6356332005-07-18 21:40:44 +0000931 $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000932
Bram Moolenaarb6356332005-07-18 21:40:44 +0000933$(OUTDIR)/vim.res: $(OUTDIR) vim.rc version.h tools.bmp tearoff.bmp \
934 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
Bram Moolenaar071d4272004-06-13 20:20:40 +0000935 $(RC) /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc
936
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000937iid_ole.c if_ole.h vim.tlb: if_ole.idl
Bram Moolenaarb6356332005-07-18 21:40:44 +0000938 midl /nologo /error none /proxy nul /iid iid_ole.c /tlb vim.tlb \
939 /header if_ole.h if_ole.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +0000940
941dimm.h dimm_i.c: dimm.idl
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000942 midl /nologo /error none /proxy nul dimm.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +0000943
944$(OUTDIR)/dimm_i.obj: $(OUTDIR) dimm_i.c $(INCL)
945
946$(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
947
Bram Moolenaar89cb5e02004-07-19 20:55:54 +0000948# $CFLAGS may contain backslashes and double quotes, escape them both.
949E0_CFLAGS = $(CFLAGS:\=\\)
950E_CFLAGS = $(E0_CFLAGS:"=\")
951
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000952$(PATHDEF_SRC): auto
953 @echo creating $(PATHDEF_SRC)
954 @echo /* pathdef.c */ > $(PATHDEF_SRC)
955 @echo #include "vim.h" >> $(PATHDEF_SRC)
956 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC)
957 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC)
958 @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC)
959 @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC)
960 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
961 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000962
963auto:
964 if not exist auto/nul mkdir auto
965
966# End Custom Build
967proto.h: \
968 proto/buffer.pro \
969 proto/charset.pro \
970 proto/diff.pro \
971 proto/digraph.pro \
972 proto/edit.pro \
973 proto/eval.pro \
974 proto/ex_cmds.pro \
975 proto/ex_cmds2.pro \
976 proto/ex_docmd.pro \
977 proto/ex_eval.pro \
978 proto/ex_getln.pro \
979 proto/fileio.pro \
980 proto/getchar.pro \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000981 proto/hardcopy.pro \
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000982 proto/hashtable.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000983 proto/main.pro \
984 proto/mark.pro \
985 proto/memfile.pro \
986 proto/memline.pro \
987 proto/menu.pro \
988 proto/message.pro \
989 proto/misc1.pro \
990 proto/misc2.pro \
991 proto/move.pro \
992 proto/mbyte.pro \
993 proto/normal.pro \
994 proto/ops.pro \
995 proto/option.pro \
996 proto/os_mswin.pro \
997 proto/os_win32.pro \
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000998 proto/popupmenu.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000999 proto/quickfix.pro \
1000 proto/regexp.pro \
1001 proto/screen.pro \
1002 proto/search.pro \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +00001003 proto/spell.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001004 proto/syntax.pro \
1005 proto/tag.pro \
1006 proto/term.pro \
1007 proto/ui.pro \
1008 proto/undo.pro \
1009 proto/window.pro \
1010 $(NETBEANS_PRO)
1011
Bram Moolenaar362e1a32006-03-06 23:29:24 +00001012.cod.c:
1013 $(CC) $(CFLAGS) /FAc $<
1014
1015
Bram Moolenaar071d4272004-06-13 20:20:40 +00001016# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: