blob: afc3994750697354a96f3b2d7c07ecbbf31f9af4 [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 Moolenaarda3cb832012-08-02 21:21:47 +020066# You must set RUBY_API_VER to RUBY_VER_LONG.
67# Don't set ruby API version to RUBY_VER like 191.
Bram Moolenaar7887d882005-07-01 22:33:52 +000068#
Bram Moolenaar071d4272004-06-13 20:20:40 +000069# Tcl interface:
70# TCL=[Path to Tcl directory]
71# DYNAMIC_TCL=yes (to load the Tcl DLL dynamically)
72# TCL_VER=[Tcl version, e.g. 80, 83] (default is 83)
73# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
74# You must set TCL_VER_LONG when you set TCL_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000075#
76# SNiFF+ interface: SNIFF=yes
77#
78# Cscope support: CSCOPE=yes
79#
80# Iconv library support (always dynamically loaded):
81# ICONV=[yes or no] (default is yes)
82#
83# Intl library support (always dynamically loaded):
84# GETTEXT=[yes or no] (default is yes)
85# See http://sourceforge.net/projects/gettext/
86#
87# PostScript printing: POSTSCRIPT=yes (default is no)
88#
89# Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
90#
91# XPM Image Support: XPM=[path to XPM directory]
Bram Moolenaarc6c1d8b2012-08-29 14:18:33 +020092# Default is "xpm", using the files included in the distribution.
93# Use "no" to disable this feature.
Bram Moolenaar7887d882005-07-01 22:33:52 +000094#
95# Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
96#
97# Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is
98# i386)
99#
100# Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400)
101#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000102# Debug version: DEBUG=yes
103# Mapfile: MAP=[no, yes or lines] (default is yes)
104# no: Don't write a mapfile.
105# yes: Write a normal mapfile.
106# lines: Write a mapfile with line numbers (only for VC6 and later)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000107#
108# Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
109# doesn't work)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000110#
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000111# Visual C Version: MSVCVER=m.n (default derived from nmake if undefined)
112#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000113# You can combine any of these interfaces
114#
115# Example: To build the non-debug, GUI version with Perl interface:
116# nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
117#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000118# DEBUG with Make_mvc.mak and Make_dvc.mak:
119# This makefile gives a fineness of control which is not supported in
120# Visual C++ configuration files. Therefore, debugging requires a bit of
121# extra work.
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000122# Make_dvc.mak is a Visual C++ project to access that support. It may be
123# badly out of date for the Visual C++ you are using...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000124# To use Make_dvc.mak:
125# 1) Build Vim with Make_mvc.mak.
126# Use a "DEBUG=yes" argument to build Vim with debug support.
127# E.g. the following builds gvimd.exe:
128# nmake -f Make_mvc.mak debug=yes gui=yes
129# 2) Use MS Devstudio and set it up to allow that file to be debugged:
130# i) Pass Make_dvc.mak to the IDE.
131# Use the "open workspace" menu entry to load Make_dvc.mak.
132# Alternatively, from the command line:
133# msdev /nologo Make_dvc.mak
134# Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
135# this and offer to convert it to their own format. Accept that.
136# It creates a file called Make_dvc.dsw which can then be used
137# for further operations. E.g.
138# msdev /nologo Make_dvc.dsw
139# ii) Set the built executable for debugging:
140# a) Alt+F7/Debug takes you to the Debug dialog.
141# b) Fill "Executable for debug session". e.g. gvimd.exe
142# c) Fill "Program arguments". e.g. -R dosinst.c
143# d) Complete the dialog
144# 3) You can now debug the executable you built with Make_mvc.mak
145#
146# Note: Make_dvc.mak builds vimrun.exe, because it must build something
147# to be a valid makefile..
148
149### See feature.h for a list of optionals.
150# If you want to build some optional features without modifying the source,
151# you can set DEFINES on the command line, e.g.,
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000152# nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000153
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000154# Build on both Windows NT/XP and Windows 9x
Bram Moolenaar071d4272004-06-13 20:20:40 +0000155
156TARGETOS = BOTH
157
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000158# Select one of eight object code directories, depends on GUI, OLE, DEBUG and
159# interfaces.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000160# If you change something else, do "make clean" first!
161!if "$(GUI)" == "yes"
162OBJDIR = .\ObjG
163!else
164OBJDIR = .\ObjC
165!endif
166!if "$(OLE)" == "yes"
167OBJDIR = $(OBJDIR)O
168!endif
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200169!ifdef LUA
170OBJDIR = $(OBJDIR)U
171!endif
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000172!ifdef PERL
173OBJDIR = $(OBJDIR)L
174!endif
175!ifdef PYTHON
176OBJDIR = $(OBJDIR)Y
177!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200178!ifdef PYTHON3
179OBJDIR = $(OBJDIR)H
180!endif
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000181!ifdef TCL
182OBJDIR = $(OBJDIR)T
183!endif
184!ifdef RUBY
185OBJDIR = $(OBJDIR)R
186!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000187!ifdef MZSCHEME
188OBJDIR = $(OBJDIR)Z
189!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000190!if "$(DEBUG)" == "yes"
191OBJDIR = $(OBJDIR)d
192!endif
193
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000194# Win32.mak requires that CPU be set appropriately.
195# To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000196
197!ifdef PROCESSOR_ARCHITECTURE
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000198# We're on Windows NT or using VC 6+
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000199! ifdef CPU
200ASSEMBLY_ARCHITECTURE=$(CPU)
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000201# Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7.
202! if ("$(ASSEMBLY_ARCHITECTURE)" == "i386") || ("$(ASSEMBLY_ARCHITECTURE)" == "I386")
203ASSEMBLY_ARCHITECTURE = x86
204! endif
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000205! else
Bram Moolenaar071d4272004-06-13 20:20:40 +0000206CPU = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000207ASSEMBLY_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000208! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000209CPU = i386
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000210! endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000211! endif
212!else # !PROCESSOR_ARCHITECTURE
213# We're on Windows 95
214CPU = i386
215!endif # !PROCESSOR_ARCHITECTURE
Bram Moolenaare2db4362012-09-05 17:57:39 +0200216OBJDIR = $(OBJDIR)$(CPU)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000217
Bram Moolenaar071d4272004-06-13 20:20:40 +0000218# Build a retail version by default
219
220!if "$(DEBUG)" != "yes"
221NODEBUG = 1
222!else
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000223!undef NODEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000224MAKEFLAGS_GVIMEXT = DEBUG=yes
225!endif
226
227
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000228# Get all sorts of useful, standard macros from the Platform SDK.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000229
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000230!include <Win32.mak>
Bram Moolenaar071d4272004-06-13 20:20:40 +0000231
Bram Moolenaar8cd213c2010-06-01 21:57:09 +0200232# Flag to turn on Win64 compatibility warnings for VC7.x and VC8.
Bram Moolenaar83d09bb2010-06-01 19:58:08 +0200233WP64CHECK = /Wp64
Bram Moolenaar071d4272004-06-13 20:20:40 +0000234
235#>>>>> path of the compiler and linker; name of include and lib directories
236# PATH = c:\msvc20\bin;$(PATH)
237# INCLUDE = c:\msvc20\include
238# LIB = c:\msvc20\lib
239
240!ifndef CTAGS
241CTAGS = ctags
242!endif
243
244!if "$(SNIFF)" == "yes"
245# SNIFF - Include support for SNiFF+.
246SNIFF_INCL = if_sniff.h
247SNIFF_OBJ = $(OBJDIR)/if_sniff.obj
Bram Moolenaarb6356332005-07-18 21:40:44 +0000248SNIFF_LIB = shell32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000249SNIFF_DEFS = -DFEAT_SNIFF
250# The SNiFF integration needs multithreaded libraries!
251MULTITHREADED = yes
252!endif
253
254!ifndef CSCOPE
255CSCOPE = yes
256!endif
257
258!if "$(CSCOPE)" == "yes"
259# CSCOPE - Include support for Cscope
260CSCOPE_INCL = if_cscope.h
261CSCOPE_OBJ = $(OBJDIR)/if_cscope.obj
262CSCOPE_DEFS = -DFEAT_CSCOPE
263!endif
264
265!ifndef NETBEANS
266NETBEANS = $(GUI)
267!endif
268
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000269# Only allow NETBEANS and XPM for a GUI build.
270!if "$(GUI)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000271!if "$(NETBEANS)" == "yes"
272# NETBEANS - Include support for Netbeans integration
273NETBEANS_PRO = proto/netbeans.pro
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000274NETBEANS_OBJ = $(OBJDIR)/netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000275NETBEANS_DEFS = -DFEAT_NETBEANS_INTG
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000276
277!if "$(NBDEBUG)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000278NBDEBUG_DEFS = -DNBDEBUG
279NBDEBUG_INCL = nbdebug.h
280NBDEBUG_SRC = nbdebug.c
281!endif
Bram Moolenaarb6356332005-07-18 21:40:44 +0000282NETBEANS_LIB = WSock32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000283!endif
284
Bram Moolenaarc6c1d8b2012-08-29 14:18:33 +0200285!ifndef XPM
286# XPM is not set, use the included xpm files, depending on the architecture.
Bram Moolenaare2db4362012-09-05 17:57:39 +0200287!if "$(CPU)" == "AMD64"
Bram Moolenaarc6c1d8b2012-08-29 14:18:33 +0200288XPM = xpm\x64
Bram Moolenaare2db4362012-09-05 17:57:39 +0200289!elseif "$(CPU)" == "i386"
Bram Moolenaarc6c1d8b2012-08-29 14:18:33 +0200290XPM = xpm\x86
Bram Moolenaare2db4362012-09-05 17:57:39 +0200291!else
292XPM = no
Bram Moolenaarc6c1d8b2012-08-29 14:18:33 +0200293!endif
294!endif
295!if "$(XPM)" != "no"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000296# XPM - Include support for XPM signs
Bram Moolenaarc6c1d8b2012-08-29 14:18:33 +0200297# See the xpm directory for more information.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000298XPM_OBJ = $(OBJDIR)/xpm_w32.obj
299XPM_DEFS = -DFEAT_XPM_W32
300XPM_LIB = $(XPM)\lib\libXpm.lib
Bram Moolenaarc6c1d8b2012-08-29 14:18:33 +0200301XPM_INC = -I $(XPM)\include -I $(XPM)\..\include
Bram Moolenaar071d4272004-06-13 20:20:40 +0000302!endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000303!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000305# Set which version of the CRT to use
Bram Moolenaar071d4272004-06-13 20:20:40 +0000306!if defined(USE_MSVCRT)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000307# CVARS = $(cvarsdll)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000308# !elseif defined(MULTITHREADED)
309# CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000310!else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000311# CVARS = $(cvars)
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000312# CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000313!endif
314
315# need advapi32.lib for GetUserName()
316# need shell32.lib for ExtractIcon()
317# gdi32.lib and comdlg32.lib for printing support
318# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000319CON_LIB = oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \
320 comdlg32.lib ole32.lib uuid.lib /machine:$(CPU) /nodefaultlib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000321!if "$(DELAYLOAD)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000322CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
323!endif
324
325### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
326# When set to 0x0500 ":browse" stops working.
327!ifndef WINVER
328WINVER = 0x0400
329!endif
330
331# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
332# default, use these lines.
333#VIMRCLOC = somewhere
334#VIMRUNTIMEDIR = somewhere
335
336CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
337 $(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) \
338 $(NBDEBUG_DEFS) $(XPM_DEFS) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000339 $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
340 /Fo$(OUTDIR)/
Bram Moolenaar071d4272004-06-13 20:20:40 +0000341
342#>>>>> end of choices
343###########################################################################
344
345!ifdef OS
346OS_TYPE = winnt
347DEL_TREE = rmdir /s /q
348!else
349OS_TYPE = win95
350DEL_TREE = deltree /y
351!endif
352
353INTDIR=$(OBJDIR)
354OUTDIR=$(OBJDIR)
355
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000356# Derive version of VC being used from nmake if not specified
357!if "$(MSVCVER)" == ""
358!if "$(_NMAKE_VER)" == ""
359MSVCVER = 4.0
360!endif
361!if "$(_NMAKE_VER)" == "162"
362MSVCVER = 5.0
363!endif
364!if "$(_NMAKE_VER)" == "6.00.8168.0"
365MSVCVER = 6.0
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000366CPU = ix86
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000367!endif
368!if "$(_NMAKE_VER)" == "7.00.9466"
369MSVCVER = 7.0
370!endif
371!if "$(_NMAKE_VER)" == "7.10.3077"
372MSVCVER = 7.1
373!endif
374!if "$(_NMAKE_VER)" == "8.00.50727.42"
375MSVCVER = 8.0
376!endif
377!if "$(_NMAKE_VER)" == "8.00.50727.762"
378MSVCVER = 8.0
379!endif
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000380!if "$(_NMAKE_VER)" == "9.00.20706.01"
381MSVCVER = 9.0
382!endif
Bram Moolenaara7241f52008-06-24 20:39:31 +0000383!if "$(_NMAKE_VER)" == "9.00.21022.08"
384MSVCVER = 9.0
385!endif
Bram Moolenaar13658312009-02-04 17:35:52 +0000386!if "$(_NMAKE_VER)" == "9.00.30729.01"
387MSVCVER = 9.0
388!endif
Bram Moolenaarda2f99a2009-06-16 14:34:38 +0000389!if "$(_NMAKE_VER)" == "10.00.20506.01"
390MSVCVER = 10.0
391!endif
Bram Moolenaar2498b3a2010-03-02 17:59:44 +0100392!if "$(_NMAKE_VER)" == "10.00.30128.01"
393MSVCVER = 10.0
394!endif
Bram Moolenaar218116c2010-05-20 21:46:00 +0200395!if "$(_NMAKE_VER)" == "10.00.30319.01"
396MSVCVER = 10.0
397!endif
Bram Moolenaar2b017fa2012-09-18 18:27:12 +0200398!if "$(_NMAKE_VER)" == "11.00.50727.1"
399MSVCVER = 11.0
400!endif
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000401!endif
402
403# Abort bulding VIM if version of VC is unrecognised.
404!ifndef MSVCVER
405!message *** ERROR
406!message Cannot determine Visual C version being used. If you are using the
407!message Windows SDK then you must have the environment variable MSVCVER set to
408!message your version of the VC compiler. If you are not using the Express
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000409!message version of Visual C, you can either set MSVCVER or update this makefile
410!message to handle the new value for _NMAKE_VER, "$(_NMAKE_VER)".
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000411!error Make aborted.
412!endif
413
Bram Moolenaar071d4272004-06-13 20:20:40 +0000414# Convert processor ID to MVC-compatible number
Bram Moolenaar2b017fa2012-09-18 18:27:12 +0200415!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000416!if "$(CPUNR)" == "i386"
417CPUARG = /G3
418!elseif "$(CPUNR)" == "i486"
419CPUARG = /G4
420!elseif "$(CPUNR)" == "i586"
421CPUARG = /G5
422!elseif "$(CPUNR)" == "i686"
423CPUARG = /G6
Bram Moolenaarcf3630f2005-01-08 16:04:29 +0000424!elseif "$(CPUNR)" == "pentium4"
Bram Moolenaar34114692005-01-02 11:28:13 +0000425CPUARG = /G7 /arch:SSE2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000426!else
427CPUARG =
428!endif
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000429!else
Bram Moolenaar3ed16dc2011-06-12 20:31:31 +0200430# VC8/9/10 only allows specifying SSE architecture but only for 32bit
431!if "$(ASSEMBLY_ARCHITECTURE)" == "x86" && "$(CPUNR)" == "pentium4"
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000432CPUARG = /arch:SSE2
433!endif
434!endif
435
436LIBC =
437DEBUGINFO = /Zi
Bram Moolenaar071d4272004-06-13 20:20:40 +0000438
439!ifdef NODEBUG
440VIM = vim
441!if "$(OPTIMIZE)" == "SPACE"
442OPTFLAG = /O1
443!elseif "$(OPTIMIZE)" == "SPEED"
444OPTFLAG = /O2
445!else # MAXSPEED
446OPTFLAG = /Ox
447!endif
Bram Moolenaar83d09bb2010-06-01 19:58:08 +0200448
Bram Moolenaar2b017fa2012-09-18 18:27:12 +0200449!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0")
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000450# Use link time code generation if not worried about size
451!if "$(OPTIMIZE)" != "SPACE"
452OPTFLAG = $(OPTFLAG) /GL
453!endif
454!endif
Bram Moolenaar83d09bb2010-06-01 19:58:08 +0200455
456# (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
457!if ("$(MSVCVER)" == "7.0") || ("$(MSVCVER)" == "7.1") || ("$(MSVCVER)" == "8.0")
458CFLAGS=$(CFLAGS) $(WP64CHECK)
459!endif
460
Bram Moolenaar34114692005-01-02 11:28:13 +0000461CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000462RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000463! ifdef USE_MSVCRT
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000464CFLAGS = $(CFLAGS) /MD
Bram Moolenaar071d4272004-06-13 20:20:40 +0000465LIBC = msvcrt.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000466! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000467LIBC = libcmt.lib
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000468CFLAGS = $(CFLAGS) /Zl /MT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000469! endif
470!else # DEBUG
471VIM = vimd
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000472! if ("$(CPU)" == "i386") || ("$(CPU)" == "ix86")
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000473DEBUGINFO = /ZI
474! endif
Bram Moolenaard9d30582005-05-18 22:10:28 +0000475CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
Bram Moolenaar071d4272004-06-13 20:20:40 +0000476RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
477# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000478! if "$(MSVCVER)" == "4.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000479LIBC =
480! else
481LIBC = /fixed:no
482! endif
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000483! ifdef USE_MSVCRT
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000484CFLAGS = $(CFLAGS) /MDd
Bram Moolenaar071d4272004-06-13 20:20:40 +0000485LIBC = $(LIBC) msvcrtd.lib
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000486! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000487LIBC = $(LIBC) libcmtd.lib
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000488CFLAGS = $(CFLAGS) /Zl /MTd
Bram Moolenaar071d4272004-06-13 20:20:40 +0000489! endif
490!endif # DEBUG
491
492INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
493 proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \
494 $(NBDEBUG_INCL)
495
496OBJ = \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200497 $(OUTDIR)\blowfish.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000498 $(OUTDIR)\buffer.obj \
499 $(OUTDIR)\charset.obj \
500 $(OUTDIR)\diff.obj \
501 $(OUTDIR)\digraph.obj \
502 $(OUTDIR)\edit.obj \
503 $(OUTDIR)\eval.obj \
504 $(OUTDIR)\ex_cmds.obj \
505 $(OUTDIR)\ex_cmds2.obj \
506 $(OUTDIR)\ex_docmd.obj \
507 $(OUTDIR)\ex_eval.obj \
508 $(OUTDIR)\ex_getln.obj \
509 $(OUTDIR)\fileio.obj \
510 $(OUTDIR)\fold.obj \
511 $(OUTDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000512 $(OUTDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000513 $(OUTDIR)\hashtab.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000514 $(OUTDIR)\main.obj \
515 $(OUTDIR)\mark.obj \
516 $(OUTDIR)\mbyte.obj \
517 $(OUTDIR)\memfile.obj \
518 $(OUTDIR)\memline.obj \
519 $(OUTDIR)\menu.obj \
520 $(OUTDIR)\message.obj \
521 $(OUTDIR)\misc1.obj \
522 $(OUTDIR)\misc2.obj \
523 $(OUTDIR)\move.obj \
524 $(OUTDIR)\normal.obj \
525 $(OUTDIR)\ops.obj \
526 $(OUTDIR)\option.obj \
527 $(OUTDIR)\os_mswin.obj \
528 $(OUTDIR)\os_win32.obj \
529 $(OUTDIR)\pathdef.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000530 $(OUTDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000531 $(OUTDIR)\quickfix.obj \
532 $(OUTDIR)\regexp.obj \
533 $(OUTDIR)\screen.obj \
534 $(OUTDIR)\search.obj \
Bram Moolenaaredac1852010-05-18 20:34:20 +0200535 $(OUTDIR)\sha256.obj \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000536 $(OUTDIR)\spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000537 $(OUTDIR)\syntax.obj \
538 $(OUTDIR)\tag.obj \
539 $(OUTDIR)\term.obj \
540 $(OUTDIR)\ui.obj \
541 $(OUTDIR)\undo.obj \
542 $(OUTDIR)\window.obj \
543 $(OUTDIR)\vim.res
544
545!if "$(OLE)" == "yes"
546CFLAGS = $(CFLAGS) -DFEAT_OLE
547RCFLAGS = $(RCFLAGS) -DFEAT_OLE
548OLE_OBJ = $(OUTDIR)\if_ole.obj
549OLE_IDL = if_ole.idl
550OLE_LIB = oleaut32.lib
551!endif
552
553!if "$(IME)" == "yes"
554CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME
555!ifndef DYNAMIC_IME
556DYNAMIC_IME = yes
557!endif
558!if "$(DYNAMIC_IME)" == "yes"
559CFLAGS = $(CFLAGS) -DDYNAMIC_IME
560!else
561IME_LIB = imm32.lib
562!endif
563!endif
564
565!if "$(GIME)" == "yes"
566CFLAGS = $(CFLAGS) -DGLOBAL_IME
567OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj
568MBYTE = yes
569!endif
570
571!if "$(MBYTE)" == "yes"
572CFLAGS = $(CFLAGS) -DFEAT_MBYTE
573!endif
574
575!if "$(GUI)" == "yes"
576SUBSYSTEM = windows
577CFLAGS = $(CFLAGS) -DFEAT_GUI_W32
578RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32
579VIM = g$(VIM)
580GUI_INCL = \
581 gui.h \
582 regexp.h \
583 ascii.h \
584 ex_cmds.h \
585 farsi.h \
586 feature.h \
587 globals.h \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000588 gui_beval.h \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000589 keymap.h \
590 macros.h \
591 option.h \
592 os_dos.h \
593 os_win32.h
594GUI_OBJ = \
595 $(OUTDIR)\gui.obj \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000596 $(OUTDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000597 $(OUTDIR)\gui_w32.obj \
598 $(OUTDIR)\os_w32exe.obj
599GUI_LIB = \
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000600 gdi32.lib version.lib $(IME_LIB) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000601 winspool.lib comctl32.lib advapi32.lib shell32.lib \
602 /machine:$(CPU) /nodefaultlib
603!else
604SUBSYSTEM = console
605!endif
606
607# iconv.dll library (dynamically loaded)
608!ifndef ICONV
609ICONV = yes
610!endif
611!if "$(ICONV)" == "yes"
612CFLAGS = $(CFLAGS) -DDYNAMIC_ICONV
613!endif
614
615# libintl.dll library
616!ifndef GETTEXT
617GETTEXT = yes
618!endif
619!if "$(GETTEXT)" == "yes"
620CFLAGS = $(CFLAGS) -DDYNAMIC_GETTEXT
621!endif
622
623# TCL interface
624!ifdef TCL
625!ifndef TCL_VER
626TCL_VER = 83
627TCL_VER_LONG = 8.3
628!endif
629!message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)"
630!if "$(DYNAMIC_TCL)" == "yes"
631!message Tcl DLL will be loaded dynamically
632TCL_DLL = tcl$(TCL_VER).dll
Bram Moolenaarb6356332005-07-18 21:40:44 +0000633CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \
634 -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000635TCL_OBJ = $(OUTDIR)\if_tcl.obj
636TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
Bram Moolenaar84a4c332012-02-22 16:01:56 +0100637TCL_LIB = "$(TCL)\lib\tclstub$(TCL_VER).lib"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000638!else
639CFLAGS = $(CFLAGS) -DFEAT_TCL
640TCL_OBJ = $(OUTDIR)\if_tcl.obj
641TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
642TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib
643!endif
644!endif
645
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200646# Lua interface
647!ifdef LUA
648!ifndef LUA_VER
649LUA_VER = 51
650!endif
651!message Lua requested (version $(LUA_VER)) - root dir is "$(LUA)"
652!if "$(DYNAMIC_LUA)" == "yes"
653!message Lua DLL will be loaded dynamically
654!endif
655CFLAGS = $(CFLAGS) -DFEAT_LUA
656LUA_OBJ = $(OUTDIR)\if_lua.obj
657LUA_INC = /I "$(LUA)\include" /I "$(LUA)"
658!if "$(DYNAMIC_LUA)" == "yes"
659CFLAGS = $(CFLAGS) -DDYNAMIC_LUA \
660 -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
661LUA_LIB = /nodefaultlib:lua$(LUA_VER).lib
662!else
663LUA_LIB = "$(LUA)\lib\lua$(LUA_VER).lib"
664!endif
665!endif
666
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200667!ifdef PYTHON
668!ifdef PYTHON3
669DYNAMIC_PYTHON=yes
670DYNAMIC_PYTHON3=yes
671!endif
672!endif
673
Bram Moolenaar071d4272004-06-13 20:20:40 +0000674# PYTHON interface
675!ifdef PYTHON
676!ifndef PYTHON_VER
677PYTHON_VER = 22
678!endif
679!message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)"
680!if "$(DYNAMIC_PYTHON)" == "yes"
681!message Python DLL will be loaded dynamically
682!endif
683CFLAGS = $(CFLAGS) -DFEAT_PYTHON
684PYTHON_OBJ = $(OUTDIR)\if_python.obj
685PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC"
686!if "$(DYNAMIC_PYTHON)" == "yes"
Bram Moolenaarb6356332005-07-18 21:40:44 +0000687CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \
688 -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000689PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib
690!else
691PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
692!endif
693!endif
694
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200695# PYTHON3 interface
696!ifdef PYTHON3
697!ifndef PYTHON3_VER
698PYTHON3_VER = 31
699!endif
700!message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)"
701!if "$(DYNAMIC_PYTHON3)" == "yes"
702!message Python3 DLL will be loaded dynamically
703!endif
704CFLAGS = $(CFLAGS) -DFEAT_PYTHON3
705PYTHON3_OBJ = $(OUTDIR)\if_python3.obj
706PYTHON3_INC = /I "$(PYTHON3)\Include" /I "$(PYTHON3)\PC"
707!if "$(DYNAMIC_PYTHON3)" == "yes"
708CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON3 \
709 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
710PYTHON3_LIB = /nodefaultlib:python$(PYTHON3_VER).lib
711!else
712PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib
713!endif
714!endif
715
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000716# MzScheme interface
717!ifdef MZSCHEME
718!message MzScheme requested - root dir is "$(MZSCHEME)"
719!ifndef MZSCHEME_VER
720MZSCHEME_VER = 205_000
721!endif
722CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100723!if EXIST("$(MZSCHEME)\collects\scheme\base.ss") \
724 || EXIST("$(MZSCHEME)\collects\scheme\base.rkt")
725# for MzScheme >= 4 we need to include byte code for basic Scheme stuff
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000726MZSCHEME_EXTRA_DEP = mzscheme_base.c
727CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE
728!endif
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100729!if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib")
730MZSCHEME_MAIN_LIB=mzsch
731!else
732MZSCHEME_MAIN_LIB=racket
733!endif
734!if EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000735 && !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib")
736!message Building with Precise GC
737MZSCHEME_PRECISE_GC = yes
738CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC
739!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000740!if "$(DYNAMIC_MZSCHEME)" == "yes"
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000741!if "$(MZSCHEME_PRECISE_GC)" == "yes"
742!error MzScheme with Precise GC cannot be loaded dynamically
743!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000744!message MzScheme DLLs will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000745CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100746 -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000747 -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000748!else
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000749!if "$(MZSCHEME_DEBUG)" == "yes"
750CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC
751!endif
752!if "$(MZSCHEME_PRECISE_GC)" == "yes"
753# Precise GC does not use separate dll
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100754MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000755!else
Bram Moolenaarb6356332005-07-18 21:40:44 +0000756MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100757 $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000758!endif
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000759!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000760MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
Bram Moolenaarbbc98db2012-02-12 01:55:55 +0100761# increase stack size
762MZSCHEME_LIB = $(MZSCHEME_LIB) /STACK:8388608
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000763!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000764
Bram Moolenaar071d4272004-06-13 20:20:40 +0000765# Perl interface
766!ifdef PERL
767!ifndef PERL_VER
768PERL_VER = 56
769!endif
770!message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)"
771!if "$(DYNAMIC_PERL)" == "yes"
772!if $(PERL_VER) >= 56
773!message Perl DLL will be loaded dynamically
774!else
775!message Dynamic loading is not supported for Perl versions earlier than 5.6.0
776!message Reverting to static loading...
777!undef DYNAMIC_PERL
778!endif
779!endif
780
781# Is Perl installed in architecture-specific directories?
782!if exist($(PERL)\Bin\MSWin32-x86)
783PERL_ARCH = \MSWin32-x86
784!endif
785
786PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core
787
788# Version-dependent stuff
789!if $(PERL_VER) == 55
790PERL_LIB = $(PERL_INCDIR)\perl.lib
791!else
792PERL_DLL = perl$(PERL_VER).dll
793PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib
794!endif
795
796CFLAGS = $(CFLAGS) -DFEAT_PERL
797
798# Do we want to load Perl dynamically?
799!if "$(DYNAMIC_PERL)" == "yes"
800CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
801!undef PERL_LIB
802!endif
803
804PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
805PERL_INC = /I $(PERL_INCDIR)
806PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
807XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
Bram Moolenaar52f83172011-09-14 19:01:42 +0200808!if exist($(XSUBPP))
Bram Moolenaar612af432011-09-14 10:49:46 +0200809XSUBPP = $(PERL_EXE) $(XSUBPP)
810!else
811XSUBPP = xsubpp
812!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000813XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
814
815!endif
816
817#
818# Support Ruby interface
819#
820!ifdef RUBY
821# Set default value
822!ifndef RUBY_VER
823RUBY_VER = 18
824!endif
825!ifndef RUBY_VER_LONG
826RUBY_VER_LONG = 1.8
827!endif
Bram Moolenaarda3cb832012-08-02 21:21:47 +0200828!ifndef RUBY_API_VER
829RUBY_API_VER = $(RUBY_VER_LONG:.=)
830!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000831
832!if $(RUBY_VER) >= 18
833!ifndef RUBY_PLATFORM
834RUBY_PLATFORM = i386-mswin32
835!endif
836!ifndef RUBY_INSTALL_NAME
Bram Moolenaarda3cb832012-08-02 21:21:47 +0200837RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000838!endif
839!else
840!ifndef RUBY_PLATFORM
841RUBY_PLATFORM = i586-mswin32
842!endif
843!ifndef RUBY_INSTALL_NAME
Bram Moolenaarda3cb832012-08-02 21:21:47 +0200844RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000845!endif
846!endif # $(RUBY_VER) >= 18
847
848!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
849CFLAGS = $(CFLAGS) -DFEAT_RUBY
850RUBY_OBJ = $(OUTDIR)\if_ruby.obj
Bram Moolenaarda3cb832012-08-02 21:21:47 +0200851!if $(RUBY_VER) >= 19
852RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
Bram Moolenaar69154f22010-07-18 21:42:34 +0200853!else
Bram Moolenaar071d4272004-06-13 20:20:40 +0000854RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
Bram Moolenaar69154f22010-07-18 21:42:34 +0200855!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000856RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
857# Do we want to load Ruby dynamically?
858!if "$(DYNAMIC_RUBY)" == "yes"
859!message Ruby DLL will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000860CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=$(RUBY_VER) \
861 -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000862!undef RUBY_LIB
863!endif
864!endif # RUBY
865
866#
867# Support PostScript printing
868#
869!if "$(POSTSCRIPT)" == "yes"
870CFLAGS = $(CFLAGS) -DMSWINPS
871!endif # POSTSCRIPT
872
873#
874# FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
875#
876!if "$(FEATURES)"==""
877FEATURES = BIG
878!endif
879CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
880
881#
Bram Moolenaard9d30582005-05-18 22:10:28 +0000882# Always generate the .pdb file, so that we get debug symbols that can be used
883# on a crash (doesn't add overhead to the executable).
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000884# Generate edit-and-continue debug info when no optimization - allows to
885# debug more conveniently (able to look at variables which are in registers)
Bram Moolenaard9d30582005-05-18 22:10:28 +0000886#
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000887CFLAGS = $(CFLAGS) /Fd$(OUTDIR)/ $(DEBUGINFO)
888LINK_PDB = /PDB:$(VIM).pdb -debug
Bram Moolenaard9d30582005-05-18 22:10:28 +0000889
890#
891# End extra feature include
Bram Moolenaar071d4272004-06-13 20:20:40 +0000892#
893!message
894
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000895conflags = /nologo /subsystem:$(SUBSYSTEM)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000896
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000897PATHDEF_SRC = $(OUTDIR)\pathdef.c
898
Bram Moolenaar071d4272004-06-13 20:20:40 +0000899!IF "$(MAP)" == "yes"
900# "/map" is for debugging
901conflags = $(conflags) /map
902!ELSEIF "$(MAP)" == "lines"
903# "/mapinfo:lines" is for debugging, only works for VC6 and later
904conflags = $(conflags) /map /mapinfo:lines
905!ENDIF
906
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000907LINKARGS1 = $(linkdebug) $(conflags)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000908LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200909 $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000910 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000911
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000912# Report link time code generation progress if used.
913!ifdef NODEBUG
Bram Moolenaarda2f99a2009-06-16 14:34:38 +0000914!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0")
Bram Moolenaarf22129b2007-10-03 11:29:44 +0000915!if "$(OPTIMIZE)" != "SPACE"
916LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
917!endif
918!endif
919!endif
920
Bram Moolenaarb6356332005-07-18 21:40:44 +0000921all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \
922 GvimExt/gvimext.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +0000923
Bram Moolenaarb6356332005-07-18 21:40:44 +0000924$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200925 $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200926 $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) \
927 version.c version.h
Bram Moolenaarb6356332005-07-18 21:40:44 +0000928 $(CC) $(CFLAGS) version.c
Bram Moolenaar0dc065e2005-07-04 22:49:24 +0000929 $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200930 $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000931 $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
932 $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000933
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000934$(VIM): $(VIM).exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000935
936$(OUTDIR):
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000937 if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000938
939install.exe: dosinst.c
Bram Moolenaarb6356332005-07-18 21:40:44 +0000940 $(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \
Bram Moolenaarb230bd52010-05-25 21:02:00 +0200941 user32.lib ole32.lib advapi32.lib uuid.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000942 - if exist install.exe del install.exe
943 ren dosinst.exe install.exe
944
945uninstal.exe: uninstal.c
946 $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
947
948vimrun.exe: vimrun.c
949 $(CC) /nologo -DNDEBUG vimrun.c
950
951xxd/xxd.exe: xxd/xxd.c
952 cd xxd
953 $(MAKE) /NOLOGO -f Make_mvc.mak
954 cd ..
955
956GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
957 cd GvimExt
958 $(MAKE) /NOLOGO -f Makefile $(MAKEFLAGS_GVIMEXT)
959 cd ..
960
961
962tags: notags
963 $(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro
964
965notags:
966 - if exist tags del tags
967
968clean:
Bram Moolenaar02743632005-07-25 20:42:36 +0000969 - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000970 - if exist *.obj del *.obj
971 - if exist $(VIM).exe del $(VIM).exe
972 - if exist $(VIM).ilk del $(VIM).ilk
973 - if exist $(VIM).pdb del $(VIM).pdb
974 - if exist $(VIM).map del $(VIM).map
975 - if exist $(VIM).ncb del $(VIM).ncb
976 - if exist vimrun.exe del vimrun.exe
977 - if exist install.exe del install.exe
978 - if exist uninstal.exe del uninstal.exe
979 - if exist if_perl.c del if_perl.c
980 - if exist dimm.h del dimm.h
981 - if exist dimm_i.c del dimm_i.c
982 - if exist dimm.tlb del dimm.tlb
983 - if exist dosinst.exe del dosinst.exe
Bram Moolenaar2d6db762009-09-11 10:49:58 +0000984 - if exist mzscheme_base.c del mzscheme_base.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000985 cd xxd
986 $(MAKE) /NOLOGO -f Make_mvc.mak clean
987 cd ..
988 cd GvimExt
989 $(MAKE) /NOLOGO -f Makefile clean
990 cd ..
991 cd GvimExt
992 $(MAKE) /NOLOGO -f Makefile clean
993 cd ..
994 - if exist testdir\*.out del testdir\*.out
995
996test:
997 cd testdir
998 $(MAKE) /NOLOGO -f Make_dos.mak win32
999 cd ..
1000
Bram Moolenaar34114692005-01-02 11:28:13 +00001001testclean:
1002 cd testdir
1003 $(MAKE) /NOLOGO -f Make_dos.mak clean
1004 cd ..
1005
Bram Moolenaar071d4272004-06-13 20:20:40 +00001006###########################################################################
1007
1008# Create a default rule for transforming .c files to .obj files in $(OUTDIR)
1009# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
Bram Moolenaarf22129b2007-10-03 11:29:44 +00001010!IF "$(MSVCVER)" == "4.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001011.c{$(OUTDIR)/}.obj:
1012!ELSE
1013.c{$(OUTDIR)/}.obj::
1014!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +00001015 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +00001016
1017# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
1018# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
Bram Moolenaarf22129b2007-10-03 11:29:44 +00001019!IF "$(MSVCVER)" == "4.0"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001020.cpp{$(OUTDIR)/}.obj:
1021!ELSE
1022.cpp{$(OUTDIR)/}.obj::
1023!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +00001024 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +00001025
Bram Moolenaar40e6a712010-05-16 22:32:54 +02001026$(OUTDIR)/blowfish.obj: $(OUTDIR) blowfish.c $(INCL)
1027
Bram Moolenaaredac1852010-05-18 20:34:20 +02001028$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
Bram Moolenaar40e6a712010-05-16 22:32:54 +02001029
Bram Moolenaar071d4272004-06-13 20:20:40 +00001030$(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
1031
1032$(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
1033
1034$(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL)
1035
1036$(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL)
1037
1038$(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL)
1039
1040$(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL)
1041
1042$(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL)
1043
1044$(OUTDIR)/ex_docmd.obj: $(OUTDIR) ex_docmd.c $(INCL) ex_cmds.h
1045
1046$(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h
1047
1048$(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL)
1049
1050$(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
1051
1052$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
1053
1054$(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL)
1055
Bram Moolenaar58d98232005-07-23 22:25:46 +00001056$(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL)
1057
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001058$(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL)
Bram Moolenaar383f9bc2005-01-19 22:18:32 +00001059
Bram Moolenaar071d4272004-06-13 20:20:40 +00001060$(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL)
1061
Bram Moolenaar52b4b552005-03-07 23:00:57 +00001062$(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
1063
Bram Moolenaar071d4272004-06-13 20:20:40 +00001064$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL)
1065
1066$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
1067
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001068$(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL)
1069 $(CC) $(CFLAGS) $(LUA_INC) if_lua.c
1070
Bram Moolenaar071d4272004-06-13 20:20:40 +00001071if_perl.c : if_perl.xs typemap
Bram Moolenaar612af432011-09-14 10:49:46 +02001072 $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
Bram Moolenaarb6356332005-07-18 21:40:44 +00001073 -typemap typemap if_perl.xs > if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001074
1075$(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001076 $(CC) $(CFLAGS) $(PERL_INC) if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001077
1078$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001079 $(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001080
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00001081$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL) $(MZSCHEME_EXTRA_DEP)
Bram Moolenaar6a9aa372005-07-20 21:54:57 +00001082 $(CC) $(CFLAGS) if_mzsch.c \
Bram Moolenaarb6356332005-07-18 21:40:44 +00001083 -DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00001084mzscheme_base.c:
1085 $(MZSCHEME)\mzc --c-mods mzscheme_base.c ++lib scheme/base
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001086
Bram Moolenaar071d4272004-06-13 20:20:40 +00001087$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001088 $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001089
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001090$(OUTDIR)/if_python3.obj: $(OUTDIR) if_python3.c $(INCL)
1091 $(CC) $(CFLAGS) $(PYTHON3_INC) if_python3.c
1092
Bram Moolenaar071d4272004-06-13 20:20:40 +00001093$(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h
1094
1095$(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001096 $(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001097
1098$(OUTDIR)/if_sniff.obj: $(OUTDIR) if_sniff.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001099 $(CC) $(CFLAGS) if_sniff.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001100
1101$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +00001102 $(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001103
1104$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL)
1105
1106$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL)
1107
1108$(OUTDIR)/memfile.obj: $(OUTDIR) memfile.c $(INCL)
1109
1110$(OUTDIR)/memline.obj: $(OUTDIR) memline.c $(INCL)
1111
1112$(OUTDIR)/menu.obj: $(OUTDIR) menu.c $(INCL)
1113
1114$(OUTDIR)/message.obj: $(OUTDIR) message.c $(INCL)
1115
1116$(OUTDIR)/misc1.obj: $(OUTDIR) misc1.c $(INCL)
1117
1118$(OUTDIR)/misc2.obj: $(OUTDIR) misc2.c $(INCL)
1119
1120$(OUTDIR)/move.obj: $(OUTDIR) move.c $(INCL)
1121
1122$(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL)
1123
1124$(OUTDIR)/netbeans.obj: $(OUTDIR) netbeans.c $(NBDEBUG_SRC) $(INCL)
1125
1126$(OUTDIR)/normal.obj: $(OUTDIR) normal.c $(INCL)
1127
1128$(OUTDIR)/option.obj: $(OUTDIR) option.c $(INCL)
1129
1130$(OUTDIR)/ops.obj: $(OUTDIR) ops.c $(INCL)
1131
1132$(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL)
1133
1134$(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h
1135
1136$(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
1137
Bram Moolenaar8b6144b2006-02-08 09:20:24 +00001138$(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
1139 $(CC) $(CFLAGS) $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001140
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001141$(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL)
Bram Moolenaarbb15b652005-10-03 21:52:09 +00001142
Bram Moolenaar071d4272004-06-13 20:20:40 +00001143$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
1144
1145$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c $(INCL)
1146
1147$(OUTDIR)/screen.obj: $(OUTDIR) screen.c $(INCL)
1148
1149$(OUTDIR)/search.obj: $(OUTDIR) search.c $(INCL)
1150
Bram Moolenaaredac1852010-05-18 20:34:20 +02001151$(OUTDIR)/sha256.obj: $(OUTDIR) sha256.c $(INCL)
1152
Bram Moolenaar2e4096b2005-03-20 22:25:45 +00001153$(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL)
1154
Bram Moolenaar071d4272004-06-13 20:20:40 +00001155$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
1156
1157$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
1158
1159$(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL)
1160
1161$(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
1162
1163$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
1164
1165$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
1166
1167$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
Bram Moolenaarb6356332005-07-18 21:40:44 +00001168 $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001169
Bram Moolenaarcc448b32010-07-14 16:52:17 +02001170$(OUTDIR)/vim.res: $(OUTDIR) vim.rc gvim.exe.mnf version.h tools.bmp \
1171 tearoff.bmp vim.ico vim_error.ico \
1172 vim_alert.ico vim_info.ico vim_quest.ico
Bram Moolenaar071d4272004-06-13 20:20:40 +00001173 $(RC) /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc
1174
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +00001175iid_ole.c if_ole.h vim.tlb: if_ole.idl
Bram Moolenaarb6356332005-07-18 21:40:44 +00001176 midl /nologo /error none /proxy nul /iid iid_ole.c /tlb vim.tlb \
1177 /header if_ole.h if_ole.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +00001178
1179dimm.h dimm_i.c: dimm.idl
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +00001180 midl /nologo /error none /proxy nul dimm.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +00001181
1182$(OUTDIR)/dimm_i.obj: $(OUTDIR) dimm_i.c $(INCL)
1183
1184$(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
1185
Bram Moolenaar89cb5e02004-07-19 20:55:54 +00001186# $CFLAGS may contain backslashes and double quotes, escape them both.
1187E0_CFLAGS = $(CFLAGS:\=\\)
1188E_CFLAGS = $(E0_CFLAGS:"=\")
Bram Moolenaar77f66d62007-02-20 02:16:18 +00001189# ") stop the string
Bram Moolenaarc30846f2011-02-15 18:06:15 +01001190# $LINKARGS2 may contain backslashes and double quotes, escape them both.
1191E0_LINKARGS2 = $(LINKARGS2:\=\\)
1192E_LINKARGS2 = $(E0_LINKARGS2:"=\")
1193# ") stop the string
Bram Moolenaar89cb5e02004-07-19 20:55:54 +00001194
Bram Moolenaar8b6144b2006-02-08 09:20:24 +00001195$(PATHDEF_SRC): auto
1196 @echo creating $(PATHDEF_SRC)
1197 @echo /* pathdef.c */ > $(PATHDEF_SRC)
1198 @echo #include "vim.h" >> $(PATHDEF_SRC)
1199 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC)
1200 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC)
1201 @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC)
Bram Moolenaarc30846f2011-02-15 18:06:15 +01001202 @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(E_LINKARGS2)"; >> $(PATHDEF_SRC)
Bram Moolenaar8b6144b2006-02-08 09:20:24 +00001203 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
1204 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001205
1206auto:
1207 if not exist auto/nul mkdir auto
1208
1209# End Custom Build
1210proto.h: \
Bram Moolenaar40e6a712010-05-16 22:32:54 +02001211 proto/blowfish.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001212 proto/buffer.pro \
1213 proto/charset.pro \
1214 proto/diff.pro \
1215 proto/digraph.pro \
1216 proto/edit.pro \
1217 proto/eval.pro \
1218 proto/ex_cmds.pro \
1219 proto/ex_cmds2.pro \
1220 proto/ex_docmd.pro \
1221 proto/ex_eval.pro \
1222 proto/ex_getln.pro \
1223 proto/fileio.pro \
1224 proto/getchar.pro \
Bram Moolenaar58d98232005-07-23 22:25:46 +00001225 proto/hardcopy.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001226 proto/hashtab.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001227 proto/main.pro \
1228 proto/mark.pro \
1229 proto/memfile.pro \
1230 proto/memline.pro \
1231 proto/menu.pro \
1232 proto/message.pro \
1233 proto/misc1.pro \
1234 proto/misc2.pro \
1235 proto/move.pro \
1236 proto/mbyte.pro \
1237 proto/normal.pro \
1238 proto/ops.pro \
1239 proto/option.pro \
1240 proto/os_mswin.pro \
1241 proto/os_win32.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001242 proto/popupmnu.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001243 proto/quickfix.pro \
1244 proto/regexp.pro \
1245 proto/screen.pro \
1246 proto/search.pro \
Bram Moolenaar40e6a712010-05-16 22:32:54 +02001247 proto/sha256.pro \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +00001248 proto/spell.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001249 proto/syntax.pro \
1250 proto/tag.pro \
1251 proto/term.pro \
1252 proto/ui.pro \
1253 proto/undo.pro \
1254 proto/window.pro \
1255 $(NETBEANS_PRO)
1256
Bram Moolenaarf193fff2006-04-27 00:02:13 +00001257.SUFFIXES: .cod .i
Bram Moolenaar551dbcc2006-04-25 22:13:59 +00001258
1259# Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake
1260# foo.cod"
1261.c.cod:
1262 $(CC) $(CFLAGS) /FAcs $<
1263
1264# Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i"
1265.c.i:
1266 $(CC) $(CFLAGS) /P /C $<
Bram Moolenaar362e1a32006-03-06 23:29:24 +00001267
1268
Bram Moolenaar071d4272004-06-13 20:20:40 +00001269# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: