blob: b407fbe06f2750b744466784412d612d0e7d494e [file] [log] [blame]
Bram Moolenaareb3593b2006-04-22 22:33:57 +00001# Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
2# and Win64, using the Microsoft Visual C++ compilers. Known to work with
3# VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), and VC8 (VS2005).
Bram Moolenaar071d4272004-06-13 20:20:40 +00004#
Bram Moolenaareb3593b2006-04-22 22:33:57 +00005# To build using other Windows compilers, see INSTALLpc.txt
Bram Moolenaar7887d882005-07-01 22:33:52 +00006#
Bram Moolenaar071d4272004-06-13 20:20:40 +00007# This makefile can build the console, GUI, OLE-enable, Perl-enabled and
8# Python-enabled versions of vim for Win32 platforms.
9#
Bram Moolenaar071d4272004-06-13 20:20:40 +000010# The basic command line to build vim is:
Bram Moolenaar7887d882005-07-01 22:33:52 +000011#
Bram Moolenaar071d4272004-06-13 20:20:40 +000012# nmake -f Make_mvc.mak
Bram Moolenaar7887d882005-07-01 22:33:52 +000013#
Bram Moolenaar071d4272004-06-13 20:20:40 +000014# This will build the console version of vim with no additional interfaces.
Bram Moolenaar7887d882005-07-01 22:33:52 +000015# To add features, define any of the following:
16#
17# !!!! After changing features do "nmake clean" first !!!!
18#
19# Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is BIG)
20#
Bram Moolenaar071d4272004-06-13 20:20:40 +000021# GUI interface: GUI=yes (default is no)
Bram Moolenaar7887d882005-07-01 22:33:52 +000022#
Bram Moolenaar071d4272004-06-13 20:20:40 +000023# OLE interface: OLE=yes (usually with GUI=yes)
Bram Moolenaar7887d882005-07-01 22:33:52 +000024#
Bram Moolenaara83c3e02006-03-17 23:10:44 +000025# Multibyte support: MBYTE=yes (default is no)
Bram Moolenaar7887d882005-07-01 22:33:52 +000026#
Bram Moolenaar071d4272004-06-13 20:20:40 +000027# IME support: IME=yes (requires GUI=yes)
28# DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default
29# is yes)
30# Global IME support: GIME=yes (requires GUI=yes)
Bram Moolenaar7887d882005-07-01 22:33:52 +000031#
Bram Moolenaar65c1b012005-01-31 19:02:28 +000032# MzScheme interface:
33# MZSCHEME=[Path to MzScheme directory]
34# DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically)
35# MZSCHEME_VER=[version, 205_000, ...]
Bram Moolenaar7887d882005-07-01 22:33:52 +000036#
Bram Moolenaar071d4272004-06-13 20:20:40 +000037# Perl interface:
38# PERL=[Path to Perl directory]
39# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
Bram Moolenaar7887d882005-07-01 22:33:52 +000040# PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc]
41# (default is 56)
42#
Bram Moolenaar071d4272004-06-13 20:20:40 +000043# Python interface:
44# PYTHON=[Path to Python directory]
45# DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
46# PYTHON_VER=[Python version, eg 15, 20] (default is 22)
Bram Moolenaar7887d882005-07-01 22:33:52 +000047#
Bram Moolenaar071d4272004-06-13 20:20:40 +000048# Ruby interface:
49# RUBY=[Path to Ruby directory]
50# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
51# RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
52# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
53# You must set RUBY_VER_LONG when change RUBY_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000054#
Bram Moolenaar071d4272004-06-13 20:20:40 +000055# Tcl interface:
56# TCL=[Path to Tcl directory]
57# DYNAMIC_TCL=yes (to load the Tcl DLL dynamically)
58# TCL_VER=[Tcl version, e.g. 80, 83] (default is 83)
59# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
60# You must set TCL_VER_LONG when you set TCL_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000061#
62# SNiFF+ interface: SNIFF=yes
63#
64# Cscope support: CSCOPE=yes
65#
66# Iconv library support (always dynamically loaded):
67# ICONV=[yes or no] (default is yes)
68#
69# Intl library support (always dynamically loaded):
70# GETTEXT=[yes or no] (default is yes)
71# See http://sourceforge.net/projects/gettext/
72#
73# PostScript printing: POSTSCRIPT=yes (default is no)
74#
75# Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
76#
77# XPM Image Support: XPM=[path to XPM directory]
78#
79# Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
80#
81# Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is
82# i386)
83#
84# Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400)
85#
Bram Moolenaar071d4272004-06-13 20:20:40 +000086# Debug version: DEBUG=yes
87# Mapfile: MAP=[no, yes or lines] (default is yes)
88# no: Don't write a mapfile.
89# yes: Write a normal mapfile.
90# lines: Write a mapfile with line numbers (only for VC6 and later)
Bram Moolenaar7887d882005-07-01 22:33:52 +000091#
92# Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
93# doesn't work)
Bram Moolenaar071d4272004-06-13 20:20:40 +000094#
Bram Moolenaarf22129b2007-10-03 11:29:44 +000095# Visual C Version: MSVCVER=m.n (default derived from nmake if undefined)
96#
Bram Moolenaar071d4272004-06-13 20:20:40 +000097# You can combine any of these interfaces
98#
99# Example: To build the non-debug, GUI version with Perl interface:
100# nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
101#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000102# DEBUG with Make_mvc.mak and Make_dvc.mak:
103# This makefile gives a fineness of control which is not supported in
104# Visual C++ configuration files. Therefore, debugging requires a bit of
105# extra work.
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000106# Make_dvc.mak is a Visual C++ project to access that support. It may be
107# badly out of date for the Visual C++ you are using...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000108# To use Make_dvc.mak:
109# 1) Build Vim with Make_mvc.mak.
110# Use a "DEBUG=yes" argument to build Vim with debug support.
111# E.g. the following builds gvimd.exe:
112# nmake -f Make_mvc.mak debug=yes gui=yes
113# 2) Use MS Devstudio and set it up to allow that file to be debugged:
114# i) Pass Make_dvc.mak to the IDE.
115# Use the "open workspace" menu entry to load Make_dvc.mak.
116# Alternatively, from the command line:
117# msdev /nologo Make_dvc.mak
118# Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
119# this and offer to convert it to their own format. Accept that.
120# It creates a file called Make_dvc.dsw which can then be used
121# for further operations. E.g.
122# msdev /nologo Make_dvc.dsw
123# ii) Set the built executable for debugging:
124# a) Alt+F7/Debug takes you to the Debug dialog.
125# b) Fill "Executable for debug session". e.g. gvimd.exe
126# c) Fill "Program arguments". e.g. -R dosinst.c
127# d) Complete the dialog
128# 3) You can now debug the executable you built with Make_mvc.mak
129#
130# Note: Make_dvc.mak builds vimrun.exe, because it must build something
131# to be a valid makefile..
132
133### See feature.h for a list of optionals.
134# If you want to build some optional features without modifying the source,
135# you can set DEFINES on the command line, e.g.,
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000136# nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000137
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000138# Build on both Windows NT/XP and Windows 9x
Bram Moolenaar071d4272004-06-13 20:20:40 +0000139
140TARGETOS = BOTH
141
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000142# Select one of eight object code directories, depends on GUI, OLE, DEBUG and
143# interfaces.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000144# If you change something else, do "make clean" first!
145!if "$(GUI)" == "yes"
146OBJDIR = .\ObjG
147!else
148OBJDIR = .\ObjC
149!endif
150!if "$(OLE)" == "yes"
151OBJDIR = $(OBJDIR)O
152!endif
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000153!ifdef PERL
154OBJDIR = $(OBJDIR)L
155!endif
156!ifdef PYTHON
157OBJDIR = $(OBJDIR)Y
158!endif
159!ifdef TCL
160OBJDIR = $(OBJDIR)T
161!endif
162!ifdef RUBY
163OBJDIR = $(OBJDIR)R
164!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000165!ifdef MZSCHEME
166OBJDIR = $(OBJDIR)Z
167!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000168!if "$(DEBUG)" == "yes"
169OBJDIR = $(OBJDIR)d
170!endif
171
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000172# Win32.mak requires that CPU be set appropriately.
173# To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000174
175!ifdef PROCESSOR_ARCHITECTURE
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000176# We're on Windows NT or using VC 6+
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000177! ifdef CPU
178ASSEMBLY_ARCHITECTURE=$(CPU)
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000179# Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7.
180! if ("$(ASSEMBLY_ARCHITECTURE)" == "i386") || ("$(ASSEMBLY_ARCHITECTURE)" == "I386")
181ASSEMBLY_ARCHITECTURE = x86
182! endif
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000183! else
Bram Moolenaar071d4272004-06-13 20:20:40 +0000184CPU = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000185ASSEMBLY_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000186! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000187CPU = i386
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000188! endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000189! endif
190!else # !PROCESSOR_ARCHITECTURE
191# We're on Windows 95
192CPU = i386
193!endif # !PROCESSOR_ARCHITECTURE
194
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000195!if ("$(CPU)" == "AMD64") || ("$(CPU)" == "IA64")
196DEFINES=$(DEFINES) /Wp64
197!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000198
199# Build a retail version by default
200
201!if "$(DEBUG)" != "yes"
202NODEBUG = 1
203!else
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000204!undef NODEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000205MAKEFLAGS_GVIMEXT = DEBUG=yes
206!endif
207
208
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000209# Get all sorts of useful, standard macros from the Platform SDK.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000210
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000211!include <Win32.mak>
Bram Moolenaar071d4272004-06-13 20:20:40 +0000212
213
214#>>>>> path of the compiler and linker; name of include and lib directories
215# PATH = c:\msvc20\bin;$(PATH)
216# INCLUDE = c:\msvc20\include
217# LIB = c:\msvc20\lib
218
219!ifndef CTAGS
220CTAGS = ctags
221!endif
222
223!if "$(SNIFF)" == "yes"
224# SNIFF - Include support for SNiFF+.
225SNIFF_INCL = if_sniff.h
226SNIFF_OBJ = $(OBJDIR)/if_sniff.obj
Bram Moolenaarb6356332005-07-18 21:40:44 +0000227SNIFF_LIB = shell32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000228SNIFF_DEFS = -DFEAT_SNIFF
229# The SNiFF integration needs multithreaded libraries!
230MULTITHREADED = yes
231!endif
232
233!ifndef CSCOPE
234CSCOPE = yes
235!endif
236
237!if "$(CSCOPE)" == "yes"
238# CSCOPE - Include support for Cscope
239CSCOPE_INCL = if_cscope.h
240CSCOPE_OBJ = $(OBJDIR)/if_cscope.obj
241CSCOPE_DEFS = -DFEAT_CSCOPE
242!endif
243
244!ifndef NETBEANS
245NETBEANS = $(GUI)
246!endif
247
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000248# Only allow NETBEANS and XPM for a GUI build.
249!if "$(GUI)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000250!if "$(NETBEANS)" == "yes"
251# NETBEANS - Include support for Netbeans integration
252NETBEANS_PRO = proto/netbeans.pro
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000253NETBEANS_OBJ = $(OBJDIR)/netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000254NETBEANS_DEFS = -DFEAT_NETBEANS_INTG
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000255
256!if "$(NBDEBUG)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000257NBDEBUG_DEFS = -DNBDEBUG
258NBDEBUG_INCL = nbdebug.h
259NBDEBUG_SRC = nbdebug.c
260!endif
Bram Moolenaarb6356332005-07-18 21:40:44 +0000261NETBEANS_LIB = WSock32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000262!endif
263
264!ifdef XPM
265# XPM - Include support for XPM signs
266# you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
267XPM_OBJ = $(OBJDIR)/xpm_w32.obj
268XPM_DEFS = -DFEAT_XPM_W32
269XPM_LIB = $(XPM)\lib\libXpm.lib
270XPM_INC = -I $(XPM)\include
271!endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000272!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000273
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000274# Set which version of the CRT to use
Bram Moolenaar071d4272004-06-13 20:20:40 +0000275!if defined(USE_MSVCRT)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000276# CVARS = $(cvarsdll)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000277# !elseif defined(MULTITHREADED)
278# CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000279!else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000280# CVARS = $(cvars)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000281# CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000282!endif
283
284# need advapi32.lib for GetUserName()
285# need shell32.lib for ExtractIcon()
286# gdi32.lib and comdlg32.lib for printing support
287# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
288CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000289!if "$(DELAYLOAD)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000290CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
291!endif
292
293### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
294# When set to 0x0500 ":browse" stops working.
295!ifndef WINVER
296WINVER = 0x0400
297!endif
298
299# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
300# default, use these lines.
301#VIMRCLOC = somewhere
302#VIMRUNTIMEDIR = somewhere
303
304CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
305 $(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) \
306 $(NBDEBUG_DEFS) $(XPM_DEFS) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000307 $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
308 /Fo$(OUTDIR)/
Bram Moolenaar071d4272004-06-13 20:20:40 +0000309
310#>>>>> end of choices
311###########################################################################
312
313!ifdef OS
314OS_TYPE = winnt
315DEL_TREE = rmdir /s /q
316!else
317OS_TYPE = win95
318DEL_TREE = deltree /y
319!endif
320
321INTDIR=$(OBJDIR)
322OUTDIR=$(OBJDIR)
323
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000324# Derive version of VC being used from nmake if not specified
325!if "$(MSVCVER)" == ""
326!if "$(_NMAKE_VER)" == ""
327MSVCVER = 4.0
328!endif
329!if "$(_NMAKE_VER)" == "162"
330MSVCVER = 5.0
331!endif
332!if "$(_NMAKE_VER)" == "6.00.8168.0"
333MSVCVER = 6.0
334!endif
335!if "$(_NMAKE_VER)" == "7.00.9466"
336MSVCVER = 7.0
337!endif
338!if "$(_NMAKE_VER)" == "7.10.3077"
339MSVCVER = 7.1
340!endif
341!if "$(_NMAKE_VER)" == "8.00.50727.42"
342MSVCVER = 8.0
343!endif
344!if "$(_NMAKE_VER)" == "8.00.50727.762"
345MSVCVER = 8.0
346!endif
347!endif
348
349# Abort bulding VIM if version of VC is unrecognised.
350!ifndef MSVCVER
351!message *** ERROR
352!message Cannot determine Visual C version being used. If you are using the
353!message Windows SDK then you must have the environment variable MSVCVER set to
354!message your version of the VC compiler. If you are not using the Express
355!message version of Visual C you van either set MSVCVER or update this makefile
356!message to handle the new value for _NMAKE_VER.
357!error Make aborted.
358!endif
359
Bram Moolenaar071d4272004-06-13 20:20:40 +0000360# Convert processor ID to MVC-compatible number
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000361!if "$(MSVCVER)" != "8.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000362!if "$(CPUNR)" == "i386"
363CPUARG = /G3
364!elseif "$(CPUNR)" == "i486"
365CPUARG = /G4
366!elseif "$(CPUNR)" == "i586"
367CPUARG = /G5
368!elseif "$(CPUNR)" == "i686"
369CPUARG = /G6
Bram Moolenaarcf3630f2005-01-08 16:04:29 +0000370!elseif "$(CPUNR)" == "pentium4"
Bram Moolenaar34114692005-01-02 11:28:13 +0000371CPUARG = /G7 /arch:SSE2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000372!else
373CPUARG =
374!endif
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000375!else
376# VC8 only allows specifying SSE architecture
377!if "$(CPUNR)" == "pentium4"
378CPUARG = /arch:SSE2
379!endif
380!endif
381
382LIBC =
383DEBUGINFO = /Zi
Bram Moolenaar071d4272004-06-13 20:20:40 +0000384
385!ifdef NODEBUG
386VIM = vim
387!if "$(OPTIMIZE)" == "SPACE"
388OPTFLAG = /O1
389!elseif "$(OPTIMIZE)" == "SPEED"
390OPTFLAG = /O2
391!else # MAXSPEED
392OPTFLAG = /Ox
393!endif
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000394!if "$(MSVCVER)" == "8.0"
395# Use link time code generation if not worried about size
396!if "$(OPTIMIZE)" != "SPACE"
397OPTFLAG = $(OPTFLAG) /GL
398!endif
399!endif
Bram Moolenaar34114692005-01-02 11:28:13 +0000400CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000401RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000402! ifdef USE_MSVCRT
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000403CFLAGS = $(CFLAGS) /MD
Bram Moolenaar071d4272004-06-13 20:20:40 +0000404LIBC = msvcrt.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000405! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000406LIBC = libcmt.lib
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000407CFLAGS = $(CFLAGS) /MT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000408! endif
409!else # DEBUG
410VIM = vimd
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000411! if "$(CPU)" == "i386"
412DEBUGINFO = /ZI
413! endif
Bram Moolenaard9d30582005-05-18 22:10:28 +0000414CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
Bram Moolenaar071d4272004-06-13 20:20:40 +0000415RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
416# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000417! if "$(MSVCVER)" == "4.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000418LIBC =
419! else
420LIBC = /fixed:no
421! endif
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000422! ifdef USE_MSVCRT
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000423CFLAGS = $(CFLAGS) /MDd
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424LIBC = $(LIBC) msvcrtd.lib
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000425! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000426LIBC = $(LIBC) libcmtd.lib
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000427CFLAGS = $(CFLAGS) /MTd
Bram Moolenaar071d4272004-06-13 20:20:40 +0000428! endif
429!endif # DEBUG
430
431INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
432 proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \
433 $(NBDEBUG_INCL)
434
435OBJ = \
436 $(OUTDIR)\buffer.obj \
437 $(OUTDIR)\charset.obj \
438 $(OUTDIR)\diff.obj \
439 $(OUTDIR)\digraph.obj \
440 $(OUTDIR)\edit.obj \
441 $(OUTDIR)\eval.obj \
442 $(OUTDIR)\ex_cmds.obj \
443 $(OUTDIR)\ex_cmds2.obj \
444 $(OUTDIR)\ex_docmd.obj \
445 $(OUTDIR)\ex_eval.obj \
446 $(OUTDIR)\ex_getln.obj \
447 $(OUTDIR)\fileio.obj \
448 $(OUTDIR)\fold.obj \
449 $(OUTDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000450 $(OUTDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000451 $(OUTDIR)\hashtab.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000452 $(OUTDIR)\main.obj \
453 $(OUTDIR)\mark.obj \
454 $(OUTDIR)\mbyte.obj \
455 $(OUTDIR)\memfile.obj \
456 $(OUTDIR)\memline.obj \
457 $(OUTDIR)\menu.obj \
458 $(OUTDIR)\message.obj \
459 $(OUTDIR)\misc1.obj \
460 $(OUTDIR)\misc2.obj \
461 $(OUTDIR)\move.obj \
462 $(OUTDIR)\normal.obj \
463 $(OUTDIR)\ops.obj \
464 $(OUTDIR)\option.obj \
465 $(OUTDIR)\os_mswin.obj \
466 $(OUTDIR)\os_win32.obj \
467 $(OUTDIR)\pathdef.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000468 $(OUTDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000469 $(OUTDIR)\quickfix.obj \
470 $(OUTDIR)\regexp.obj \
471 $(OUTDIR)\screen.obj \
472 $(OUTDIR)\search.obj \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000473 $(OUTDIR)\spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000474 $(OUTDIR)\syntax.obj \
475 $(OUTDIR)\tag.obj \
476 $(OUTDIR)\term.obj \
477 $(OUTDIR)\ui.obj \
478 $(OUTDIR)\undo.obj \
479 $(OUTDIR)\window.obj \
480 $(OUTDIR)\vim.res
481
482!if "$(OLE)" == "yes"
483CFLAGS = $(CFLAGS) -DFEAT_OLE
484RCFLAGS = $(RCFLAGS) -DFEAT_OLE
485OLE_OBJ = $(OUTDIR)\if_ole.obj
486OLE_IDL = if_ole.idl
487OLE_LIB = oleaut32.lib
488!endif
489
490!if "$(IME)" == "yes"
491CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME
492!ifndef DYNAMIC_IME
493DYNAMIC_IME = yes
494!endif
495!if "$(DYNAMIC_IME)" == "yes"
496CFLAGS = $(CFLAGS) -DDYNAMIC_IME
497!else
498IME_LIB = imm32.lib
499!endif
500!endif
501
502!if "$(GIME)" == "yes"
503CFLAGS = $(CFLAGS) -DGLOBAL_IME
504OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj
505MBYTE = yes
506!endif
507
508!if "$(MBYTE)" == "yes"
509CFLAGS = $(CFLAGS) -DFEAT_MBYTE
510!endif
511
512!if "$(GUI)" == "yes"
513SUBSYSTEM = windows
514CFLAGS = $(CFLAGS) -DFEAT_GUI_W32
515RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32
516VIM = g$(VIM)
517GUI_INCL = \
518 gui.h \
519 regexp.h \
520 ascii.h \
521 ex_cmds.h \
522 farsi.h \
523 feature.h \
524 globals.h \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000525 gui_beval.h \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000526 keymap.h \
527 macros.h \
528 option.h \
529 os_dos.h \
530 os_win32.h
531GUI_OBJ = \
532 $(OUTDIR)\gui.obj \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000533 $(OUTDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000534 $(OUTDIR)\gui_w32.obj \
535 $(OUTDIR)\os_w32exe.obj
536GUI_LIB = \
Bram Moolenaara3ffd9c2005-07-21 21:03:15 +0000537 oldnames.lib kernel32.lib gdi32.lib version.lib $(IME_LIB) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000538 winspool.lib comctl32.lib advapi32.lib shell32.lib \
539 /machine:$(CPU) /nodefaultlib
540!else
541SUBSYSTEM = console
542!endif
543
544# iconv.dll library (dynamically loaded)
545!ifndef ICONV
546ICONV = yes
547!endif
548!if "$(ICONV)" == "yes"
549CFLAGS = $(CFLAGS) -DDYNAMIC_ICONV
550!endif
551
552# libintl.dll library
553!ifndef GETTEXT
554GETTEXT = yes
555!endif
556!if "$(GETTEXT)" == "yes"
557CFLAGS = $(CFLAGS) -DDYNAMIC_GETTEXT
558!endif
559
560# TCL interface
561!ifdef TCL
562!ifndef TCL_VER
563TCL_VER = 83
564TCL_VER_LONG = 8.3
565!endif
566!message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)"
567!if "$(DYNAMIC_TCL)" == "yes"
568!message Tcl DLL will be loaded dynamically
569TCL_DLL = tcl$(TCL_VER).dll
Bram Moolenaarb6356332005-07-18 21:40:44 +0000570CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \
571 -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000572TCL_OBJ = $(OUTDIR)\if_tcl.obj
573TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
574TCL_LIB = $(TCL)\lib\tclstub$(TCL_VER).lib
575!else
576CFLAGS = $(CFLAGS) -DFEAT_TCL
577TCL_OBJ = $(OUTDIR)\if_tcl.obj
578TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
579TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib
580!endif
581!endif
582
583# PYTHON interface
584!ifdef PYTHON
585!ifndef PYTHON_VER
586PYTHON_VER = 22
587!endif
588!message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)"
589!if "$(DYNAMIC_PYTHON)" == "yes"
590!message Python DLL will be loaded dynamically
591!endif
592CFLAGS = $(CFLAGS) -DFEAT_PYTHON
593PYTHON_OBJ = $(OUTDIR)\if_python.obj
594PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC"
595!if "$(DYNAMIC_PYTHON)" == "yes"
Bram Moolenaarb6356332005-07-18 21:40:44 +0000596CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \
597 -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000598PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib
599!else
600PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
601!endif
602!endif
603
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000604# MzScheme interface
605!ifdef MZSCHEME
606!message MzScheme requested - root dir is "$(MZSCHEME)"
607!ifndef MZSCHEME_VER
608MZSCHEME_VER = 205_000
609!endif
610CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000611!if "$(DYNAMIC_MZSCHEME)" == "yes"
612!message MzScheme DLLs will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000613CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
614 -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" \
615 -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000616!else
Bram Moolenaarb6356332005-07-18 21:40:44 +0000617MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
618 $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000619!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000620MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
621!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000622
Bram Moolenaar071d4272004-06-13 20:20:40 +0000623# Perl interface
624!ifdef PERL
625!ifndef PERL_VER
626PERL_VER = 56
627!endif
628!message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)"
629!if "$(DYNAMIC_PERL)" == "yes"
630!if $(PERL_VER) >= 56
631!message Perl DLL will be loaded dynamically
632!else
633!message Dynamic loading is not supported for Perl versions earlier than 5.6.0
634!message Reverting to static loading...
635!undef DYNAMIC_PERL
636!endif
637!endif
638
639# Is Perl installed in architecture-specific directories?
640!if exist($(PERL)\Bin\MSWin32-x86)
641PERL_ARCH = \MSWin32-x86
642!endif
643
644PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core
645
646# Version-dependent stuff
647!if $(PERL_VER) == 55
648PERL_LIB = $(PERL_INCDIR)\perl.lib
649!else
650PERL_DLL = perl$(PERL_VER).dll
651PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib
652!endif
653
654CFLAGS = $(CFLAGS) -DFEAT_PERL
655
656# Do we want to load Perl dynamically?
657!if "$(DYNAMIC_PERL)" == "yes"
658CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
659!undef PERL_LIB
660!endif
661
662PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
663PERL_INC = /I $(PERL_INCDIR)
664PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
665XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
666XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
667
668!endif
669
670#
671# Support Ruby interface
672#
673!ifdef RUBY
674# Set default value
675!ifndef RUBY_VER
676RUBY_VER = 18
677!endif
678!ifndef RUBY_VER_LONG
679RUBY_VER_LONG = 1.8
680!endif
681
682!if $(RUBY_VER) >= 18
683!ifndef RUBY_PLATFORM
684RUBY_PLATFORM = i386-mswin32
685!endif
686!ifndef RUBY_INSTALL_NAME
687RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
688!endif
689!else
690!ifndef RUBY_PLATFORM
691RUBY_PLATFORM = i586-mswin32
692!endif
693!ifndef RUBY_INSTALL_NAME
694RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
695!endif
696!endif # $(RUBY_VER) >= 18
697
698!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
699CFLAGS = $(CFLAGS) -DFEAT_RUBY
700RUBY_OBJ = $(OUTDIR)\if_ruby.obj
701RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
702RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
703# Do we want to load Ruby dynamically?
704!if "$(DYNAMIC_RUBY)" == "yes"
705!message Ruby DLL will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000706CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=$(RUBY_VER) \
707 -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000708!undef RUBY_LIB
709!endif
710!endif # RUBY
711
712#
713# Support PostScript printing
714#
715!if "$(POSTSCRIPT)" == "yes"
716CFLAGS = $(CFLAGS) -DMSWINPS
717!endif # POSTSCRIPT
718
719#
720# FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
721#
722!if "$(FEATURES)"==""
723FEATURES = BIG
724!endif
725CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
726
727#
Bram Moolenaard9d30582005-05-18 22:10:28 +0000728# Always generate the .pdb file, so that we get debug symbols that can be used
729# on a crash (doesn't add overhead to the executable).
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000730# Generate edit-and-continue debug info when no optimization - allows to
731# debug more conveniently (able to look at variables which are in registers)
Bram Moolenaard9d30582005-05-18 22:10:28 +0000732#
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000733CFLAGS = $(CFLAGS) /Fd$(OUTDIR)/ $(DEBUGINFO)
734LINK_PDB = /PDB:$(VIM).pdb -debug
Bram Moolenaard9d30582005-05-18 22:10:28 +0000735
736#
737# End extra feature include
Bram Moolenaar071d4272004-06-13 20:20:40 +0000738#
739!message
740
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000741conflags = /nologo /subsystem:$(SUBSYSTEM)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000742
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000743PATHDEF_SRC = $(OUTDIR)\pathdef.c
744
Bram Moolenaar071d4272004-06-13 20:20:40 +0000745!IF "$(MAP)" == "yes"
746# "/map" is for debugging
747conflags = $(conflags) /map
748!ELSEIF "$(MAP)" == "lines"
749# "/mapinfo:lines" is for debugging, only works for VC6 and later
750conflags = $(conflags) /map /mapinfo:lines
751!ENDIF
752
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000753LINKARGS1 = $(linkdebug) $(conflags)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000754LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000755 $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \
756 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000757
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000758# Report link time code generation progress if used.
759!ifdef NODEBUG
760!if "$(MSVCVER)" == "8.0"
761!if "$(OPTIMIZE)" != "SPACE"
762LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
763!endif
764!endif
765!endif
766
Bram Moolenaarb6356332005-07-18 21:40:44 +0000767all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \
768 GvimExt/gvimext.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +0000769
Bram Moolenaarb6356332005-07-18 21:40:44 +0000770$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
771 $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
772 $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) version.c version.h
773 $(CC) $(CFLAGS) version.c
Bram Moolenaar0dc065e2005-07-04 22:49:24 +0000774 $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000775 $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) \
776 $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
777 $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000778
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000779$(VIM): $(VIM).exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000780
781$(OUTDIR):
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000782 if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000783
784install.exe: dosinst.c
Bram Moolenaarb6356332005-07-18 21:40:44 +0000785 $(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \
786 ole32.lib advapi32.lib uuid.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000787 - if exist install.exe del install.exe
788 ren dosinst.exe install.exe
789
790uninstal.exe: uninstal.c
791 $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
792
793vimrun.exe: vimrun.c
794 $(CC) /nologo -DNDEBUG vimrun.c
795
796xxd/xxd.exe: xxd/xxd.c
797 cd xxd
798 $(MAKE) /NOLOGO -f Make_mvc.mak
799 cd ..
800
801GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
802 cd GvimExt
803 $(MAKE) /NOLOGO -f Makefile $(MAKEFLAGS_GVIMEXT)
804 cd ..
805
806
807tags: notags
808 $(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro
809
810notags:
811 - if exist tags del tags
812
813clean:
Bram Moolenaar02743632005-07-25 20:42:36 +0000814 - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000815 - if exist *.obj del *.obj
816 - if exist $(VIM).exe del $(VIM).exe
817 - if exist $(VIM).ilk del $(VIM).ilk
818 - if exist $(VIM).pdb del $(VIM).pdb
819 - if exist $(VIM).map del $(VIM).map
820 - if exist $(VIM).ncb del $(VIM).ncb
821 - if exist vimrun.exe del vimrun.exe
822 - if exist install.exe del install.exe
823 - if exist uninstal.exe del uninstal.exe
824 - if exist if_perl.c del if_perl.c
825 - if exist dimm.h del dimm.h
826 - if exist dimm_i.c del dimm_i.c
827 - if exist dimm.tlb del dimm.tlb
828 - if exist dosinst.exe del dosinst.exe
829 cd xxd
830 $(MAKE) /NOLOGO -f Make_mvc.mak clean
831 cd ..
832 cd GvimExt
833 $(MAKE) /NOLOGO -f Makefile clean
834 cd ..
835 cd GvimExt
836 $(MAKE) /NOLOGO -f Makefile clean
837 cd ..
838 - if exist testdir\*.out del testdir\*.out
839
840test:
841 cd testdir
842 $(MAKE) /NOLOGO -f Make_dos.mak win32
843 cd ..
844
Bram Moolenaar34114692005-01-02 11:28:13 +0000845testclean:
846 cd testdir
847 $(MAKE) /NOLOGO -f Make_dos.mak clean
848 cd ..
849
Bram Moolenaar071d4272004-06-13 20:20:40 +0000850###########################################################################
851
852# Create a default rule for transforming .c files to .obj files in $(OUTDIR)
853# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000854!IF "$(MSVCVER)" == "4.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000855.c{$(OUTDIR)/}.obj:
856!ELSE
857.c{$(OUTDIR)/}.obj::
858!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000859 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000860
861# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
862# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000863!IF "$(MSVCVER)" == "4.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000864.cpp{$(OUTDIR)/}.obj:
865!ELSE
866.cpp{$(OUTDIR)/}.obj::
867!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000868 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000869
870$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
871
872$(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
873
874$(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
875
876$(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL)
877
878$(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL)
879
880$(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL)
881
882$(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL)
883
884$(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL)
885
886$(OUTDIR)/ex_docmd.obj: $(OUTDIR) ex_docmd.c $(INCL) ex_cmds.h
887
888$(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h
889
890$(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL)
891
892$(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
893
894$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
895
896$(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL)
897
Bram Moolenaar58d98232005-07-23 22:25:46 +0000898$(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL)
899
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000900$(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL)
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000901
Bram Moolenaar071d4272004-06-13 20:20:40 +0000902$(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL)
903
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000904$(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
905
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL)
907
908$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
909
910if_perl.c : if_perl.xs typemap
Bram Moolenaarb6356332005-07-18 21:40:44 +0000911 $(PERL_EXE) $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
912 -typemap typemap if_perl.xs > if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000913
914$(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000915 $(CC) $(CFLAGS) $(PERL_INC) if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000916
917$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000918 $(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000919
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000920$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL)
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000921 $(CC) $(CFLAGS) if_mzsch.c \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000922 -DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000923
Bram Moolenaar071d4272004-06-13 20:20:40 +0000924$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000925 $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000926
927$(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h
928
929$(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000930 $(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000931
932$(OUTDIR)/if_sniff.obj: $(OUTDIR) if_sniff.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000933 $(CC) $(CFLAGS) if_sniff.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000934
935$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000936 $(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000937
938$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL)
939
940$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL)
941
942$(OUTDIR)/memfile.obj: $(OUTDIR) memfile.c $(INCL)
943
944$(OUTDIR)/memline.obj: $(OUTDIR) memline.c $(INCL)
945
946$(OUTDIR)/menu.obj: $(OUTDIR) menu.c $(INCL)
947
948$(OUTDIR)/message.obj: $(OUTDIR) message.c $(INCL)
949
950$(OUTDIR)/misc1.obj: $(OUTDIR) misc1.c $(INCL)
951
952$(OUTDIR)/misc2.obj: $(OUTDIR) misc2.c $(INCL)
953
954$(OUTDIR)/move.obj: $(OUTDIR) move.c $(INCL)
955
956$(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL)
957
958$(OUTDIR)/netbeans.obj: $(OUTDIR) netbeans.c $(NBDEBUG_SRC) $(INCL)
959
960$(OUTDIR)/normal.obj: $(OUTDIR) normal.c $(INCL)
961
962$(OUTDIR)/option.obj: $(OUTDIR) option.c $(INCL)
963
964$(OUTDIR)/ops.obj: $(OUTDIR) ops.c $(INCL)
965
966$(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL)
967
968$(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h
969
970$(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
971
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000972$(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
973 $(CC) $(CFLAGS) $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000974
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000975$(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL)
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000976
Bram Moolenaar071d4272004-06-13 20:20:40 +0000977$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
978
979$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c $(INCL)
980
981$(OUTDIR)/screen.obj: $(OUTDIR) screen.c $(INCL)
982
983$(OUTDIR)/search.obj: $(OUTDIR) search.c $(INCL)
984
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000985$(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL)
986
Bram Moolenaar071d4272004-06-13 20:20:40 +0000987$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
988
989$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
990
991$(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL)
992
993$(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
994
995$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
996
997$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
998
999$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
Bram Moolenaarb6356332005-07-18 21:40:44 +00001000 $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001001
Bram Moolenaar77f66d62007-02-20 02:16:18 +00001002$(OUTDIR)/vim.res: $(OUTDIR) vim.rc version.h tools.bmp tearoff.bmp \
Bram Moolenaarb6356332005-07-18 21:40:44 +00001003 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
Bram Moolenaar071d4272004-06-13 20:20:40 +00001004 $(RC) /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc
1005
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +00001006iid_ole.c if_ole.h vim.tlb: if_ole.idl
Bram Moolenaarb6356332005-07-18 21:40:44 +00001007 midl /nologo /error none /proxy nul /iid iid_ole.c /tlb vim.tlb \
1008 /header if_ole.h if_ole.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +00001009
1010dimm.h dimm_i.c: dimm.idl
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +00001011 midl /nologo /error none /proxy nul dimm.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +00001012
1013$(OUTDIR)/dimm_i.obj: $(OUTDIR) dimm_i.c $(INCL)
1014
1015$(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
1016
Bram Moolenaar89cb5e02004-07-19 20:55:54 +00001017# $CFLAGS may contain backslashes and double quotes, escape them both.
1018E0_CFLAGS = $(CFLAGS:\=\\)
1019E_CFLAGS = $(E0_CFLAGS:"=\")
Bram Moolenaar77f66d62007-02-20 02:16:18 +00001020# ") stop the string
Bram Moolenaar89cb5e02004-07-19 20:55:54 +00001021
Bram Moolenaar8b6144b2006-02-08 09:20:24 +00001022$(PATHDEF_SRC): auto
1023 @echo creating $(PATHDEF_SRC)
1024 @echo /* pathdef.c */ > $(PATHDEF_SRC)
1025 @echo #include "vim.h" >> $(PATHDEF_SRC)
1026 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC)
1027 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC)
1028 @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC)
1029 @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC)
1030 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
1031 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001032
1033auto:
1034 if not exist auto/nul mkdir auto
1035
1036# End Custom Build
1037proto.h: \
1038 proto/buffer.pro \
1039 proto/charset.pro \
1040 proto/diff.pro \
1041 proto/digraph.pro \
1042 proto/edit.pro \
1043 proto/eval.pro \
1044 proto/ex_cmds.pro \
1045 proto/ex_cmds2.pro \
1046 proto/ex_docmd.pro \
1047 proto/ex_eval.pro \
1048 proto/ex_getln.pro \
1049 proto/fileio.pro \
1050 proto/getchar.pro \
Bram Moolenaar58d98232005-07-23 22:25:46 +00001051 proto/hardcopy.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001052 proto/hashtab.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001053 proto/main.pro \
1054 proto/mark.pro \
1055 proto/memfile.pro \
1056 proto/memline.pro \
1057 proto/menu.pro \
1058 proto/message.pro \
1059 proto/misc1.pro \
1060 proto/misc2.pro \
1061 proto/move.pro \
1062 proto/mbyte.pro \
1063 proto/normal.pro \
1064 proto/ops.pro \
1065 proto/option.pro \
1066 proto/os_mswin.pro \
1067 proto/os_win32.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001068 proto/popupmnu.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001069 proto/quickfix.pro \
1070 proto/regexp.pro \
1071 proto/screen.pro \
1072 proto/search.pro \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +00001073 proto/spell.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001074 proto/syntax.pro \
1075 proto/tag.pro \
1076 proto/term.pro \
1077 proto/ui.pro \
1078 proto/undo.pro \
1079 proto/window.pro \
1080 $(NETBEANS_PRO)
1081
Bram Moolenaarf193fff2006-04-27 00:02:13 +00001082.SUFFIXES: .cod .i
Bram Moolenaar551dbcc2006-04-25 22:13:59 +00001083
1084# Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake
1085# foo.cod"
1086.c.cod:
1087 $(CC) $(CFLAGS) /FAcs $<
1088
1089# Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i"
1090.c.i:
1091 $(CC) $(CFLAGS) /P /C $<
Bram Moolenaar362e1a32006-03-06 23:29:24 +00001092
1093
Bram Moolenaar071d4272004-06-13 20:20:40 +00001094# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: