blob: a78f756ec2d2ac4473fc1d1015a7fff8d8091ea4 [file] [log] [blame]
Bram Moolenaareb3593b2006-04-22 22:33:57 +00001# Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
2# and Win64, using the Microsoft Visual C++ compilers. Known to work with
3# VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), and VC8 (VS2005).
Bram Moolenaar071d4272004-06-13 20:20:40 +00004#
Bram Moolenaareb3593b2006-04-22 22:33:57 +00005# To build using other Windows compilers, see INSTALLpc.txt
Bram Moolenaar7887d882005-07-01 22:33:52 +00006#
Bram Moolenaar071d4272004-06-13 20:20:40 +00007# This makefile can build the console, GUI, OLE-enable, Perl-enabled and
8# Python-enabled versions of vim for Win32 platforms.
9#
Bram Moolenaar071d4272004-06-13 20:20:40 +000010# The basic command line to build vim is:
Bram Moolenaar7887d882005-07-01 22:33:52 +000011#
Bram Moolenaar071d4272004-06-13 20:20:40 +000012# nmake -f Make_mvc.mak
Bram Moolenaar7887d882005-07-01 22:33:52 +000013#
Bram Moolenaar071d4272004-06-13 20:20:40 +000014# This will build the console version of vim with no additional interfaces.
Bram Moolenaar7887d882005-07-01 22:33:52 +000015# To add features, define any of the following:
16#
17# !!!! After changing features do "nmake clean" first !!!!
18#
19# Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is BIG)
20#
Bram Moolenaar071d4272004-06-13 20:20:40 +000021# GUI interface: GUI=yes (default is no)
Bram Moolenaar7887d882005-07-01 22:33:52 +000022#
Bram Moolenaar071d4272004-06-13 20:20:40 +000023# OLE interface: OLE=yes (usually with GUI=yes)
Bram Moolenaar7887d882005-07-01 22:33:52 +000024#
Bram Moolenaara83c3e02006-03-17 23:10:44 +000025# Multibyte support: MBYTE=yes (default is no)
Bram Moolenaar7887d882005-07-01 22:33:52 +000026#
Bram Moolenaar071d4272004-06-13 20:20:40 +000027# IME support: IME=yes (requires GUI=yes)
28# DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default
29# is yes)
30# Global IME support: GIME=yes (requires GUI=yes)
Bram Moolenaar7887d882005-07-01 22:33:52 +000031#
Bram Moolenaar65c1b012005-01-31 19:02:28 +000032# MzScheme interface:
33# MZSCHEME=[Path to MzScheme directory]
34# DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically)
35# MZSCHEME_VER=[version, 205_000, ...]
Bram Moolenaar7887d882005-07-01 22:33:52 +000036#
Bram Moolenaar071d4272004-06-13 20:20:40 +000037# Perl interface:
38# PERL=[Path to Perl directory]
39# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
Bram Moolenaar7887d882005-07-01 22:33:52 +000040# PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc]
41# (default is 56)
42#
Bram Moolenaar071d4272004-06-13 20:20:40 +000043# Python interface:
44# PYTHON=[Path to Python directory]
45# DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
46# PYTHON_VER=[Python version, eg 15, 20] (default is 22)
Bram Moolenaar7887d882005-07-01 22:33:52 +000047#
Bram Moolenaar071d4272004-06-13 20:20:40 +000048# Ruby interface:
49# RUBY=[Path to Ruby directory]
50# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
51# RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
52# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
53# You must set RUBY_VER_LONG when change RUBY_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000054#
Bram Moolenaar071d4272004-06-13 20:20:40 +000055# Tcl interface:
56# TCL=[Path to Tcl directory]
57# DYNAMIC_TCL=yes (to load the Tcl DLL dynamically)
58# TCL_VER=[Tcl version, e.g. 80, 83] (default is 83)
59# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
60# You must set TCL_VER_LONG when you set TCL_VER.
Bram Moolenaar7887d882005-07-01 22:33:52 +000061#
62# SNiFF+ interface: SNIFF=yes
63#
64# Cscope support: CSCOPE=yes
65#
66# Iconv library support (always dynamically loaded):
67# ICONV=[yes or no] (default is yes)
68#
69# Intl library support (always dynamically loaded):
70# GETTEXT=[yes or no] (default is yes)
71# See http://sourceforge.net/projects/gettext/
72#
73# PostScript printing: POSTSCRIPT=yes (default is no)
74#
75# Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
76#
77# XPM Image Support: XPM=[path to XPM directory]
78#
79# Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
80#
81# Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is
82# i386)
83#
84# Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400)
85#
Bram Moolenaar071d4272004-06-13 20:20:40 +000086# Debug version: DEBUG=yes
87# Mapfile: MAP=[no, yes or lines] (default is yes)
88# no: Don't write a mapfile.
89# yes: Write a normal mapfile.
90# lines: Write a mapfile with line numbers (only for VC6 and later)
Bram Moolenaar7887d882005-07-01 22:33:52 +000091#
92# Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
93# doesn't work)
Bram Moolenaar071d4272004-06-13 20:20:40 +000094#
95# You can combine any of these interfaces
96#
97# Example: To build the non-debug, GUI version with Perl interface:
98# nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
99#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000100# DEBUG with Make_mvc.mak and Make_dvc.mak:
101# This makefile gives a fineness of control which is not supported in
102# Visual C++ configuration files. Therefore, debugging requires a bit of
103# extra work.
104# Make_dvc.mak is a Visual C++ project to access that support.
105# To use Make_dvc.mak:
106# 1) Build Vim with Make_mvc.mak.
107# Use a "DEBUG=yes" argument to build Vim with debug support.
108# E.g. the following builds gvimd.exe:
109# nmake -f Make_mvc.mak debug=yes gui=yes
110# 2) Use MS Devstudio and set it up to allow that file to be debugged:
111# i) Pass Make_dvc.mak to the IDE.
112# Use the "open workspace" menu entry to load Make_dvc.mak.
113# Alternatively, from the command line:
114# msdev /nologo Make_dvc.mak
115# Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
116# this and offer to convert it to their own format. Accept that.
117# It creates a file called Make_dvc.dsw which can then be used
118# for further operations. E.g.
119# msdev /nologo Make_dvc.dsw
120# ii) Set the built executable for debugging:
121# a) Alt+F7/Debug takes you to the Debug dialog.
122# b) Fill "Executable for debug session". e.g. gvimd.exe
123# c) Fill "Program arguments". e.g. -R dosinst.c
124# d) Complete the dialog
125# 3) You can now debug the executable you built with Make_mvc.mak
126#
127# Note: Make_dvc.mak builds vimrun.exe, because it must build something
128# to be a valid makefile..
129
130### See feature.h for a list of optionals.
131# If you want to build some optional features without modifying the source,
132# you can set DEFINES on the command line, e.g.,
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000133# nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000134
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000135# Build on both Windows NT/XP and Windows 9x
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136
137TARGETOS = BOTH
138
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000139# Select one of eight object code directories, depends on GUI, OLE, DEBUG and
140# interfaces.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000141# If you change something else, do "make clean" first!
142!if "$(GUI)" == "yes"
143OBJDIR = .\ObjG
144!else
145OBJDIR = .\ObjC
146!endif
147!if "$(OLE)" == "yes"
148OBJDIR = $(OBJDIR)O
149!endif
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000150!ifdef PERL
151OBJDIR = $(OBJDIR)L
152!endif
153!ifdef PYTHON
154OBJDIR = $(OBJDIR)Y
155!endif
156!ifdef TCL
157OBJDIR = $(OBJDIR)T
158!endif
159!ifdef RUBY
160OBJDIR = $(OBJDIR)R
161!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000162!ifdef MZSCHEME
163OBJDIR = $(OBJDIR)Z
164!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000165!if "$(DEBUG)" == "yes"
166OBJDIR = $(OBJDIR)d
167!endif
168
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000169# Win32.mak requires that CPU be set appropriately.
170# To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000171
172!ifdef PROCESSOR_ARCHITECTURE
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000173# We're on Windows NT or using VC 6+
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000174! ifdef CPU
175ASSEMBLY_ARCHITECTURE=$(CPU)
176! else
Bram Moolenaar071d4272004-06-13 20:20:40 +0000177CPU = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000178ASSEMBLY_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000179! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000180CPU = i386
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000181! endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000182! endif
183!else # !PROCESSOR_ARCHITECTURE
184# We're on Windows 95
185CPU = i386
186!endif # !PROCESSOR_ARCHITECTURE
187
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000188!if ("$(CPU)" == "AMD64") || ("$(CPU)" == "IA64")
189DEFINES=$(DEFINES) /Wp64
190!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000191
192# Build a retail version by default
193
194!if "$(DEBUG)" != "yes"
195NODEBUG = 1
196!else
197MAKEFLAGS_GVIMEXT = DEBUG=yes
198!endif
199
200
Bram Moolenaar071d4272004-06-13 20:20:40 +0000201# Get all sorts of useful, standard macros from the SDK. (Note that
202# MSVC 2.2 does not install <ntwin32.mak> in the \msvc20\include
203# directory, but you can find it in \msvc20\include on the CD-ROM.
204# You may also need <win32.mak> from the same place.)
205
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000206!include <Win32.mak>
Bram Moolenaar071d4272004-06-13 20:20:40 +0000207
208
209#>>>>> path of the compiler and linker; name of include and lib directories
210# PATH = c:\msvc20\bin;$(PATH)
211# INCLUDE = c:\msvc20\include
212# LIB = c:\msvc20\lib
213
214!ifndef CTAGS
215CTAGS = ctags
216!endif
217
218!if "$(SNIFF)" == "yes"
219# SNIFF - Include support for SNiFF+.
220SNIFF_INCL = if_sniff.h
221SNIFF_OBJ = $(OBJDIR)/if_sniff.obj
Bram Moolenaarb6356332005-07-18 21:40:44 +0000222SNIFF_LIB = shell32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000223SNIFF_DEFS = -DFEAT_SNIFF
224# The SNiFF integration needs multithreaded libraries!
225MULTITHREADED = yes
226!endif
227
228!ifndef CSCOPE
229CSCOPE = yes
230!endif
231
232!if "$(CSCOPE)" == "yes"
233# CSCOPE - Include support for Cscope
234CSCOPE_INCL = if_cscope.h
235CSCOPE_OBJ = $(OBJDIR)/if_cscope.obj
236CSCOPE_DEFS = -DFEAT_CSCOPE
237!endif
238
239!ifndef NETBEANS
240NETBEANS = $(GUI)
241!endif
242
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000243# Only allow NETBEANS and XPM for a GUI build.
244!if "$(GUI)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000245!if "$(NETBEANS)" == "yes"
246# NETBEANS - Include support for Netbeans integration
247NETBEANS_PRO = proto/netbeans.pro
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000248NETBEANS_OBJ = $(OBJDIR)/netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000249NETBEANS_DEFS = -DFEAT_NETBEANS_INTG
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000250
251!if "$(NBDEBUG)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000252NBDEBUG_DEFS = -DNBDEBUG
253NBDEBUG_INCL = nbdebug.h
254NBDEBUG_SRC = nbdebug.c
255!endif
Bram Moolenaarb6356332005-07-18 21:40:44 +0000256NETBEANS_LIB = WSock32.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000257!endif
258
259!ifdef XPM
260# XPM - Include support for XPM signs
261# you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
262XPM_OBJ = $(OBJDIR)/xpm_w32.obj
263XPM_DEFS = -DFEAT_XPM_W32
264XPM_LIB = $(XPM)\lib\libXpm.lib
265XPM_INC = -I $(XPM)\include
266!endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000267!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000268
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000269# Set which version of the CRT to use
Bram Moolenaar071d4272004-06-13 20:20:40 +0000270!if defined(USE_MSVCRT)
271CVARS = $(cvarsdll)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000272# !elseif defined(MULTITHREADED)
273# CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000274!else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000275# CVARS = $(cvars)
276CVARS = $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000277!endif
278
279# need advapi32.lib for GetUserName()
280# need shell32.lib for ExtractIcon()
281# gdi32.lib and comdlg32.lib for printing support
282# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
283CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000284!if "$(DELAYLOAD)" == "yes"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000285CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
286!endif
287
288### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
289# When set to 0x0500 ":browse" stops working.
290!ifndef WINVER
291WINVER = 0x0400
292!endif
293
294# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
295# default, use these lines.
296#VIMRCLOC = somewhere
297#VIMRUNTIMEDIR = somewhere
298
299CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
300 $(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) \
301 $(NBDEBUG_DEFS) $(XPM_DEFS) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000302 $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
303 /Fo$(OUTDIR)/
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304
305#>>>>> end of choices
306###########################################################################
307
308!ifdef OS
309OS_TYPE = winnt
310DEL_TREE = rmdir /s /q
311!else
312OS_TYPE = win95
313DEL_TREE = deltree /y
314!endif
315
316INTDIR=$(OBJDIR)
317OUTDIR=$(OBJDIR)
318
319# Convert processor ID to MVC-compatible number
320!if "$(CPUNR)" == "i386"
321CPUARG = /G3
322!elseif "$(CPUNR)" == "i486"
323CPUARG = /G4
324!elseif "$(CPUNR)" == "i586"
325CPUARG = /G5
326!elseif "$(CPUNR)" == "i686"
327CPUARG = /G6
Bram Moolenaarcf3630f2005-01-08 16:04:29 +0000328!elseif "$(CPUNR)" == "pentium4"
Bram Moolenaar34114692005-01-02 11:28:13 +0000329CPUARG = /G7 /arch:SSE2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000330!else
331CPUARG =
332!endif
333
334!ifdef NODEBUG
335VIM = vim
336!if "$(OPTIMIZE)" == "SPACE"
337OPTFLAG = /O1
338!elseif "$(OPTIMIZE)" == "SPEED"
339OPTFLAG = /O2
340!else # MAXSPEED
341OPTFLAG = /Ox
342!endif
Bram Moolenaar34114692005-01-02 11:28:13 +0000343CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000344RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000345! ifdef USE_MSVCRT
346CFLAGS = $(CFLAGS) -MD
347LIBC = msvcrt.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000348# CFLAGS = $(CFLAGS) $(cvarsdll)
349# ! elseif defined(MULTITHREADED)
350# LIBC = libcmt.lib
351# CFLAGS = $(CFLAGS) $(cvarsmt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000352! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000353# LIBC = libc.lib
354LIBC = libcmt.lib
355# CFLAGS = $(CFLAGS) $(cvars)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000356! endif
357!else # DEBUG
358VIM = vimd
Bram Moolenaard9d30582005-05-18 22:10:28 +0000359CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
Bram Moolenaar071d4272004-06-13 20:20:40 +0000360RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
361# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
362! if "$(_NMAKE_VER)" == ""
363LIBC =
364! else
365LIBC = /fixed:no
366! endif
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000367! ifdef USE_MSVCRT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000368CFLAGS = $(CFLAGS) -MDd
369LIBC = $(LIBC) msvcrtd.lib
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000370# CFLAGS = $(CFLAGS) $(cvarsdll)
371# ! elseif defined(MULTITHREADED)
372# LIBC = $(LIBC) libcmtd.lib
373# CFLAGS = $(CFLAGS) $(cvarsmt)
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000374! else
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000375# LIBC = $(LIBC) libcd.lib
376LIBC = $(LIBC) libcmtd.lib
377# CFLAGS = $(CFLAGS) $(cvars)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000378! endif
379!endif # DEBUG
380
381INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
382 proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \
383 $(NBDEBUG_INCL)
384
385OBJ = \
386 $(OUTDIR)\buffer.obj \
387 $(OUTDIR)\charset.obj \
388 $(OUTDIR)\diff.obj \
389 $(OUTDIR)\digraph.obj \
390 $(OUTDIR)\edit.obj \
391 $(OUTDIR)\eval.obj \
392 $(OUTDIR)\ex_cmds.obj \
393 $(OUTDIR)\ex_cmds2.obj \
394 $(OUTDIR)\ex_docmd.obj \
395 $(OUTDIR)\ex_eval.obj \
396 $(OUTDIR)\ex_getln.obj \
397 $(OUTDIR)\fileio.obj \
398 $(OUTDIR)\fold.obj \
399 $(OUTDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000400 $(OUTDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000401 $(OUTDIR)\hashtab.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000402 $(OUTDIR)\main.obj \
403 $(OUTDIR)\mark.obj \
404 $(OUTDIR)\mbyte.obj \
405 $(OUTDIR)\memfile.obj \
406 $(OUTDIR)\memline.obj \
407 $(OUTDIR)\menu.obj \
408 $(OUTDIR)\message.obj \
409 $(OUTDIR)\misc1.obj \
410 $(OUTDIR)\misc2.obj \
411 $(OUTDIR)\move.obj \
412 $(OUTDIR)\normal.obj \
413 $(OUTDIR)\ops.obj \
414 $(OUTDIR)\option.obj \
415 $(OUTDIR)\os_mswin.obj \
416 $(OUTDIR)\os_win32.obj \
417 $(OUTDIR)\pathdef.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000418 $(OUTDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000419 $(OUTDIR)\quickfix.obj \
420 $(OUTDIR)\regexp.obj \
421 $(OUTDIR)\screen.obj \
422 $(OUTDIR)\search.obj \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000423 $(OUTDIR)\spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424 $(OUTDIR)\syntax.obj \
425 $(OUTDIR)\tag.obj \
426 $(OUTDIR)\term.obj \
427 $(OUTDIR)\ui.obj \
428 $(OUTDIR)\undo.obj \
429 $(OUTDIR)\window.obj \
430 $(OUTDIR)\vim.res
431
432!if "$(OLE)" == "yes"
433CFLAGS = $(CFLAGS) -DFEAT_OLE
434RCFLAGS = $(RCFLAGS) -DFEAT_OLE
435OLE_OBJ = $(OUTDIR)\if_ole.obj
436OLE_IDL = if_ole.idl
437OLE_LIB = oleaut32.lib
438!endif
439
440!if "$(IME)" == "yes"
441CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME
442!ifndef DYNAMIC_IME
443DYNAMIC_IME = yes
444!endif
445!if "$(DYNAMIC_IME)" == "yes"
446CFLAGS = $(CFLAGS) -DDYNAMIC_IME
447!else
448IME_LIB = imm32.lib
449!endif
450!endif
451
452!if "$(GIME)" == "yes"
453CFLAGS = $(CFLAGS) -DGLOBAL_IME
454OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj
455MBYTE = yes
456!endif
457
458!if "$(MBYTE)" == "yes"
459CFLAGS = $(CFLAGS) -DFEAT_MBYTE
460!endif
461
462!if "$(GUI)" == "yes"
463SUBSYSTEM = windows
464CFLAGS = $(CFLAGS) -DFEAT_GUI_W32
465RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32
466VIM = g$(VIM)
467GUI_INCL = \
468 gui.h \
469 regexp.h \
470 ascii.h \
471 ex_cmds.h \
472 farsi.h \
473 feature.h \
474 globals.h \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000475 gui_beval.h \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000476 keymap.h \
477 macros.h \
478 option.h \
479 os_dos.h \
480 os_win32.h
481GUI_OBJ = \
482 $(OUTDIR)\gui.obj \
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000483 $(OUTDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000484 $(OUTDIR)\gui_w32.obj \
485 $(OUTDIR)\os_w32exe.obj
486GUI_LIB = \
Bram Moolenaara3ffd9c2005-07-21 21:03:15 +0000487 oldnames.lib kernel32.lib gdi32.lib version.lib $(IME_LIB) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000488 winspool.lib comctl32.lib advapi32.lib shell32.lib \
489 /machine:$(CPU) /nodefaultlib
490!else
491SUBSYSTEM = console
492!endif
493
494# iconv.dll library (dynamically loaded)
495!ifndef ICONV
496ICONV = yes
497!endif
498!if "$(ICONV)" == "yes"
499CFLAGS = $(CFLAGS) -DDYNAMIC_ICONV
500!endif
501
502# libintl.dll library
503!ifndef GETTEXT
504GETTEXT = yes
505!endif
506!if "$(GETTEXT)" == "yes"
507CFLAGS = $(CFLAGS) -DDYNAMIC_GETTEXT
508!endif
509
510# TCL interface
511!ifdef TCL
512!ifndef TCL_VER
513TCL_VER = 83
514TCL_VER_LONG = 8.3
515!endif
516!message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)"
517!if "$(DYNAMIC_TCL)" == "yes"
518!message Tcl DLL will be loaded dynamically
519TCL_DLL = tcl$(TCL_VER).dll
Bram Moolenaarb6356332005-07-18 21:40:44 +0000520CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \
521 -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000522TCL_OBJ = $(OUTDIR)\if_tcl.obj
523TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
524TCL_LIB = $(TCL)\lib\tclstub$(TCL_VER).lib
525!else
526CFLAGS = $(CFLAGS) -DFEAT_TCL
527TCL_OBJ = $(OUTDIR)\if_tcl.obj
528TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
529TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib
530!endif
531!endif
532
533# PYTHON interface
534!ifdef PYTHON
535!ifndef PYTHON_VER
536PYTHON_VER = 22
537!endif
538!message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)"
539!if "$(DYNAMIC_PYTHON)" == "yes"
540!message Python DLL will be loaded dynamically
541!endif
542CFLAGS = $(CFLAGS) -DFEAT_PYTHON
543PYTHON_OBJ = $(OUTDIR)\if_python.obj
544PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC"
545!if "$(DYNAMIC_PYTHON)" == "yes"
Bram Moolenaarb6356332005-07-18 21:40:44 +0000546CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \
547 -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib
549!else
550PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
551!endif
552!endif
553
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000554# MzScheme interface
555!ifdef MZSCHEME
556!message MzScheme requested - root dir is "$(MZSCHEME)"
557!ifndef MZSCHEME_VER
558MZSCHEME_VER = 205_000
559!endif
560CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000561!if "$(DYNAMIC_MZSCHEME)" == "yes"
562!message MzScheme DLLs will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000563CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
564 -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" \
565 -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000566!else
Bram Moolenaarb6356332005-07-18 21:40:44 +0000567MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
568 $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000569!endif
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000570MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
571!endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000572
Bram Moolenaar071d4272004-06-13 20:20:40 +0000573# Perl interface
574!ifdef PERL
575!ifndef PERL_VER
576PERL_VER = 56
577!endif
578!message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)"
579!if "$(DYNAMIC_PERL)" == "yes"
580!if $(PERL_VER) >= 56
581!message Perl DLL will be loaded dynamically
582!else
583!message Dynamic loading is not supported for Perl versions earlier than 5.6.0
584!message Reverting to static loading...
585!undef DYNAMIC_PERL
586!endif
587!endif
588
589# Is Perl installed in architecture-specific directories?
590!if exist($(PERL)\Bin\MSWin32-x86)
591PERL_ARCH = \MSWin32-x86
592!endif
593
594PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core
595
596# Version-dependent stuff
597!if $(PERL_VER) == 55
598PERL_LIB = $(PERL_INCDIR)\perl.lib
599!else
600PERL_DLL = perl$(PERL_VER).dll
601PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib
602!endif
603
604CFLAGS = $(CFLAGS) -DFEAT_PERL
605
606# Do we want to load Perl dynamically?
607!if "$(DYNAMIC_PERL)" == "yes"
608CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
609!undef PERL_LIB
610!endif
611
612PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
613PERL_INC = /I $(PERL_INCDIR)
614PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
615XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
616XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
617
618!endif
619
620#
621# Support Ruby interface
622#
623!ifdef RUBY
624# Set default value
625!ifndef RUBY_VER
626RUBY_VER = 18
627!endif
628!ifndef RUBY_VER_LONG
629RUBY_VER_LONG = 1.8
630!endif
631
632!if $(RUBY_VER) >= 18
633!ifndef RUBY_PLATFORM
634RUBY_PLATFORM = i386-mswin32
635!endif
636!ifndef RUBY_INSTALL_NAME
637RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
638!endif
639!else
640!ifndef RUBY_PLATFORM
641RUBY_PLATFORM = i586-mswin32
642!endif
643!ifndef RUBY_INSTALL_NAME
644RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
645!endif
646!endif # $(RUBY_VER) >= 18
647
648!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
649CFLAGS = $(CFLAGS) -DFEAT_RUBY
650RUBY_OBJ = $(OUTDIR)\if_ruby.obj
651RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
652RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
653# Do we want to load Ruby dynamically?
654!if "$(DYNAMIC_RUBY)" == "yes"
655!message Ruby DLL will be loaded dynamically
Bram Moolenaarb6356332005-07-18 21:40:44 +0000656CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=$(RUBY_VER) \
657 -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000658!undef RUBY_LIB
659!endif
660!endif # RUBY
661
662#
663# Support PostScript printing
664#
665!if "$(POSTSCRIPT)" == "yes"
666CFLAGS = $(CFLAGS) -DMSWINPS
667!endif # POSTSCRIPT
668
669#
670# FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
671#
672!if "$(FEATURES)"==""
673FEATURES = BIG
674!endif
675CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
676
677#
Bram Moolenaard9d30582005-05-18 22:10:28 +0000678# Always generate the .pdb file, so that we get debug symbols that can be used
679# on a crash (doesn't add overhead to the executable).
680#
Bram Moolenaarb6356332005-07-18 21:40:44 +0000681CFLAGS = $(CFLAGS) /Zi /Fd$(OUTDIR)/
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000682LINK_PDB = /PDB:$(OUTDIR)/$(VIM).pdb -debug # -debug:full -debugtype:cv,fixup
Bram Moolenaard9d30582005-05-18 22:10:28 +0000683
684#
685# End extra feature include
Bram Moolenaar071d4272004-06-13 20:20:40 +0000686#
687!message
688
689conflags = /nologo /subsystem:$(SUBSYSTEM) /incremental:no
690
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000691PATHDEF_SRC = $(OUTDIR)\pathdef.c
692
Bram Moolenaar071d4272004-06-13 20:20:40 +0000693!IF "$(MAP)" == "yes"
694# "/map" is for debugging
695conflags = $(conflags) /map
696!ELSEIF "$(MAP)" == "lines"
697# "/mapinfo:lines" is for debugging, only works for VC6 and later
698conflags = $(conflags) /map /mapinfo:lines
699!ENDIF
700
701LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc
702LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000703 $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \
704 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000705
Bram Moolenaarb6356332005-07-18 21:40:44 +0000706all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \
707 GvimExt/gvimext.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +0000708
Bram Moolenaarb6356332005-07-18 21:40:44 +0000709$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
710 $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
711 $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) version.c version.h
712 $(CC) $(CFLAGS) version.c
Bram Moolenaar0dc065e2005-07-04 22:49:24 +0000713 $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000714 $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) \
715 $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
716 $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000717
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000718$(VIM): $(VIM).exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000719
720$(OUTDIR):
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000721 if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000722
723install.exe: dosinst.c
Bram Moolenaarb6356332005-07-18 21:40:44 +0000724 $(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \
725 ole32.lib advapi32.lib uuid.lib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000726 - if exist install.exe del install.exe
727 ren dosinst.exe install.exe
728
729uninstal.exe: uninstal.c
730 $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
731
732vimrun.exe: vimrun.c
733 $(CC) /nologo -DNDEBUG vimrun.c
734
735xxd/xxd.exe: xxd/xxd.c
736 cd xxd
737 $(MAKE) /NOLOGO -f Make_mvc.mak
738 cd ..
739
740GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
741 cd GvimExt
742 $(MAKE) /NOLOGO -f Makefile $(MAKEFLAGS_GVIMEXT)
743 cd ..
744
745
746tags: notags
747 $(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro
748
749notags:
750 - if exist tags del tags
751
752clean:
Bram Moolenaar02743632005-07-25 20:42:36 +0000753 - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000754 - if exist *.obj del *.obj
755 - if exist $(VIM).exe del $(VIM).exe
756 - if exist $(VIM).ilk del $(VIM).ilk
757 - if exist $(VIM).pdb del $(VIM).pdb
758 - if exist $(VIM).map del $(VIM).map
759 - if exist $(VIM).ncb del $(VIM).ncb
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000760 - if exist gvim.exe.mnf del gvim.exe.mnf
Bram Moolenaar071d4272004-06-13 20:20:40 +0000761 - if exist vimrun.exe del vimrun.exe
762 - if exist install.exe del install.exe
763 - if exist uninstal.exe del uninstal.exe
764 - if exist if_perl.c del if_perl.c
765 - if exist dimm.h del dimm.h
766 - if exist dimm_i.c del dimm_i.c
767 - if exist dimm.tlb del dimm.tlb
768 - if exist dosinst.exe del dosinst.exe
769 cd xxd
770 $(MAKE) /NOLOGO -f Make_mvc.mak clean
771 cd ..
772 cd GvimExt
773 $(MAKE) /NOLOGO -f Makefile clean
774 cd ..
775 cd GvimExt
776 $(MAKE) /NOLOGO -f Makefile clean
777 cd ..
778 - if exist testdir\*.out del testdir\*.out
779
780test:
781 cd testdir
782 $(MAKE) /NOLOGO -f Make_dos.mak win32
783 cd ..
784
Bram Moolenaar34114692005-01-02 11:28:13 +0000785testclean:
786 cd testdir
787 $(MAKE) /NOLOGO -f Make_dos.mak clean
788 cd ..
789
Bram Moolenaar071d4272004-06-13 20:20:40 +0000790###########################################################################
791
792# Create a default rule for transforming .c files to .obj files in $(OUTDIR)
793# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
794!IF "$(_NMAKE_VER)" == ""
795.c{$(OUTDIR)/}.obj:
796!ELSE
797.c{$(OUTDIR)/}.obj::
798!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000799 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000800
801# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
802# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
803!IF "$(_NMAKE_VER)" == ""
804.cpp{$(OUTDIR)/}.obj:
805!ELSE
806.cpp{$(OUTDIR)/}.obj::
807!ENDIF
Bram Moolenaarb6356332005-07-18 21:40:44 +0000808 $(CC) $(CFLAGS) $<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000809
810$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
811
812$(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
813
814$(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
815
816$(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL)
817
818$(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL)
819
820$(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL)
821
822$(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL)
823
824$(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL)
825
826$(OUTDIR)/ex_docmd.obj: $(OUTDIR) ex_docmd.c $(INCL) ex_cmds.h
827
828$(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h
829
830$(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL)
831
832$(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
833
834$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
835
836$(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL)
837
Bram Moolenaar58d98232005-07-23 22:25:46 +0000838$(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL)
839
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000840$(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL)
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000841
Bram Moolenaar071d4272004-06-13 20:20:40 +0000842$(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL)
843
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000844$(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
845
Bram Moolenaar071d4272004-06-13 20:20:40 +0000846$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL)
847
848$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
849
850if_perl.c : if_perl.xs typemap
Bram Moolenaarb6356332005-07-18 21:40:44 +0000851 $(PERL_EXE) $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
852 -typemap typemap if_perl.xs > if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000853
854$(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000855 $(CC) $(CFLAGS) $(PERL_INC) if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000856
857$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000858 $(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000859
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000860$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL)
Bram Moolenaar6a9aa372005-07-20 21:54:57 +0000861 $(CC) $(CFLAGS) if_mzsch.c \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000862 -DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000863
Bram Moolenaar071d4272004-06-13 20:20:40 +0000864$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000865 $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000866
867$(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h
868
869$(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000870 $(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000871
872$(OUTDIR)/if_sniff.obj: $(OUTDIR) if_sniff.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000873 $(CC) $(CFLAGS) if_sniff.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000874
875$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
Bram Moolenaarb6356332005-07-18 21:40:44 +0000876 $(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000877
878$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL)
879
880$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL)
881
882$(OUTDIR)/memfile.obj: $(OUTDIR) memfile.c $(INCL)
883
884$(OUTDIR)/memline.obj: $(OUTDIR) memline.c $(INCL)
885
886$(OUTDIR)/menu.obj: $(OUTDIR) menu.c $(INCL)
887
888$(OUTDIR)/message.obj: $(OUTDIR) message.c $(INCL)
889
890$(OUTDIR)/misc1.obj: $(OUTDIR) misc1.c $(INCL)
891
892$(OUTDIR)/misc2.obj: $(OUTDIR) misc2.c $(INCL)
893
894$(OUTDIR)/move.obj: $(OUTDIR) move.c $(INCL)
895
896$(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL)
897
898$(OUTDIR)/netbeans.obj: $(OUTDIR) netbeans.c $(NBDEBUG_SRC) $(INCL)
899
900$(OUTDIR)/normal.obj: $(OUTDIR) normal.c $(INCL)
901
902$(OUTDIR)/option.obj: $(OUTDIR) option.c $(INCL)
903
904$(OUTDIR)/ops.obj: $(OUTDIR) ops.c $(INCL)
905
906$(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL)
907
908$(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h
909
910$(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
911
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000912$(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
913 $(CC) $(CFLAGS) $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000914
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000915$(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL)
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000916
Bram Moolenaar071d4272004-06-13 20:20:40 +0000917$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
918
919$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c $(INCL)
920
921$(OUTDIR)/screen.obj: $(OUTDIR) screen.c $(INCL)
922
923$(OUTDIR)/search.obj: $(OUTDIR) search.c $(INCL)
924
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000925$(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL)
926
Bram Moolenaar071d4272004-06-13 20:20:40 +0000927$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
928
929$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
930
931$(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL)
932
933$(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
934
935$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
936
937$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
938
939$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
Bram Moolenaarb6356332005-07-18 21:40:44 +0000940 $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000941
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000942$(OUTDIR)/vim.res: $(OUTDIR) gvim.exe.mnf vim.rc version.h tools.bmp tearoff.bmp \
Bram Moolenaarb6356332005-07-18 21:40:44 +0000943 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
Bram Moolenaar071d4272004-06-13 20:20:40 +0000944 $(RC) /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc
945
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000946iid_ole.c if_ole.h vim.tlb: if_ole.idl
Bram Moolenaarb6356332005-07-18 21:40:44 +0000947 midl /nologo /error none /proxy nul /iid iid_ole.c /tlb vim.tlb \
948 /header if_ole.h if_ole.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +0000949
950dimm.h dimm_i.c: dimm.idl
Bram Moolenaar7d1f5db2005-07-03 21:39:27 +0000951 midl /nologo /error none /proxy nul dimm.idl
Bram Moolenaar071d4272004-06-13 20:20:40 +0000952
953$(OUTDIR)/dimm_i.obj: $(OUTDIR) dimm_i.c $(INCL)
954
955$(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
956
Bram Moolenaar89cb5e02004-07-19 20:55:54 +0000957# $CFLAGS may contain backslashes and double quotes, escape them both.
958E0_CFLAGS = $(CFLAGS:\=\\)
959E_CFLAGS = $(E0_CFLAGS:"=\")
960
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000961$(PATHDEF_SRC): auto
962 @echo creating $(PATHDEF_SRC)
963 @echo /* pathdef.c */ > $(PATHDEF_SRC)
964 @echo #include "vim.h" >> $(PATHDEF_SRC)
965 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC)
966 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC)
967 @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC)
968 @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC)
969 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
970 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000971
Bram Moolenaareb3593b2006-04-22 22:33:57 +0000972gvim.exe.mnf: auto
973 @echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes"?^> >$@
974 @echo ^<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"^> >>$@
975 @echo ^<assemblyIdentity >>$@
976 @echo processorArchitecture="$(ASSEMBLY_ARCHITECTURE)" >>$@
977 @echo version="7.0.0.0" >>$@
978 @echo type="win32" >>$@
979 @echo name="Vim" >>$@
980 @echo /^> >>$@
981 @echo ^<description^>Vi Improved - A Text Editor^</description^> >>$@
982 @echo ^<dependency^> >>$@
983 @echo ^<dependentAssembly^> >>$@
984 @echo ^<assemblyIdentity >>$@
985 @echo type="win32" >>$@
986 @echo name="Microsoft.Windows.Common-Controls" >>$@
987 @echo version="6.0.0.0" >>$@
988 @echo publicKeyToken="6595b64144ccf1df" >>$@
989 @echo language="*" >>$@
990 @echo processorArchitecture="$(ASSEMBLY_ARCHITECTURE)" >>$@
991 @echo /^> >>$@
992 @echo ^</dependentAssembly^> >>$@
993 @echo ^</dependency^> >>$@
994 @echo ^</assembly^> >>$@
995
Bram Moolenaar071d4272004-06-13 20:20:40 +0000996auto:
997 if not exist auto/nul mkdir auto
998
999# End Custom Build
1000proto.h: \
1001 proto/buffer.pro \
1002 proto/charset.pro \
1003 proto/diff.pro \
1004 proto/digraph.pro \
1005 proto/edit.pro \
1006 proto/eval.pro \
1007 proto/ex_cmds.pro \
1008 proto/ex_cmds2.pro \
1009 proto/ex_docmd.pro \
1010 proto/ex_eval.pro \
1011 proto/ex_getln.pro \
1012 proto/fileio.pro \
1013 proto/getchar.pro \
Bram Moolenaar58d98232005-07-23 22:25:46 +00001014 proto/hardcopy.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001015 proto/hashtab.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001016 proto/main.pro \
1017 proto/mark.pro \
1018 proto/memfile.pro \
1019 proto/memline.pro \
1020 proto/menu.pro \
1021 proto/message.pro \
1022 proto/misc1.pro \
1023 proto/misc2.pro \
1024 proto/move.pro \
1025 proto/mbyte.pro \
1026 proto/normal.pro \
1027 proto/ops.pro \
1028 proto/option.pro \
1029 proto/os_mswin.pro \
1030 proto/os_win32.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001031 proto/popupmnu.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001032 proto/quickfix.pro \
1033 proto/regexp.pro \
1034 proto/screen.pro \
1035 proto/search.pro \
Bram Moolenaar2e4096b2005-03-20 22:25:45 +00001036 proto/spell.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001037 proto/syntax.pro \
1038 proto/tag.pro \
1039 proto/term.pro \
1040 proto/ui.pro \
1041 proto/undo.pro \
1042 proto/window.pro \
1043 $(NETBEANS_PRO)
1044
Bram Moolenaar362e1a32006-03-06 23:29:24 +00001045.cod.c:
1046 $(CC) $(CFLAGS) /FAc $<
1047
1048
Bram Moolenaar071d4272004-06-13 20:20:40 +00001049# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: