blob: f9d211d34705f1407682689e9d6af0496de7008c [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001# Makefile for Vim on Win32 (Windows NT and Windows 95), using the
2# Microsoft Visual C++ 2.x and MSVC 4.x compilers (or newer).
3# It builds on Windows 95 and all four NT platforms: i386, Alpha, MIPS, and
4# PowerPC. The NT/i386 binary and the Windows 95 binary are identical.
5#
Bram Moolenaar7887d882005-07-01 22:33:52 +00006# To build using Borland C++, use Make_bc3.mak or Make_bc5.mak.
7#
Bram Moolenaar071d4272004-06-13 20:20:40 +00008# This makefile can build the console, GUI, OLE-enable, Perl-enabled and
9# Python-enabled versions of vim for Win32 platforms.
10#
Bram Moolenaar071d4272004-06-13 20:20:40 +000011# The basic command line to build vim is:
Bram Moolenaar7887d882005-07-01 22:33:52 +000012#
Bram Moolenaar071d4272004-06-13 20:20:40 +000013# nmake -f Make_mvc.mak
Bram Moolenaar7887d882005-07-01 22:33:52 +000014#
Bram Moolenaar071d4272004-06-13 20:20:40 +000015# This will build the console version of vim with no additional interfaces.
Bram Moolenaar7887d882005-07-01 22:33:52 +000016# To add features, define any of the following:
17#
18# !!!! After changing features do "nmake clean" first !!!!
19#
20# Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is BIG)
21#
Bram Moolenaar071d4272004-06-13 20:20:40 +000022# GUI interface: GUI=yes (default is no)
Bram Moolenaar7887d882005-07-01 22:33:52 +000023#
Bram Moolenaar071d4272004-06-13 20:20:40 +000024# OLE interface: OLE=yes (usually with GUI=yes)
Bram Moolenaar7887d882005-07-01 22:33:52 +000025#
Bram 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 Moolenaar65c1b012005-01-31 19:02:28 +000033# MzScheme interface:
34# MZSCHEME=[Path to MzScheme directory]
35# DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically)
36# MZSCHEME_VER=[version, 205_000, ...]
Bram Moolenaar7887d882005-07-01 22:33:52 +000037#
Bram Moolenaar071d4272004-06-13 20:20:40 +000038# Perl interface:
39# PERL=[Path to Perl directory]
40# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
Bram Moolenaar7887d882005-07-01 22:33:52 +000041# PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc]
42# (default is 56)
43#
Bram Moolenaar071d4272004-06-13 20:20:40 +000044# Python interface:
45# PYTHON=[Path to Python directory]
46# DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
47# PYTHON_VER=[Python version, eg 15, 20] (default is 22)
Bram Moolenaar7887d882005-07-01 22:33:52 +000048#
Bram Moolenaar071d4272004-06-13 20:20:40 +000049# Ruby interface:
50# RUBY=[Path to Ruby directory]
51# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
52# RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
53# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
54# You must set RUBY_VER_LONG when change RUBY_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000055#
Bram Moolenaar071d4272004-06-13 20:20:40 +000056# Tcl interface:
57# TCL=[Path to Tcl directory]
58# DYNAMIC_TCL=yes (to load the Tcl DLL dynamically)
59# TCL_VER=[Tcl version, e.g. 80, 83] (default is 83)
60# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
61# You must set TCL_VER_LONG when you set TCL_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000062#
63# SNiFF+ interface: SNIFF=yes
64#
65# Cscope support: CSCOPE=yes
66#
67# Iconv library support (always dynamically loaded):
68# ICONV=[yes or no] (default is yes)
69#
70# Intl library support (always dynamically loaded):
71# GETTEXT=[yes or no] (default is yes)
72# See http://sourceforge.net/projects/gettext/
73#
74# PostScript printing: POSTSCRIPT=yes (default is no)
75#
76# Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
77#
78# XPM Image Support: XPM=[path to XPM directory]
79#
80# Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
81#
82# Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is
83# i386)
84#
85# Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400)
86#
Bram Moolenaar071d4272004-06-13 20:20:40 +000087# Debug version: DEBUG=yes
88# Mapfile: MAP=[no, yes or lines] (default is yes)
89# no: Don't write a mapfile.
90# yes: Write a normal mapfile.
91# lines: Write a mapfile with line numbers (only for VC6 and later)
Bram Moolenaar7887d882005-07-01 22:33:52 +000092#
93# Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
94# doesn't work)
Bram Moolenaar071d4272004-06-13 20:20:40 +000095#
96# You can combine any of these interfaces
97#
98# Example: To build the non-debug, GUI version with Perl interface:
99# nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
100#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101# DEBUG with Make_mvc.mak and Make_dvc.mak:
102# This makefile gives a fineness of control which is not supported in
103# Visual C++ configuration files. Therefore, debugging requires a bit of
104# extra work.
105# Make_dvc.mak is a Visual C++ project to access that support.
106# To use Make_dvc.mak:
107# 1) Build Vim with Make_mvc.mak.
108# Use a "DEBUG=yes" argument to build Vim with debug support.
109# E.g. the following builds gvimd.exe:
110# nmake -f Make_mvc.mak debug=yes gui=yes
111# 2) Use MS Devstudio and set it up to allow that file to be debugged:
112# i) Pass Make_dvc.mak to the IDE.
113# Use the "open workspace" menu entry to load Make_dvc.mak.
114# Alternatively, from the command line:
115# msdev /nologo Make_dvc.mak
116# Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
117# this and offer to convert it to their own format. Accept that.
118# It creates a file called Make_dvc.dsw which can then be used
119# for further operations. E.g.
120# msdev /nologo Make_dvc.dsw
121# ii) Set the built executable for debugging:
122# a) Alt+F7/Debug takes you to the Debug dialog.
123# b) Fill "Executable for debug session". e.g. gvimd.exe
124# c) Fill "Program arguments". e.g. -R dosinst.c
125# d) Complete the dialog
126# 3) You can now debug the executable you built with Make_mvc.mak
127#
128# Note: Make_dvc.mak builds vimrun.exe, because it must build something
129# to be a valid makefile..
130
131### See feature.h for a list of optionals.
132# If you want to build some optional features without modifying the source,
133# you can set DEFINES on the command line, e.g.,
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000134# nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000135
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000136# Build on both Windows NT/XP and Windows 9x
Bram Moolenaar071d4272004-06-13 20:20:40 +0000137
138TARGETOS = BOTH
139
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000140# Select one of eight object code directories, depends on GUI, OLE, DEBUG and
141# interfaces.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000142# If you change something else, do "make clean" first!
143!if "$(GUI)" == "yes"
144OBJDIR = .\ObjG
145!else
146OBJDIR = .\ObjC
147!endif
148!if "$(OLE)" == "yes"
149OBJDIR = $(OBJDIR)O
150!endif
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000151!ifdef PERL
152OBJDIR = $(OBJDIR)L
153!endif
154!ifdef PYTHON
155OBJDIR = $(OBJDIR)Y
156!endif
157!ifdef TCL
158OBJDIR = $(OBJDIR)T
159!endif
160!ifdef RUBY
161OBJDIR = $(OBJDIR)R
162!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000163!ifdef MZSCHEME
164OBJDIR = $(OBJDIR)Z
165!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000166!if "$(DEBUG)" == "yes"
167OBJDIR = $(OBJDIR)d
168!endif
169
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000170# Win32.mak requires that CPU be set appropriately.
171# To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172
173!ifdef PROCESSOR_ARCHITECTURE
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000174# We're on Windows NT or using VC 6+
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000175! ifndef CPU
Bram Moolenaar071d4272004-06-13 20:20:40 +0000176CPU = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000177! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000178CPU = i386
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000179! endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000180! endif
181!else # !PROCESSOR_ARCHITECTURE
182# We're on Windows 95
183CPU = i386
184!endif # !PROCESSOR_ARCHITECTURE
185
186
187# Build a retail version by default
188
189!if "$(DEBUG)" != "yes"
190NODEBUG = 1
191!else
192MAKEFLAGS_GVIMEXT = DEBUG=yes
193!endif
194
195
Bram Moolenaar071d4272004-06-13 20:20:40 +0000196# Get all sorts of useful, standard macros from the SDK. (Note that
197# MSVC 2.2 does not install <ntwin32.mak> in the \msvc20\include
198# directory, but you can find it in \msvc20\include on the CD-ROM.
199# You may also need <win32.mak> from the same place.)
200
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000201!include <Win32.mak>
Bram Moolenaar071d4272004-06-13 20:20:40 +0000202
203
204#>>>>> path of the compiler and linker; name of include and lib directories
205# PATH = c:\msvc20\bin;$(PATH)
206# INCLUDE = c:\msvc20\include
207# LIB = c:\msvc20\lib
208
209!ifndef CTAGS
210CTAGS = ctags
211!endif
212
213!if "$(SNIFF)" == "yes"
214# SNIFF - Include support for SNiFF+.
215SNIFF_INCL = if_sniff.h
216SNIFF_OBJ = $(OBJDIR)/if_sniff.obj
Bram Moolenaarb6356332005-07-18 21:40:44 +0000217SNIFF_LIB = shell32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000218SNIFF_DEFS = -DFEAT_SNIFF
219# The SNiFF integration needs multithreaded libraries!
220MULTITHREADED = yes
221!endif
222
223!ifndef CSCOPE
224CSCOPE = yes
225!endif
226
227!if "$(CSCOPE)" == "yes"
228# CSCOPE - Include support for Cscope
229CSCOPE_INCL = if_cscope.h
230CSCOPE_OBJ = $(OBJDIR)/if_cscope.obj
231CSCOPE_DEFS = -DFEAT_CSCOPE
232!endif
233
234!ifndef NETBEANS
235NETBEANS = $(GUI)
236!endif
237
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000238# Only allow NETBEANS and XPM for a GUI build.
239!if "$(GUI)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000240!if "$(NETBEANS)" == "yes"
241# NETBEANS - Include support for Netbeans integration
242NETBEANS_PRO = proto/netbeans.pro
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000243NETBEANS_OBJ = $(OBJDIR)/netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000244NETBEANS_DEFS = -DFEAT_NETBEANS_INTG
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000245
246!if "$(NBDEBUG)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000247NBDEBUG_DEFS = -DNBDEBUG
248NBDEBUG_INCL = nbdebug.h
249NBDEBUG_SRC = nbdebug.c
250!endif
Bram Moolenaarb6356332005-07-18 21:40:44 +0000251NETBEANS_LIB = WSock32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000252!endif
253
254!ifdef XPM
255# XPM - Include support for XPM signs
256# you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
257XPM_OBJ = $(OBJDIR)/xpm_w32.obj
258XPM_DEFS = -DFEAT_XPM_W32
259XPM_LIB = $(XPM)\lib\libXpm.lib
260XPM_INC = -I $(XPM)\include
261!endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000262!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000263
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000264# Set which version of the CRT to use
Bram Moolenaar071d4272004-06-13 20:20:40 +0000265!if defined(USE_MSVCRT)
266CVARS = $(cvarsdll)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000267# !elseif defined(MULTITHREADED)
268# CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000269!else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000270# CVARS = $(cvars)
271CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000272!endif
273
274# need advapi32.lib for GetUserName()
275# need shell32.lib for ExtractIcon()
276# gdi32.lib and comdlg32.lib for printing support
277# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
278CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000279!if "$(DELAYLOAD)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000280CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
281!endif
282
283### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
284# When set to 0x0500 ":browse" stops working.
285!ifndef WINVER
286WINVER = 0x0400
287!endif
288
289# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
290# default, use these lines.
291#VIMRCLOC = somewhere
292#VIMRUNTIMEDIR = somewhere
293
294CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
295 $(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) \
296 $(NBDEBUG_DEFS) $(XPM_DEFS) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000297 $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
298 /Fo$(OUTDIR)/
Bram Moolenaar071d4272004-06-13 20:20:40 +0000299
300#>>>>> end of choices
301###########################################################################
302
303!ifdef OS
304OS_TYPE = winnt
305DEL_TREE = rmdir /s /q
306!else
307OS_TYPE = win95
308DEL_TREE = deltree /y
309!endif
310
311INTDIR=$(OBJDIR)
312OUTDIR=$(OBJDIR)
313
314# Convert processor ID to MVC-compatible number
315!if "$(CPUNR)" == "i386"
316CPUARG = /G3
317!elseif "$(CPUNR)" == "i486"
318CPUARG = /G4
319!elseif "$(CPUNR)" == "i586"
320CPUARG = /G5
321!elseif "$(CPUNR)" == "i686"
322CPUARG = /G6
Bram Moolenaarcf3630f2005-01-08 16:04:29 +0000323!elseif "$(CPUNR)" == "pentium4"
Bram Moolenaar34114692005-01-02 11:28:13 +0000324CPUARG = /G7 /arch:SSE2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000325!else
326CPUARG =
327!endif
328
329!ifdef NODEBUG
330VIM = vim
331!if "$(OPTIMIZE)" == "SPACE"
332OPTFLAG = /O1
333!elseif "$(OPTIMIZE)" == "SPEED"
334OPTFLAG = /O2
335!else # MAXSPEED
336OPTFLAG = /Ox
337!endif
Bram Moolenaar34114692005-01-02 11:28:13 +0000338CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000339RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000340! ifdef USE_MSVCRT
341CFLAGS = $(CFLAGS) -MD
342LIBC = msvcrt.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000343# CFLAGS = $(CFLAGS) $(cvarsdll)
344# ! elseif defined(MULTITHREADED)
345# LIBC = libcmt.lib
346# CFLAGS = $(CFLAGS) $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000347! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000348# LIBC = libc.lib
349LIBC = libcmt.lib
350# CFLAGS = $(CFLAGS) $(cvars)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000351! endif
352!else # DEBUG
353VIM = vimd
Bram Moolenaard9d30582005-05-18 22:10:28 +0000354CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
Bram Moolenaar071d4272004-06-13 20:20:40 +0000355RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
356# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
357! if "$(_NMAKE_VER)" == ""
358LIBC =
359! else
360LIBC = /fixed:no
361! endif
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000362! ifdef USE_MSVCRT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000363CFLAGS = $(CFLAGS) -MDd
364LIBC = $(LIBC) msvcrtd.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000365# CFLAGS = $(CFLAGS) $(cvarsdll)
366# ! elseif defined(MULTITHREADED)
367# LIBC = $(LIBC) libcmtd.lib
368# CFLAGS = $(CFLAGS) $(cvarsmt)
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000369! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000370# LIBC = $(LIBC) libcd.lib
371LIBC = $(LIBC) libcmtd.lib
372# CFLAGS = $(CFLAGS) $(cvars)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000373! endif
374!endif # DEBUG
375
376INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
377 proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \
378 $(NBDEBUG_INCL)
379
380OBJ = \
381 $(OUTDIR)\buffer.obj \
382 $(OUTDIR)\charset.obj \
383 $(OUTDIR)\diff.obj \
384 $(OUTDIR)\digraph.obj \
385 $(OUTDIR)\edit.obj \
386 $(OUTDIR)\eval.obj \
387 $(OUTDIR)\ex_cmds.obj \
388 $(OUTDIR)\ex_cmds2.obj \
389 $(OUTDIR)\ex_docmd.obj \
390 $(OUTDIR)\ex_eval.obj \
391 $(OUTDIR)\ex_getln.obj \
392 $(OUTDIR)\fileio.obj \
393 $(OUTDIR)\fold.obj \
394 $(OUTDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000395 $(OUTDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000396 $(OUTDIR)\hashtab.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000397 $(OUTDIR)\main.obj \
398 $(OUTDIR)\mark.obj \
399 $(OUTDIR)\mbyte.obj \
400 $(OUTDIR)\memfile.obj \
401 $(OUTDIR)\memline.obj \
402 $(OUTDIR)\menu.obj \
403 $(OUTDIR)\message.obj \
404 $(OUTDIR)\misc1.obj \
405 $(OUTDIR)\misc2.obj \
406 $(OUTDIR)\move.obj \
407 $(OUTDIR)\normal.obj \
408 $(OUTDIR)\ops.obj \
409 $(OUTDIR)\option.obj \
410 $(OUTDIR)\os_mswin.obj \
411 $(OUTDIR)\os_win32.obj \
412 $(OUTDIR)\pathdef.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000413 $(OUTDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000414 $(OUTDIR)\quickfix.obj \
415 $(OUTDIR)\regexp.obj \
416 $(OUTDIR)\screen.obj \
417 $(OUTDIR)\search.obj \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000418 $(OUTDIR)\spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000419 $(OUTDIR)\syntax.obj \
420 $(OUTDIR)\tag.obj \
421 $(OUTDIR)\term.obj \
422 $(OUTDIR)\ui.obj \
423 $(OUTDIR)\undo.obj \
424 $(OUTDIR)\window.obj \
425 $(OUTDIR)\vim.res
426
427!if "$(OLE)" == "yes"
428CFLAGS = $(CFLAGS) -DFEAT_OLE
429RCFLAGS = $(RCFLAGS) -DFEAT_OLE
430OLE_OBJ = $(OUTDIR)\if_ole.obj
431OLE_IDL = if_ole.idl
432OLE_LIB = oleaut32.lib
433!endif
434
435!if "$(IME)" == "yes"
436CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME
437!ifndef DYNAMIC_IME
438DYNAMIC_IME = yes
439!endif
440!if "$(DYNAMIC_IME)" == "yes"
441CFLAGS = $(CFLAGS) -DDYNAMIC_IME
442!else
443IME_LIB = imm32.lib
444!endif
445!endif
446
447!if "$(GIME)" == "yes"
448CFLAGS = $(CFLAGS) -DGLOBAL_IME
449OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj
450MBYTE = yes
451!endif
452
453!if "$(MBYTE)" == "yes"
454CFLAGS = $(CFLAGS) -DFEAT_MBYTE
455!endif
456
457!if "$(GUI)" == "yes"
458SUBSYSTEM = windows
459CFLAGS = $(CFLAGS) -DFEAT_GUI_W32
460RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32
461VIM = g$(VIM)
462GUI_INCL = \
463 gui.h \
464 regexp.h \
465 ascii.h \
466 ex_cmds.h \
467 farsi.h \
468 feature.h \
469 globals.h \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000470 gui_beval.h \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000471 keymap.h \
472 macros.h \
473 option.h \
474 os_dos.h \
475 os_win32.h
476GUI_OBJ = \
477 $(OUTDIR)\gui.obj \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000478 $(OUTDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000479 $(OUTDIR)\gui_w32.obj \
480 $(OUTDIR)\os_w32exe.obj
481GUI_LIB = \
Bram Moolenaara3ffd9c2005-07-21 21:03:15 +0000482 oldnames.lib kernel32.lib gdi32.lib version.lib $(IME_LIB) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000483 winspool.lib comctl32.lib advapi32.lib shell32.lib \
484 /machine:$(CPU) /nodefaultlib
485!else
486SUBSYSTEM = console
487!endif
488
489# iconv.dll library (dynamically loaded)
490!ifndef ICONV
491ICONV = yes
492!endif
493!if "$(ICONV)" == "yes"
494CFLAGS = $(CFLAGS) -DDYNAMIC_ICONV
495!endif
496
497# libintl.dll library
498!ifndef GETTEXT
499GETTEXT = yes
500!endif
501!if "$(GETTEXT)" == "yes"
502CFLAGS = $(CFLAGS) -DDYNAMIC_GETTEXT
503!endif
504
505# TCL interface
506!ifdef TCL
507!ifndef TCL_VER
508TCL_VER = 83
509TCL_VER_LONG = 8.3
510!endif
511!message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)"
512!if "$(DYNAMIC_TCL)" == "yes"
513!message Tcl DLL will be loaded dynamically
514TCL_DLL = tcl$(TCL_VER).dll
Bram Moolenaarb6356332005-07-18 21:40:44 +0000515CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \
516 -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000517TCL_OBJ = $(OUTDIR)\if_tcl.obj
518TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
519TCL_LIB = $(TCL)\lib\tclstub$(TCL_VER).lib
520!else
521CFLAGS = $(CFLAGS) -DFEAT_TCL
522TCL_OBJ = $(OUTDIR)\if_tcl.obj
523TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
524TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib
525!endif
526!endif
527
528# PYTHON interface
529!ifdef PYTHON
530!ifndef PYTHON_VER
531PYTHON_VER = 22
532!endif
533!message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)"
534!if "$(DYNAMIC_PYTHON)" == "yes"
535!message Python DLL will be loaded dynamically
536!endif
537CFLAGS = $(CFLAGS) -DFEAT_PYTHON
538PYTHON_OBJ = $(OUTDIR)\if_python.obj
539PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC"
540!if "$(DYNAMIC_PYTHON)" == "yes"
Bram Moolenaarb6356332005-07-18 21:40:44 +0000541CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \
542 -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000543PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib
544!else
545PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
546!endif
547!endif
548
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000549# MzScheme interface
550!ifdef MZSCHEME
551!message MzScheme requested - root dir is "$(MZSCHEME)"
552!ifndef MZSCHEME_VER
553MZSCHEME_VER = 205_000
554!endif
555CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000556!if "$(DYNAMIC_MZSCHEME)" == "yes"
557!message MzScheme DLLs will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000558CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
559 -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" \
560 -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000561!else
Bram Moolenaarb6356332005-07-18 21:40:44 +0000562MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
563 $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000564!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000565MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
566!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000567
Bram Moolenaar071d4272004-06-13 20:20:40 +0000568# Perl interface
569!ifdef PERL
570!ifndef PERL_VER
571PERL_VER = 56
572!endif
573!message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)"
574!if "$(DYNAMIC_PERL)" == "yes"
575!if $(PERL_VER) >= 56
576!message Perl DLL will be loaded dynamically
577!else
578!message Dynamic loading is not supported for Perl versions earlier than 5.6.0
579!message Reverting to static loading...
580!undef DYNAMIC_PERL
581!endif
582!endif
583
584# Is Perl installed in architecture-specific directories?
585!if exist($(PERL)\Bin\MSWin32-x86)
586PERL_ARCH = \MSWin32-x86
587!endif
588
589PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core
590
591# Version-dependent stuff
592!if $(PERL_VER) == 55
593PERL_LIB = $(PERL_INCDIR)\perl.lib
594!else
595PERL_DLL = perl$(PERL_VER).dll
596PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib
597!endif
598
599CFLAGS = $(CFLAGS) -DFEAT_PERL
600
601# Do we want to load Perl dynamically?
602!if "$(DYNAMIC_PERL)" == "yes"
603CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
604!undef PERL_LIB
605!endif
606
607PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
608PERL_INC = /I $(PERL_INCDIR)
609PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
610XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
611XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
612
613!endif
614
615#
616# Support Ruby interface
617#
618!ifdef RUBY
619# Set default value
620!ifndef RUBY_VER
621RUBY_VER = 18
622!endif
623!ifndef RUBY_VER_LONG
624RUBY_VER_LONG = 1.8
625!endif
626
627!if $(RUBY_VER) >= 18
628!ifndef RUBY_PLATFORM
629RUBY_PLATFORM = i386-mswin32
630!endif
631!ifndef RUBY_INSTALL_NAME
632RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
633!endif
634!else
635!ifndef RUBY_PLATFORM
636RUBY_PLATFORM = i586-mswin32
637!endif
638!ifndef RUBY_INSTALL_NAME
639RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
640!endif
641!endif # $(RUBY_VER) >= 18
642
643!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
644CFLAGS = $(CFLAGS) -DFEAT_RUBY
645RUBY_OBJ = $(OUTDIR)\if_ruby.obj
646RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
647RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
648# Do we want to load Ruby dynamically?
649!if "$(DYNAMIC_RUBY)" == "yes"
650!message Ruby DLL will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000651CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=$(RUBY_VER) \
652 -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000653!undef RUBY_LIB
654!endif
655!endif # RUBY
656
657#
658# Support PostScript printing
659#
660!if "$(POSTSCRIPT)" == "yes"
661CFLAGS = $(CFLAGS) -DMSWINPS
662!endif # POSTSCRIPT
663
664#
665# FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
666#
667!if "$(FEATURES)"==""
668FEATURES = BIG
669!endif
670CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
671
672#
Bram Moolenaard9d30582005-05-18 22:10:28 +0000673# Always generate the .pdb file, so that we get debug symbols that can be used
674# on a crash (doesn't add overhead to the executable).
675#
Bram Moolenaarb6356332005-07-18 21:40:44 +0000676CFLAGS = $(CFLAGS) /Zi /Fd$(OUTDIR)/
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000677LINK_PDB = /PDB:$(OUTDIR)/$(VIM).pdb -debug # -debug:full -debugtype:cv,fixup
Bram Moolenaard9d30582005-05-18 22:10:28 +0000678
679#
680# End extra feature include
Bram Moolenaar071d4272004-06-13 20:20:40 +0000681#
682!message
683
684conflags = /nologo /subsystem:$(SUBSYSTEM) /incremental:no
685
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000686PATHDEF_SRC = $(OUTDIR)\pathdef.c
687
Bram Moolenaar071d4272004-06-13 20:20:40 +0000688!IF "$(MAP)" == "yes"
689# "/map" is for debugging
690conflags = $(conflags) /map
691!ELSEIF "$(MAP)" == "lines"
692# "/mapinfo:lines" is for debugging, only works for VC6 and later
693conflags = $(conflags) /map /mapinfo:lines
694!ENDIF
695
696LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc
697LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000698 $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \
699 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000700
Bram Moolenaarb6356332005-07-18 21:40:44 +0000701all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \
702 GvimExt/gvimext.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +0000703
Bram Moolenaarb6356332005-07-18 21:40:44 +0000704$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
705 $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
706 $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) version.c version.h
707 $(CC) $(CFLAGS) version.c
Bram Moolenaar0dc065e2005-07-04 22:49:24 +0000708 $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000709 $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) \
710 $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
711 $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000712
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000713$(VIM): $(VIM).exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000714
715$(OUTDIR):
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000716 if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000717
718install.exe: dosinst.c
Bram Moolenaarb6356332005-07-18 21:40:44 +0000719 $(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \
720 ole32.lib advapi32.lib uuid.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000721 - if exist install.exe del install.exe
722 ren dosinst.exe install.exe
723
724uninstal.exe: uninstal.c
725 $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
726
727vimrun.exe: vimrun.c
728 $(CC) /nologo -DNDEBUG vimrun.c
729
730xxd/xxd.exe: xxd/xxd.c
731 cd xxd
732 $(MAKE) /NOLOGO -f Make_mvc.mak
733 cd ..
734
735GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
736 cd GvimExt
737 $(MAKE) /NOLOGO -f Makefile $(MAKEFLAGS_GVIMEXT)
738 cd ..
739
740
741tags: notags
742 $(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro
743
744notags:
745 - if exist tags del tags
746
747clean:
Bram Moolenaar02743632005-07-25 20:42:36 +0000748 - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000749 - if exist *.obj del *.obj
750 - if exist $(VIM).exe del $(VIM).exe
751 - if exist $(VIM).ilk del $(VIM).ilk
752 - if exist $(VIM).pdb del $(VIM).pdb
753 - if exist $(VIM).map del $(VIM).map
754 - if exist $(VIM).ncb del $(VIM).ncb
755 - if exist vimrun.exe del vimrun.exe
756 - if exist install.exe del install.exe
757 - if exist uninstal.exe del uninstal.exe
758 - if exist if_perl.c del if_perl.c
759 - if exist dimm.h del dimm.h
760 - if exist dimm_i.c del dimm_i.c
761 - if exist dimm.tlb del dimm.tlb
762 - if exist dosinst.exe del dosinst.exe
763 cd xxd
764 $(MAKE) /NOLOGO -f Make_mvc.mak clean
765 cd ..
766 cd GvimExt
767 $(MAKE) /NOLOGO -f Makefile clean
768 cd ..
769 cd GvimExt
770 $(MAKE) /NOLOGO -f Makefile clean
771 cd ..
772 - if exist testdir\*.out del testdir\*.out
773
774test:
775 cd testdir
776 $(MAKE) /NOLOGO -f Make_dos.mak win32
777 cd ..
778
Bram Moolenaar34114692005-01-02 11:28:13 +0000779testclean:
780 cd testdir
781 $(MAKE) /NOLOGO -f Make_dos.mak clean
782 cd ..
783
Bram Moolenaar071d4272004-06-13 20:20:40 +0000784###########################################################################
785
786# Create a default rule for transforming .c files to .obj files in $(OUTDIR)
787# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
788!IF "$(_NMAKE_VER)" == ""
789.c{$(OUTDIR)/}.obj:
790!ELSE
791.c{$(OUTDIR)/}.obj::
792!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000793 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000794
795# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
796# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
797!IF "$(_NMAKE_VER)" == ""
798.cpp{$(OUTDIR)/}.obj:
799!ELSE
800.cpp{$(OUTDIR)/}.obj::
801!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000802 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000803
804$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
805
806$(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
807
808$(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
809
810$(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL)
811
812$(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL)
813
814$(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL)
815
816$(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL)
817
818$(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL)
819
820$(OUTDIR)/ex_docmd.obj: $(OUTDIR) ex_docmd.c $(INCL) ex_cmds.h
821
822$(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h
823
824$(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL)
825
826$(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
827
828$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
829
830$(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL)
831
Bram Moolenaar58d98232005-07-23 22:25:46 +0000832$(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL)
833
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000834$(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL)
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000835
Bram Moolenaar071d4272004-06-13 20:20:40 +0000836$(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL)
837
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000838$(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
839
Bram Moolenaar071d4272004-06-13 20:20:40 +0000840$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL)
841
842$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
843
844if_perl.c : if_perl.xs typemap
Bram Moolenaarb6356332005-07-18 21:40:44 +0000845 $(PERL_EXE) $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
846 -typemap typemap if_perl.xs > if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000847
848$(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000849 $(CC) $(CFLAGS) $(PERL_INC) if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000850
851$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000852 $(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000853
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000854$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL)
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000855 $(CC) $(CFLAGS) if_mzsch.c \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000856 -DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000857
Bram Moolenaar071d4272004-06-13 20:20:40 +0000858$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000859 $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000860
861$(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h
862
863$(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000864 $(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000865
866$(OUTDIR)/if_sniff.obj: $(OUTDIR) if_sniff.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000867 $(CC) $(CFLAGS) if_sniff.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000868
869$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000870 $(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000871
872$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL)
873
874$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL)
875
876$(OUTDIR)/memfile.obj: $(OUTDIR) memfile.c $(INCL)
877
878$(OUTDIR)/memline.obj: $(OUTDIR) memline.c $(INCL)
879
880$(OUTDIR)/menu.obj: $(OUTDIR) menu.c $(INCL)
881
882$(OUTDIR)/message.obj: $(OUTDIR) message.c $(INCL)
883
884$(OUTDIR)/misc1.obj: $(OUTDIR) misc1.c $(INCL)
885
886$(OUTDIR)/misc2.obj: $(OUTDIR) misc2.c $(INCL)
887
888$(OUTDIR)/move.obj: $(OUTDIR) move.c $(INCL)
889
890$(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL)
891
892$(OUTDIR)/netbeans.obj: $(OUTDIR) netbeans.c $(NBDEBUG_SRC) $(INCL)
893
894$(OUTDIR)/normal.obj: $(OUTDIR) normal.c $(INCL)
895
896$(OUTDIR)/option.obj: $(OUTDIR) option.c $(INCL)
897
898$(OUTDIR)/ops.obj: $(OUTDIR) ops.c $(INCL)
899
900$(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL)
901
902$(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h
903
904$(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
905
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000906$(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
907 $(CC) $(CFLAGS) $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000908
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000909$(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL)
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000910
Bram Moolenaar071d4272004-06-13 20:20:40 +0000911$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
912
913$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c $(INCL)
914
915$(OUTDIR)/screen.obj: $(OUTDIR) screen.c $(INCL)
916
917$(OUTDIR)/search.obj: $(OUTDIR) search.c $(INCL)
918
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000919$(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL)
920
Bram Moolenaar071d4272004-06-13 20:20:40 +0000921$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
922
923$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
924
925$(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL)
926
927$(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
928
929$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
930
931$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
932
933$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
Bram Moolenaarb6356332005-07-18 21:40:44 +0000934 $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000935
Bram Moolenaarb6356332005-07-18 21:40:44 +0000936$(OUTDIR)/vim.res: $(OUTDIR) vim.rc version.h tools.bmp tearoff.bmp \
937 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
Bram Moolenaar071d4272004-06-13 20:20:40 +0000938 $(RC) /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc
939
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000940iid_ole.c if_ole.h vim.tlb: if_ole.idl
Bram Moolenaarb6356332005-07-18 21:40:44 +0000941 midl /nologo /error none /proxy nul /iid iid_ole.c /tlb vim.tlb \
942 /header if_ole.h if_ole.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +0000943
944dimm.h dimm_i.c: dimm.idl
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000945 midl /nologo /error none /proxy nul dimm.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +0000946
947$(OUTDIR)/dimm_i.obj: $(OUTDIR) dimm_i.c $(INCL)
948
949$(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
950
Bram Moolenaar89cb5e02004-07-19 20:55:54 +0000951# $CFLAGS may contain backslashes and double quotes, escape them both.
952E0_CFLAGS = $(CFLAGS:\=\\)
953E_CFLAGS = $(E0_CFLAGS:"=\")
954
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000955$(PATHDEF_SRC): auto
956 @echo creating $(PATHDEF_SRC)
957 @echo /* pathdef.c */ > $(PATHDEF_SRC)
958 @echo #include "vim.h" >> $(PATHDEF_SRC)
959 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC)
960 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC)
961 @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC)
962 @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC)
963 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
964 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000965
966auto:
967 if not exist auto/nul mkdir auto
968
969# End Custom Build
970proto.h: \
971 proto/buffer.pro \
972 proto/charset.pro \
973 proto/diff.pro \
974 proto/digraph.pro \
975 proto/edit.pro \
976 proto/eval.pro \
977 proto/ex_cmds.pro \
978 proto/ex_cmds2.pro \
979 proto/ex_docmd.pro \
980 proto/ex_eval.pro \
981 proto/ex_getln.pro \
982 proto/fileio.pro \
983 proto/getchar.pro \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000984 proto/hardcopy.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000985 proto/hashtab.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000986 proto/main.pro \
987 proto/mark.pro \
988 proto/memfile.pro \
989 proto/memline.pro \
990 proto/menu.pro \
991 proto/message.pro \
992 proto/misc1.pro \
993 proto/misc2.pro \
994 proto/move.pro \
995 proto/mbyte.pro \
996 proto/normal.pro \
997 proto/ops.pro \
998 proto/option.pro \
999 proto/os_mswin.pro \
1000 proto/os_win32.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001001 proto/popupmnu.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001002 proto/quickfix.pro \
1003 proto/regexp.pro \
1004 proto/screen.pro \
1005 proto/search.pro \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +00001006 proto/spell.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001007 proto/syntax.pro \
1008 proto/tag.pro \
1009 proto/term.pro \
1010 proto/ui.pro \
1011 proto/undo.pro \
1012 proto/window.pro \
1013 $(NETBEANS_PRO)
1014
Bram Moolenaar362e1a32006-03-06 23:29:24 +00001015.cod.c:
1016 $(CC) $(CFLAGS) /FAc $<
1017
1018
Bram Moolenaar071d4272004-06-13 20:20:40 +00001019# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: