blob: 5b25004b165f9d50de3e223435aaa8491a9d127e [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
Bram Moolenaar0fde2902008-03-16 13:54:13 +00003# VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005),
Bram Moolenaarda2f99a2009-06-16 14:34:38 +00004# VC9 (VS2008), and VC10 (VS2010).
Bram Moolenaar071d4272004-06-13 20:20:40 +00005#
Bram Moolenaareb3593b2006-04-22 22:33:57 +00006# To build using other Windows compilers, see INSTALLpc.txt
Bram Moolenaar7887d882005-07-01 22:33:52 +00007#
Bram Moolenaar071d4272004-06-13 20:20:40 +00008# This makefile can build the console, GUI, OLE-enable, Perl-enabled and
Bram Moolenaarda2f99a2009-06-16 14:34:38 +00009# Python-enabled versions of Vim for Win32 platforms.
Bram Moolenaar071d4272004-06-13 20:20:40 +000010#
Bram Moolenaarda2f99a2009-06-16 14:34:38 +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 Moolenaarda2f99a2009-06-16 14:34:38 +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 Moolenaara83c3e02006-03-17 23:10:44 +000026# Multibyte support: MBYTE=yes (default is no)
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 Moolenaar0ba04292010-07-14 23:23:17 +020033# Lua interface:
34# LUA=[Path to Lua directory]
35# DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
36# LUA_VER=[Lua version] (default is 51)
37#
Bram Moolenaar65c1b012005-01-31 19:02:28 +000038# MzScheme interface:
39# MZSCHEME=[Path to MzScheme directory]
40# DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically)
41# MZSCHEME_VER=[version, 205_000, ...]
Bram Moolenaar9e70cf12009-05-26 20:59:55 +000042# MZSCHEME_DEBUG=no
Bram Moolenaar7887d882005-07-01 22:33:52 +000043#
Bram Moolenaar071d4272004-06-13 20:20:40 +000044# Perl interface:
45# PERL=[Path to Perl directory]
46# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
Bram Moolenaar7887d882005-07-01 22:33:52 +000047# PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc]
48# (default is 56)
49#
Bram Moolenaar071d4272004-06-13 20:20:40 +000050# Python interface:
51# PYTHON=[Path to Python directory]
52# DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
53# PYTHON_VER=[Python version, eg 15, 20] (default is 22)
Bram Moolenaar7887d882005-07-01 22:33:52 +000054#
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +020055# Python3 interface:
56# PYTHON3=[Path to Python3 directory]
57# DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically)
58# PYTHON3_VER=[Python3 version, eg 30, 31] (default is 31)
59#
Bram Moolenaar071d4272004-06-13 20:20:40 +000060# Ruby interface:
61# RUBY=[Path to Ruby directory]
62# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
63# RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
64# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
65# You must set RUBY_VER_LONG when change RUBY_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000066#
Bram Moolenaar071d4272004-06-13 20:20:40 +000067# Tcl interface:
68# TCL=[Path to Tcl directory]
69# DYNAMIC_TCL=yes (to load the Tcl DLL dynamically)
70# TCL_VER=[Tcl version, e.g. 80, 83] (default is 83)
71# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
72# You must set TCL_VER_LONG when you set TCL_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000073#
74# SNiFF+ interface: SNIFF=yes
75#
76# Cscope support: CSCOPE=yes
77#
78# Iconv library support (always dynamically loaded):
79# ICONV=[yes or no] (default is yes)
80#
81# Intl library support (always dynamically loaded):
82# GETTEXT=[yes or no] (default is yes)
83# See http://sourceforge.net/projects/gettext/
84#
85# PostScript printing: POSTSCRIPT=yes (default is no)
86#
87# Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
88#
89# XPM Image Support: XPM=[path to XPM directory]
90#
91# Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
92#
93# Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is
94# i386)
95#
96# Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400)
97#
Bram Moolenaar071d4272004-06-13 20:20:40 +000098# Debug version: DEBUG=yes
99# Mapfile: MAP=[no, yes or lines] (default is yes)
100# no: Don't write a mapfile.
101# yes: Write a normal mapfile.
102# lines: Write a mapfile with line numbers (only for VC6 and later)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000103#
104# Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
105# doesn't work)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000106#
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000107# Visual C Version: MSVCVER=m.n (default derived from nmake if undefined)
108#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000109# You can combine any of these interfaces
110#
111# Example: To build the non-debug, GUI version with Perl interface:
112# nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
113#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000114# DEBUG with Make_mvc.mak and Make_dvc.mak:
115# This makefile gives a fineness of control which is not supported in
116# Visual C++ configuration files. Therefore, debugging requires a bit of
117# extra work.
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000118# Make_dvc.mak is a Visual C++ project to access that support. It may be
119# badly out of date for the Visual C++ you are using...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000120# To use Make_dvc.mak:
121# 1) Build Vim with Make_mvc.mak.
122# Use a "DEBUG=yes" argument to build Vim with debug support.
123# E.g. the following builds gvimd.exe:
124# nmake -f Make_mvc.mak debug=yes gui=yes
125# 2) Use MS Devstudio and set it up to allow that file to be debugged:
126# i) Pass Make_dvc.mak to the IDE.
127# Use the "open workspace" menu entry to load Make_dvc.mak.
128# Alternatively, from the command line:
129# msdev /nologo Make_dvc.mak
130# Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
131# this and offer to convert it to their own format. Accept that.
132# It creates a file called Make_dvc.dsw which can then be used
133# for further operations. E.g.
134# msdev /nologo Make_dvc.dsw
135# ii) Set the built executable for debugging:
136# a) Alt+F7/Debug takes you to the Debug dialog.
137# b) Fill "Executable for debug session". e.g. gvimd.exe
138# c) Fill "Program arguments". e.g. -R dosinst.c
139# d) Complete the dialog
140# 3) You can now debug the executable you built with Make_mvc.mak
141#
142# Note: Make_dvc.mak builds vimrun.exe, because it must build something
143# to be a valid makefile..
144
145### See feature.h for a list of optionals.
146# If you want to build some optional features without modifying the source,
147# you can set DEFINES on the command line, e.g.,
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000148# nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000149
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000150# Build on both Windows NT/XP and Windows 9x
Bram Moolenaar071d4272004-06-13 20:20:40 +0000151
152TARGETOS = BOTH
153
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000154# Select one of eight object code directories, depends on GUI, OLE, DEBUG and
155# interfaces.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000156# If you change something else, do "make clean" first!
157!if "$(GUI)" == "yes"
158OBJDIR = .\ObjG
159!else
160OBJDIR = .\ObjC
161!endif
162!if "$(OLE)" == "yes"
163OBJDIR = $(OBJDIR)O
164!endif
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200165!ifdef LUA
166OBJDIR = $(OBJDIR)U
167!endif
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000168!ifdef PERL
169OBJDIR = $(OBJDIR)L
170!endif
171!ifdef PYTHON
172OBJDIR = $(OBJDIR)Y
173!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200174!ifdef PYTHON3
175OBJDIR = $(OBJDIR)H
176!endif
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000177!ifdef TCL
178OBJDIR = $(OBJDIR)T
179!endif
180!ifdef RUBY
181OBJDIR = $(OBJDIR)R
182!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000183!ifdef MZSCHEME
184OBJDIR = $(OBJDIR)Z
185!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000186!if "$(DEBUG)" == "yes"
187OBJDIR = $(OBJDIR)d
188!endif
189
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000190# Win32.mak requires that CPU be set appropriately.
191# To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000192
193!ifdef PROCESSOR_ARCHITECTURE
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000194# We're on Windows NT or using VC 6+
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000195! ifdef CPU
196ASSEMBLY_ARCHITECTURE=$(CPU)
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000197# Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7.
198! if ("$(ASSEMBLY_ARCHITECTURE)" == "i386") || ("$(ASSEMBLY_ARCHITECTURE)" == "I386")
199ASSEMBLY_ARCHITECTURE = x86
200! endif
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000201! else
Bram Moolenaar071d4272004-06-13 20:20:40 +0000202CPU = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000203ASSEMBLY_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000204! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000205CPU = i386
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000206! endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000207! endif
208!else # !PROCESSOR_ARCHITECTURE
209# We're on Windows 95
210CPU = i386
211!endif # !PROCESSOR_ARCHITECTURE
212
Bram Moolenaar071d4272004-06-13 20:20:40 +0000213# Build a retail version by default
214
215!if "$(DEBUG)" != "yes"
216NODEBUG = 1
217!else
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000218!undef NODEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000219MAKEFLAGS_GVIMEXT = DEBUG=yes
220!endif
221
222
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000223# Get all sorts of useful, standard macros from the Platform SDK.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000224
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000225!include <Win32.mak>
Bram Moolenaar071d4272004-06-13 20:20:40 +0000226
Bram Moolenaar8cd213c2010-06-01 21:57:09 +0200227# Flag to turn on Win64 compatibility warnings for VC7.x and VC8.
Bram Moolenaar83d09bb2010-06-01 19:58:08 +0200228WP64CHECK = /Wp64
Bram Moolenaar071d4272004-06-13 20:20:40 +0000229
230#>>>>> path of the compiler and linker; name of include and lib directories
231# PATH = c:\msvc20\bin;$(PATH)
232# INCLUDE = c:\msvc20\include
233# LIB = c:\msvc20\lib
234
235!ifndef CTAGS
236CTAGS = ctags
237!endif
238
239!if "$(SNIFF)" == "yes"
240# SNIFF - Include support for SNiFF+.
241SNIFF_INCL = if_sniff.h
242SNIFF_OBJ = $(OBJDIR)/if_sniff.obj
Bram Moolenaarb6356332005-07-18 21:40:44 +0000243SNIFF_LIB = shell32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000244SNIFF_DEFS = -DFEAT_SNIFF
245# The SNiFF integration needs multithreaded libraries!
246MULTITHREADED = yes
247!endif
248
249!ifndef CSCOPE
250CSCOPE = yes
251!endif
252
253!if "$(CSCOPE)" == "yes"
254# CSCOPE - Include support for Cscope
255CSCOPE_INCL = if_cscope.h
256CSCOPE_OBJ = $(OBJDIR)/if_cscope.obj
257CSCOPE_DEFS = -DFEAT_CSCOPE
258!endif
259
260!ifndef NETBEANS
261NETBEANS = $(GUI)
262!endif
263
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000264# Only allow NETBEANS and XPM for a GUI build.
265!if "$(GUI)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000266!if "$(NETBEANS)" == "yes"
267# NETBEANS - Include support for Netbeans integration
268NETBEANS_PRO = proto/netbeans.pro
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000269NETBEANS_OBJ = $(OBJDIR)/netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000270NETBEANS_DEFS = -DFEAT_NETBEANS_INTG
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000271
272!if "$(NBDEBUG)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000273NBDEBUG_DEFS = -DNBDEBUG
274NBDEBUG_INCL = nbdebug.h
275NBDEBUG_SRC = nbdebug.c
276!endif
Bram Moolenaarb6356332005-07-18 21:40:44 +0000277NETBEANS_LIB = WSock32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000278!endif
279
280!ifdef XPM
281# XPM - Include support for XPM signs
282# you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
283XPM_OBJ = $(OBJDIR)/xpm_w32.obj
284XPM_DEFS = -DFEAT_XPM_W32
285XPM_LIB = $(XPM)\lib\libXpm.lib
286XPM_INC = -I $(XPM)\include
287!endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000288!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000289
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000290# Set which version of the CRT to use
Bram Moolenaar071d4272004-06-13 20:20:40 +0000291!if defined(USE_MSVCRT)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000292# CVARS = $(cvarsdll)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000293# !elseif defined(MULTITHREADED)
294# CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000295!else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000296# CVARS = $(cvars)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000297# CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000298!endif
299
300# need advapi32.lib for GetUserName()
301# need shell32.lib for ExtractIcon()
302# gdi32.lib and comdlg32.lib for printing support
303# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000304CON_LIB = oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \
305 comdlg32.lib ole32.lib uuid.lib /machine:$(CPU) /nodefaultlib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000306!if "$(DELAYLOAD)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000307CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
308!endif
309
310### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
311# When set to 0x0500 ":browse" stops working.
312!ifndef WINVER
313WINVER = 0x0400
314!endif
315
316# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
317# default, use these lines.
318#VIMRCLOC = somewhere
319#VIMRUNTIMEDIR = somewhere
320
321CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
322 $(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) \
323 $(NBDEBUG_DEFS) $(XPM_DEFS) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000324 $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
325 /Fo$(OUTDIR)/
Bram Moolenaar071d4272004-06-13 20:20:40 +0000326
327#>>>>> end of choices
328###########################################################################
329
330!ifdef OS
331OS_TYPE = winnt
332DEL_TREE = rmdir /s /q
333!else
334OS_TYPE = win95
335DEL_TREE = deltree /y
336!endif
337
338INTDIR=$(OBJDIR)
339OUTDIR=$(OBJDIR)
340
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000341# Derive version of VC being used from nmake if not specified
342!if "$(MSVCVER)" == ""
343!if "$(_NMAKE_VER)" == ""
344MSVCVER = 4.0
345!endif
346!if "$(_NMAKE_VER)" == "162"
347MSVCVER = 5.0
348!endif
349!if "$(_NMAKE_VER)" == "6.00.8168.0"
350MSVCVER = 6.0
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000351CPU = ix86
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000352!endif
353!if "$(_NMAKE_VER)" == "7.00.9466"
354MSVCVER = 7.0
355!endif
356!if "$(_NMAKE_VER)" == "7.10.3077"
357MSVCVER = 7.1
358!endif
359!if "$(_NMAKE_VER)" == "8.00.50727.42"
360MSVCVER = 8.0
361!endif
362!if "$(_NMAKE_VER)" == "8.00.50727.762"
363MSVCVER = 8.0
364!endif
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000365!if "$(_NMAKE_VER)" == "9.00.20706.01"
366MSVCVER = 9.0
367!endif
Bram Moolenaara7241f52008-06-24 20:39:31 +0000368!if "$(_NMAKE_VER)" == "9.00.21022.08"
369MSVCVER = 9.0
370!endif
Bram Moolenaar13658312009-02-04 17:35:52 +0000371!if "$(_NMAKE_VER)" == "9.00.30729.01"
372MSVCVER = 9.0
373!endif
Bram Moolenaarda2f99a2009-06-16 14:34:38 +0000374!if "$(_NMAKE_VER)" == "10.00.20506.01"
375MSVCVER = 10.0
376!endif
Bram Moolenaar2498b3a2010-03-02 17:59:44 +0100377!if "$(_NMAKE_VER)" == "10.00.30128.01"
378MSVCVER = 10.0
379!endif
Bram Moolenaar218116c2010-05-20 21:46:00 +0200380!if "$(_NMAKE_VER)" == "10.00.30319.01"
381MSVCVER = 10.0
382!endif
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000383!endif
384
385# Abort bulding VIM if version of VC is unrecognised.
386!ifndef MSVCVER
387!message *** ERROR
388!message Cannot determine Visual C version being used. If you are using the
389!message Windows SDK then you must have the environment variable MSVCVER set to
390!message your version of the VC compiler. If you are not using the Express
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000391!message version of Visual C, you can either set MSVCVER or update this makefile
392!message to handle the new value for _NMAKE_VER, "$(_NMAKE_VER)".
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000393!error Make aborted.
394!endif
395
Bram Moolenaar071d4272004-06-13 20:20:40 +0000396# Convert processor ID to MVC-compatible number
Bram Moolenaarda2f99a2009-06-16 14:34:38 +0000397!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000398!if "$(CPUNR)" == "i386"
399CPUARG = /G3
400!elseif "$(CPUNR)" == "i486"
401CPUARG = /G4
402!elseif "$(CPUNR)" == "i586"
403CPUARG = /G5
404!elseif "$(CPUNR)" == "i686"
405CPUARG = /G6
Bram Moolenaarcf3630f2005-01-08 16:04:29 +0000406!elseif "$(CPUNR)" == "pentium4"
Bram Moolenaar34114692005-01-02 11:28:13 +0000407CPUARG = /G7 /arch:SSE2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000408!else
409CPUARG =
410!endif
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000411!else
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000412# VC8/9 only allows specifying SSE architecture
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000413!if "$(CPUNR)" == "pentium4"
414CPUARG = /arch:SSE2
415!endif
416!endif
417
418LIBC =
419DEBUGINFO = /Zi
Bram Moolenaar071d4272004-06-13 20:20:40 +0000420
421!ifdef NODEBUG
422VIM = vim
423!if "$(OPTIMIZE)" == "SPACE"
424OPTFLAG = /O1
425!elseif "$(OPTIMIZE)" == "SPEED"
426OPTFLAG = /O2
427!else # MAXSPEED
428OPTFLAG = /Ox
429!endif
Bram Moolenaar83d09bb2010-06-01 19:58:08 +0200430
Bram Moolenaarda2f99a2009-06-16 14:34:38 +0000431!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0")
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000432# Use link time code generation if not worried about size
433!if "$(OPTIMIZE)" != "SPACE"
434OPTFLAG = $(OPTFLAG) /GL
435!endif
436!endif
Bram Moolenaar83d09bb2010-06-01 19:58:08 +0200437
438# (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
439!if ("$(MSVCVER)" == "7.0") || ("$(MSVCVER)" == "7.1") || ("$(MSVCVER)" == "8.0")
440CFLAGS=$(CFLAGS) $(WP64CHECK)
441!endif
442
Bram Moolenaar34114692005-01-02 11:28:13 +0000443CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000444RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000445! ifdef USE_MSVCRT
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000446CFLAGS = $(CFLAGS) /MD
Bram Moolenaar071d4272004-06-13 20:20:40 +0000447LIBC = msvcrt.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000448! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000449LIBC = libcmt.lib
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000450CFLAGS = $(CFLAGS) /Zl /MT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000451! endif
452!else # DEBUG
453VIM = vimd
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000454! if ("$(CPU)" == "i386") || ("$(CPU)" == "ix86")
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000455DEBUGINFO = /ZI
456! endif
Bram Moolenaard9d30582005-05-18 22:10:28 +0000457CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
Bram Moolenaar071d4272004-06-13 20:20:40 +0000458RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
459# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000460! if "$(MSVCVER)" == "4.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000461LIBC =
462! else
463LIBC = /fixed:no
464! endif
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000465! ifdef USE_MSVCRT
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000466CFLAGS = $(CFLAGS) /MDd
Bram Moolenaar071d4272004-06-13 20:20:40 +0000467LIBC = $(LIBC) msvcrtd.lib
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000468! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000469LIBC = $(LIBC) libcmtd.lib
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000470CFLAGS = $(CFLAGS) /Zl /MTd
Bram Moolenaar071d4272004-06-13 20:20:40 +0000471! endif
472!endif # DEBUG
473
474INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
475 proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \
476 $(NBDEBUG_INCL)
477
478OBJ = \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200479 $(OUTDIR)\blowfish.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000480 $(OUTDIR)\buffer.obj \
481 $(OUTDIR)\charset.obj \
482 $(OUTDIR)\diff.obj \
483 $(OUTDIR)\digraph.obj \
484 $(OUTDIR)\edit.obj \
485 $(OUTDIR)\eval.obj \
486 $(OUTDIR)\ex_cmds.obj \
487 $(OUTDIR)\ex_cmds2.obj \
488 $(OUTDIR)\ex_docmd.obj \
489 $(OUTDIR)\ex_eval.obj \
490 $(OUTDIR)\ex_getln.obj \
491 $(OUTDIR)\fileio.obj \
492 $(OUTDIR)\fold.obj \
493 $(OUTDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000494 $(OUTDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000495 $(OUTDIR)\hashtab.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000496 $(OUTDIR)\main.obj \
497 $(OUTDIR)\mark.obj \
498 $(OUTDIR)\mbyte.obj \
499 $(OUTDIR)\memfile.obj \
500 $(OUTDIR)\memline.obj \
501 $(OUTDIR)\menu.obj \
502 $(OUTDIR)\message.obj \
503 $(OUTDIR)\misc1.obj \
504 $(OUTDIR)\misc2.obj \
505 $(OUTDIR)\move.obj \
506 $(OUTDIR)\normal.obj \
507 $(OUTDIR)\ops.obj \
508 $(OUTDIR)\option.obj \
509 $(OUTDIR)\os_mswin.obj \
510 $(OUTDIR)\os_win32.obj \
511 $(OUTDIR)\pathdef.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000512 $(OUTDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000513 $(OUTDIR)\quickfix.obj \
514 $(OUTDIR)\regexp.obj \
515 $(OUTDIR)\screen.obj \
516 $(OUTDIR)\search.obj \
Bram Moolenaaredac1852010-05-18 20:34:20 +0200517 $(OUTDIR)\sha256.obj \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000518 $(OUTDIR)\spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000519 $(OUTDIR)\syntax.obj \
520 $(OUTDIR)\tag.obj \
521 $(OUTDIR)\term.obj \
522 $(OUTDIR)\ui.obj \
523 $(OUTDIR)\undo.obj \
524 $(OUTDIR)\window.obj \
525 $(OUTDIR)\vim.res
526
527!if "$(OLE)" == "yes"
528CFLAGS = $(CFLAGS) -DFEAT_OLE
529RCFLAGS = $(RCFLAGS) -DFEAT_OLE
530OLE_OBJ = $(OUTDIR)\if_ole.obj
531OLE_IDL = if_ole.idl
532OLE_LIB = oleaut32.lib
533!endif
534
535!if "$(IME)" == "yes"
536CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME
537!ifndef DYNAMIC_IME
538DYNAMIC_IME = yes
539!endif
540!if "$(DYNAMIC_IME)" == "yes"
541CFLAGS = $(CFLAGS) -DDYNAMIC_IME
542!else
543IME_LIB = imm32.lib
544!endif
545!endif
546
547!if "$(GIME)" == "yes"
548CFLAGS = $(CFLAGS) -DGLOBAL_IME
549OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj
550MBYTE = yes
551!endif
552
553!if "$(MBYTE)" == "yes"
554CFLAGS = $(CFLAGS) -DFEAT_MBYTE
555!endif
556
557!if "$(GUI)" == "yes"
558SUBSYSTEM = windows
559CFLAGS = $(CFLAGS) -DFEAT_GUI_W32
560RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32
561VIM = g$(VIM)
562GUI_INCL = \
563 gui.h \
564 regexp.h \
565 ascii.h \
566 ex_cmds.h \
567 farsi.h \
568 feature.h \
569 globals.h \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000570 gui_beval.h \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000571 keymap.h \
572 macros.h \
573 option.h \
574 os_dos.h \
575 os_win32.h
576GUI_OBJ = \
577 $(OUTDIR)\gui.obj \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000578 $(OUTDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000579 $(OUTDIR)\gui_w32.obj \
580 $(OUTDIR)\os_w32exe.obj
581GUI_LIB = \
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000582 gdi32.lib version.lib $(IME_LIB) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000583 winspool.lib comctl32.lib advapi32.lib shell32.lib \
584 /machine:$(CPU) /nodefaultlib
585!else
586SUBSYSTEM = console
587!endif
588
589# iconv.dll library (dynamically loaded)
590!ifndef ICONV
591ICONV = yes
592!endif
593!if "$(ICONV)" == "yes"
594CFLAGS = $(CFLAGS) -DDYNAMIC_ICONV
595!endif
596
597# libintl.dll library
598!ifndef GETTEXT
599GETTEXT = yes
600!endif
601!if "$(GETTEXT)" == "yes"
602CFLAGS = $(CFLAGS) -DDYNAMIC_GETTEXT
603!endif
604
605# TCL interface
606!ifdef TCL
607!ifndef TCL_VER
608TCL_VER = 83
609TCL_VER_LONG = 8.3
610!endif
611!message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)"
612!if "$(DYNAMIC_TCL)" == "yes"
613!message Tcl DLL will be loaded dynamically
614TCL_DLL = tcl$(TCL_VER).dll
Bram Moolenaarb6356332005-07-18 21:40:44 +0000615CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \
616 -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000617TCL_OBJ = $(OUTDIR)\if_tcl.obj
618TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
619TCL_LIB = $(TCL)\lib\tclstub$(TCL_VER).lib
620!else
621CFLAGS = $(CFLAGS) -DFEAT_TCL
622TCL_OBJ = $(OUTDIR)\if_tcl.obj
623TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
624TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib
625!endif
626!endif
627
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200628# Lua interface
629!ifdef LUA
630!ifndef LUA_VER
631LUA_VER = 51
632!endif
633!message Lua requested (version $(LUA_VER)) - root dir is "$(LUA)"
634!if "$(DYNAMIC_LUA)" == "yes"
635!message Lua DLL will be loaded dynamically
636!endif
637CFLAGS = $(CFLAGS) -DFEAT_LUA
638LUA_OBJ = $(OUTDIR)\if_lua.obj
639LUA_INC = /I "$(LUA)\include" /I "$(LUA)"
640!if "$(DYNAMIC_LUA)" == "yes"
641CFLAGS = $(CFLAGS) -DDYNAMIC_LUA \
642 -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
643LUA_LIB = /nodefaultlib:lua$(LUA_VER).lib
644!else
645LUA_LIB = "$(LUA)\lib\lua$(LUA_VER).lib"
646!endif
647!endif
648
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200649!ifdef PYTHON
650!ifdef PYTHON3
651DYNAMIC_PYTHON=yes
652DYNAMIC_PYTHON3=yes
653!endif
654!endif
655
Bram Moolenaar071d4272004-06-13 20:20:40 +0000656# PYTHON interface
657!ifdef PYTHON
658!ifndef PYTHON_VER
659PYTHON_VER = 22
660!endif
661!message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)"
662!if "$(DYNAMIC_PYTHON)" == "yes"
663!message Python DLL will be loaded dynamically
664!endif
665CFLAGS = $(CFLAGS) -DFEAT_PYTHON
666PYTHON_OBJ = $(OUTDIR)\if_python.obj
667PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC"
668!if "$(DYNAMIC_PYTHON)" == "yes"
Bram Moolenaarb6356332005-07-18 21:40:44 +0000669CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \
670 -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000671PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib
672!else
673PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
674!endif
675!endif
676
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200677# PYTHON3 interface
678!ifdef PYTHON3
679!ifndef PYTHON3_VER
680PYTHON3_VER = 31
681!endif
682!message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)"
683!if "$(DYNAMIC_PYTHON3)" == "yes"
684!message Python3 DLL will be loaded dynamically
685!endif
686CFLAGS = $(CFLAGS) -DFEAT_PYTHON3
687PYTHON3_OBJ = $(OUTDIR)\if_python3.obj
688PYTHON3_INC = /I "$(PYTHON3)\Include" /I "$(PYTHON3)\PC"
689!if "$(DYNAMIC_PYTHON3)" == "yes"
690CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON3 \
691 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
692PYTHON3_LIB = /nodefaultlib:python$(PYTHON3_VER).lib
693!else
694PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib
695!endif
696!endif
697
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000698# MzScheme interface
699!ifdef MZSCHEME
700!message MzScheme requested - root dir is "$(MZSCHEME)"
701!ifndef MZSCHEME_VER
702MZSCHEME_VER = 205_000
703!endif
704CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100705!if EXIST("$(MZSCHEME)\collects\scheme\base.ss") \
706 || EXIST("$(MZSCHEME)\collects\scheme\base.rkt")
707# for MzScheme >= 4 we need to include byte code for basic Scheme stuff
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000708MZSCHEME_EXTRA_DEP = mzscheme_base.c
709CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE
710!endif
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100711!if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib")
712MZSCHEME_MAIN_LIB=mzsch
713!else
714MZSCHEME_MAIN_LIB=racket
715!endif
716!if EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000717 && !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib")
718!message Building with Precise GC
719MZSCHEME_PRECISE_GC = yes
720CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC
721!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000722!if "$(DYNAMIC_MZSCHEME)" == "yes"
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000723!if "$(MZSCHEME_PRECISE_GC)" == "yes"
724!error MzScheme with Precise GC cannot be loaded dynamically
725!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000726!message MzScheme DLLs will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000727CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100728 -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000729 -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000730!else
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000731!if "$(MZSCHEME_DEBUG)" == "yes"
732CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC
733!endif
734!if "$(MZSCHEME_PRECISE_GC)" == "yes"
735# Precise GC does not use separate dll
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100736MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000737!else
Bram Moolenaarb6356332005-07-18 21:40:44 +0000738MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100739 $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000740!endif
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000741!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000742MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
743!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000744
Bram Moolenaar071d4272004-06-13 20:20:40 +0000745# Perl interface
746!ifdef PERL
747!ifndef PERL_VER
748PERL_VER = 56
749!endif
750!message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)"
751!if "$(DYNAMIC_PERL)" == "yes"
752!if $(PERL_VER) >= 56
753!message Perl DLL will be loaded dynamically
754!else
755!message Dynamic loading is not supported for Perl versions earlier than 5.6.0
756!message Reverting to static loading...
757!undef DYNAMIC_PERL
758!endif
759!endif
760
761# Is Perl installed in architecture-specific directories?
762!if exist($(PERL)\Bin\MSWin32-x86)
763PERL_ARCH = \MSWin32-x86
764!endif
765
766PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core
767
768# Version-dependent stuff
769!if $(PERL_VER) == 55
770PERL_LIB = $(PERL_INCDIR)\perl.lib
771!else
772PERL_DLL = perl$(PERL_VER).dll
773PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib
774!endif
775
776CFLAGS = $(CFLAGS) -DFEAT_PERL
777
778# Do we want to load Perl dynamically?
779!if "$(DYNAMIC_PERL)" == "yes"
780CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
781!undef PERL_LIB
782!endif
783
784PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
785PERL_INC = /I $(PERL_INCDIR)
786PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
787XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
788XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
789
790!endif
791
792#
793# Support Ruby interface
794#
795!ifdef RUBY
796# Set default value
797!ifndef RUBY_VER
798RUBY_VER = 18
799!endif
800!ifndef RUBY_VER_LONG
801RUBY_VER_LONG = 1.8
802!endif
803
804!if $(RUBY_VER) >= 18
805!ifndef RUBY_PLATFORM
806RUBY_PLATFORM = i386-mswin32
807!endif
808!ifndef RUBY_INSTALL_NAME
809RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
810!endif
811!else
812!ifndef RUBY_PLATFORM
813RUBY_PLATFORM = i586-mswin32
814!endif
815!ifndef RUBY_INSTALL_NAME
816RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
817!endif
818!endif # $(RUBY_VER) >= 18
819
820!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
821CFLAGS = $(CFLAGS) -DFEAT_RUBY
822RUBY_OBJ = $(OUTDIR)\if_ruby.obj
Bram Moolenaar69154f22010-07-18 21:42:34 +0200823!if $(RUBY_VER) >= 190
824RUBY_INC = /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)"
825!else
Bram Moolenaar071d4272004-06-13 20:20:40 +0000826RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
Bram Moolenaar69154f22010-07-18 21:42:34 +0200827!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000828RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
829# Do we want to load Ruby dynamically?
830!if "$(DYNAMIC_RUBY)" == "yes"
831!message Ruby DLL will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000832CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=$(RUBY_VER) \
833 -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000834!undef RUBY_LIB
835!endif
836!endif # RUBY
837
838#
839# Support PostScript printing
840#
841!if "$(POSTSCRIPT)" == "yes"
842CFLAGS = $(CFLAGS) -DMSWINPS
843!endif # POSTSCRIPT
844
845#
846# FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
847#
848!if "$(FEATURES)"==""
849FEATURES = BIG
850!endif
851CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
852
853#
Bram Moolenaard9d30582005-05-18 22:10:28 +0000854# Always generate the .pdb file, so that we get debug symbols that can be used
855# on a crash (doesn't add overhead to the executable).
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000856# Generate edit-and-continue debug info when no optimization - allows to
857# debug more conveniently (able to look at variables which are in registers)
Bram Moolenaard9d30582005-05-18 22:10:28 +0000858#
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000859CFLAGS = $(CFLAGS) /Fd$(OUTDIR)/ $(DEBUGINFO)
860LINK_PDB = /PDB:$(VIM).pdb -debug
Bram Moolenaard9d30582005-05-18 22:10:28 +0000861
862#
863# End extra feature include
Bram Moolenaar071d4272004-06-13 20:20:40 +0000864#
865!message
866
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000867conflags = /nologo /subsystem:$(SUBSYSTEM)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000868
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000869PATHDEF_SRC = $(OUTDIR)\pathdef.c
870
Bram Moolenaar071d4272004-06-13 20:20:40 +0000871!IF "$(MAP)" == "yes"
872# "/map" is for debugging
873conflags = $(conflags) /map
874!ELSEIF "$(MAP)" == "lines"
875# "/mapinfo:lines" is for debugging, only works for VC6 and later
876conflags = $(conflags) /map /mapinfo:lines
877!ENDIF
878
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000879LINKARGS1 = $(linkdebug) $(conflags)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000880LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200881 $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000882 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000883
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000884# Report link time code generation progress if used.
885!ifdef NODEBUG
Bram Moolenaarda2f99a2009-06-16 14:34:38 +0000886!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0")
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000887!if "$(OPTIMIZE)" != "SPACE"
888LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
889!endif
890!endif
891!endif
892
Bram Moolenaarb6356332005-07-18 21:40:44 +0000893all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \
894 GvimExt/gvimext.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +0000895
Bram Moolenaarb6356332005-07-18 21:40:44 +0000896$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200897 $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200898 $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) \
899 version.c version.h
Bram Moolenaarb6356332005-07-18 21:40:44 +0000900 $(CC) $(CFLAGS) version.c
Bram Moolenaar0dc065e2005-07-04 22:49:24 +0000901 $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200902 $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000903 $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
904 $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000906$(VIM): $(VIM).exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000907
908$(OUTDIR):
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000909 if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000910
911install.exe: dosinst.c
Bram Moolenaarb6356332005-07-18 21:40:44 +0000912 $(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \
Bram Moolenaarb230bd52010-05-25 21:02:00 +0200913 user32.lib ole32.lib advapi32.lib uuid.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000914 - if exist install.exe del install.exe
915 ren dosinst.exe install.exe
916
917uninstal.exe: uninstal.c
918 $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
919
920vimrun.exe: vimrun.c
921 $(CC) /nologo -DNDEBUG vimrun.c
922
923xxd/xxd.exe: xxd/xxd.c
924 cd xxd
925 $(MAKE) /NOLOGO -f Make_mvc.mak
926 cd ..
927
928GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
929 cd GvimExt
930 $(MAKE) /NOLOGO -f Makefile $(MAKEFLAGS_GVIMEXT)
931 cd ..
932
933
934tags: notags
935 $(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro
936
937notags:
938 - if exist tags del tags
939
940clean:
Bram Moolenaar02743632005-07-25 20:42:36 +0000941 - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000942 - if exist *.obj del *.obj
943 - if exist $(VIM).exe del $(VIM).exe
944 - if exist $(VIM).ilk del $(VIM).ilk
945 - if exist $(VIM).pdb del $(VIM).pdb
946 - if exist $(VIM).map del $(VIM).map
947 - if exist $(VIM).ncb del $(VIM).ncb
948 - if exist vimrun.exe del vimrun.exe
949 - if exist install.exe del install.exe
950 - if exist uninstal.exe del uninstal.exe
951 - if exist if_perl.c del if_perl.c
952 - if exist dimm.h del dimm.h
953 - if exist dimm_i.c del dimm_i.c
954 - if exist dimm.tlb del dimm.tlb
955 - if exist dosinst.exe del dosinst.exe
Bram Moolenaar2d6db762009-09-11 10:49:58 +0000956 - if exist mzscheme_base.c del mzscheme_base.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000957 cd xxd
958 $(MAKE) /NOLOGO -f Make_mvc.mak clean
959 cd ..
960 cd GvimExt
961 $(MAKE) /NOLOGO -f Makefile clean
962 cd ..
963 cd GvimExt
964 $(MAKE) /NOLOGO -f Makefile clean
965 cd ..
966 - if exist testdir\*.out del testdir\*.out
967
968test:
969 cd testdir
970 $(MAKE) /NOLOGO -f Make_dos.mak win32
971 cd ..
972
Bram Moolenaar34114692005-01-02 11:28:13 +0000973testclean:
974 cd testdir
975 $(MAKE) /NOLOGO -f Make_dos.mak clean
976 cd ..
977
Bram Moolenaar071d4272004-06-13 20:20:40 +0000978###########################################################################
979
980# Create a default rule for transforming .c files to .obj files in $(OUTDIR)
981# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000982!IF "$(MSVCVER)" == "4.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000983.c{$(OUTDIR)/}.obj:
984!ELSE
985.c{$(OUTDIR)/}.obj::
986!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000987 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000988
989# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
990# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000991!IF "$(MSVCVER)" == "4.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000992.cpp{$(OUTDIR)/}.obj:
993!ELSE
994.cpp{$(OUTDIR)/}.obj::
995!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000996 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000997
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200998$(OUTDIR)/blowfish.obj: $(OUTDIR) blowfish.c $(INCL)
999
Bram Moolenaaredac1852010-05-18 20:34:20 +02001000$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
Bram Moolenaar40e6a712010-05-16 22:32:54 +02001001
Bram Moolenaar071d4272004-06-13 20:20:40 +00001002$(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
1003
1004$(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
1005
1006$(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL)
1007
1008$(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL)
1009
1010$(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL)
1011
1012$(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL)
1013
1014$(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL)
1015
1016$(OUTDIR)/ex_docmd.obj: $(OUTDIR) ex_docmd.c $(INCL) ex_cmds.h
1017
1018$(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h
1019
1020$(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL)
1021
1022$(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
1023
1024$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
1025
1026$(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL)
1027
Bram Moolenaar58d98232005-07-23 22:25:46 +00001028$(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL)
1029
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001030$(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL)
Bram Moolenaar383f9bc2005-01-19 22:18:32 +00001031
Bram Moolenaar071d4272004-06-13 20:20:40 +00001032$(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL)
1033
Bram Moolenaar52b4b552005-03-07 23:00:57 +00001034$(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
1035
Bram Moolenaar071d4272004-06-13 20:20:40 +00001036$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL)
1037
1038$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
1039
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001040$(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL)
1041 $(CC) $(CFLAGS) $(LUA_INC) if_lua.c
1042
Bram Moolenaar071d4272004-06-13 20:20:40 +00001043if_perl.c : if_perl.xs typemap
Bram Moolenaarb6356332005-07-18 21:40:44 +00001044 $(PERL_EXE) $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
1045 -typemap typemap if_perl.xs > if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001046
1047$(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001048 $(CC) $(CFLAGS) $(PERL_INC) if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001049
1050$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001051 $(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001052
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00001053$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL) $(MZSCHEME_EXTRA_DEP)
Bram Moolenaar6a9aa372005-07-20 21:54:57 +00001054 $(CC) $(CFLAGS) if_mzsch.c \
Bram Moolenaarb6356332005-07-18 21:40:44 +00001055 -DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00001056mzscheme_base.c:
1057 $(MZSCHEME)\mzc --c-mods mzscheme_base.c ++lib scheme/base
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001058
Bram Moolenaar071d4272004-06-13 20:20:40 +00001059$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001060 $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001061
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001062$(OUTDIR)/if_python3.obj: $(OUTDIR) if_python3.c $(INCL)
1063 $(CC) $(CFLAGS) $(PYTHON3_INC) if_python3.c
1064
Bram Moolenaar071d4272004-06-13 20:20:40 +00001065$(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h
1066
1067$(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001068 $(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001069
1070$(OUTDIR)/if_sniff.obj: $(OUTDIR) if_sniff.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001071 $(CC) $(CFLAGS) if_sniff.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001072
1073$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001074 $(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001075
1076$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL)
1077
1078$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL)
1079
1080$(OUTDIR)/memfile.obj: $(OUTDIR) memfile.c $(INCL)
1081
1082$(OUTDIR)/memline.obj: $(OUTDIR) memline.c $(INCL)
1083
1084$(OUTDIR)/menu.obj: $(OUTDIR) menu.c $(INCL)
1085
1086$(OUTDIR)/message.obj: $(OUTDIR) message.c $(INCL)
1087
1088$(OUTDIR)/misc1.obj: $(OUTDIR) misc1.c $(INCL)
1089
1090$(OUTDIR)/misc2.obj: $(OUTDIR) misc2.c $(INCL)
1091
1092$(OUTDIR)/move.obj: $(OUTDIR) move.c $(INCL)
1093
1094$(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL)
1095
1096$(OUTDIR)/netbeans.obj: $(OUTDIR) netbeans.c $(NBDEBUG_SRC) $(INCL)
1097
1098$(OUTDIR)/normal.obj: $(OUTDIR) normal.c $(INCL)
1099
1100$(OUTDIR)/option.obj: $(OUTDIR) option.c $(INCL)
1101
1102$(OUTDIR)/ops.obj: $(OUTDIR) ops.c $(INCL)
1103
1104$(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL)
1105
1106$(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h
1107
1108$(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
1109
Bram Moolenaar8b6144b2006-02-08 09:20:24 +00001110$(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
1111 $(CC) $(CFLAGS) $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001112
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001113$(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL)
Bram Moolenaarbb15b652005-10-03 21:52:09 +00001114
Bram Moolenaar071d4272004-06-13 20:20:40 +00001115$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
1116
1117$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c $(INCL)
1118
1119$(OUTDIR)/screen.obj: $(OUTDIR) screen.c $(INCL)
1120
1121$(OUTDIR)/search.obj: $(OUTDIR) search.c $(INCL)
1122
Bram Moolenaaredac1852010-05-18 20:34:20 +02001123$(OUTDIR)/sha256.obj: $(OUTDIR) sha256.c $(INCL)
1124
Bram Moolenaar2e4096b2005-03-20 22:25:45 +00001125$(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL)
1126
Bram Moolenaar071d4272004-06-13 20:20:40 +00001127$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
1128
1129$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
1130
1131$(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL)
1132
1133$(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
1134
1135$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
1136
1137$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
1138
1139$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
Bram Moolenaarb6356332005-07-18 21:40:44 +00001140 $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001141
Bram Moolenaarcc448b32010-07-14 16:52:17 +02001142$(OUTDIR)/vim.res: $(OUTDIR) vim.rc gvim.exe.mnf version.h tools.bmp \
1143 tearoff.bmp vim.ico vim_error.ico \
1144 vim_alert.ico vim_info.ico vim_quest.ico
Bram Moolenaar071d4272004-06-13 20:20:40 +00001145 $(RC) /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc
1146
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +00001147iid_ole.c if_ole.h vim.tlb: if_ole.idl
Bram Moolenaarb6356332005-07-18 21:40:44 +00001148 midl /nologo /error none /proxy nul /iid iid_ole.c /tlb vim.tlb \
1149 /header if_ole.h if_ole.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +00001150
1151dimm.h dimm_i.c: dimm.idl
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +00001152 midl /nologo /error none /proxy nul dimm.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +00001153
1154$(OUTDIR)/dimm_i.obj: $(OUTDIR) dimm_i.c $(INCL)
1155
1156$(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
1157
Bram Moolenaar89cb5e02004-07-19 20:55:54 +00001158# $CFLAGS may contain backslashes and double quotes, escape them both.
1159E0_CFLAGS = $(CFLAGS:\=\\)
1160E_CFLAGS = $(E0_CFLAGS:"=\")
Bram Moolenaar77f66d62007-02-20 02:16:18 +00001161# ") stop the string
Bram Moolenaar89cb5e02004-07-19 20:55:54 +00001162
Bram Moolenaar8b6144b2006-02-08 09:20:24 +00001163$(PATHDEF_SRC): auto
1164 @echo creating $(PATHDEF_SRC)
1165 @echo /* pathdef.c */ > $(PATHDEF_SRC)
1166 @echo #include "vim.h" >> $(PATHDEF_SRC)
1167 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC)
1168 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC)
1169 @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC)
1170 @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC)
1171 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
1172 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001173
1174auto:
1175 if not exist auto/nul mkdir auto
1176
1177# End Custom Build
1178proto.h: \
Bram Moolenaar40e6a712010-05-16 22:32:54 +02001179 proto/blowfish.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001180 proto/buffer.pro \
1181 proto/charset.pro \
1182 proto/diff.pro \
1183 proto/digraph.pro \
1184 proto/edit.pro \
1185 proto/eval.pro \
1186 proto/ex_cmds.pro \
1187 proto/ex_cmds2.pro \
1188 proto/ex_docmd.pro \
1189 proto/ex_eval.pro \
1190 proto/ex_getln.pro \
1191 proto/fileio.pro \
1192 proto/getchar.pro \
Bram Moolenaar58d98232005-07-23 22:25:46 +00001193 proto/hardcopy.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001194 proto/hashtab.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001195 proto/main.pro \
1196 proto/mark.pro \
1197 proto/memfile.pro \
1198 proto/memline.pro \
1199 proto/menu.pro \
1200 proto/message.pro \
1201 proto/misc1.pro \
1202 proto/misc2.pro \
1203 proto/move.pro \
1204 proto/mbyte.pro \
1205 proto/normal.pro \
1206 proto/ops.pro \
1207 proto/option.pro \
1208 proto/os_mswin.pro \
1209 proto/os_win32.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001210 proto/popupmnu.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001211 proto/quickfix.pro \
1212 proto/regexp.pro \
1213 proto/screen.pro \
1214 proto/search.pro \
Bram Moolenaar40e6a712010-05-16 22:32:54 +02001215 proto/sha256.pro \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +00001216 proto/spell.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001217 proto/syntax.pro \
1218 proto/tag.pro \
1219 proto/term.pro \
1220 proto/ui.pro \
1221 proto/undo.pro \
1222 proto/window.pro \
1223 $(NETBEANS_PRO)
1224
Bram Moolenaarf193fff2006-04-27 00:02:13 +00001225.SUFFIXES: .cod .i
Bram Moolenaar551dbcc2006-04-25 22:13:59 +00001226
1227# Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake
1228# foo.cod"
1229.c.cod:
1230 $(CC) $(CFLAGS) /FAcs $<
1231
1232# Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i"
1233.c.i:
1234 $(CC) $(CFLAGS) /P /C $<
Bram Moolenaar362e1a32006-03-06 23:29:24 +00001235
1236
Bram Moolenaar071d4272004-06-13 20:20:40 +00001237# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: