1 # 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), VC8 (VS2005),
4 # VC9 (VS2008), and VC10 (VS2010).
6 # To build using other Windows compilers, see INSTALLpc.txt
8 # This makefile can build the console, GUI, OLE-enable, Perl-enabled and
9 # Python-enabled versions of Vim for Win32 platforms.
11 # The basic command line to build Vim is:
13 # nmake -f Make_mvc.mak
15 # This will build the console version of Vim with no additional interfaces.
16 # To add features, define any of the following:
18 # !!!! After changing features do "nmake clean" first !!!!
20 # Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is BIG)
22 # GUI interface: GUI=yes (default is no)
24 # OLE interface: OLE=yes (usually with GUI=yes)
26 # Multibyte support: MBYTE=yes (default is no)
28 # IME support: IME=yes (requires GUI=yes)
29 # DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default
31 # Global IME support: GIME=yes (requires GUI=yes)
34 # MZSCHEME=[Path to MzScheme directory]
35 # DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically)
36 # MZSCHEME_VER=[version, 205_000, ...]
40 # PERL=[Path to Perl directory]
41 # DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
42 # PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc]
46 # PYTHON=[Path to Python directory]
47 # DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
48 # PYTHON_VER=[Python version, eg 15, 20] (default is 22)
51 # RUBY=[Path to Ruby directory]
52 # DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
53 # RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
54 # RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
55 # You must set RUBY_VER_LONG when change RUBY_VER.
58 # TCL=[Path to Tcl directory]
59 # DYNAMIC_TCL=yes (to load the Tcl DLL dynamically)
60 # TCL_VER=[Tcl version, e.g. 80, 83] (default is 83)
61 # TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
62 # You must set TCL_VER_LONG when you set TCL_VER.
64 # SNiFF+ interface: SNIFF=yes
66 # Cscope support: CSCOPE=yes
68 # Iconv library support (always dynamically loaded):
69 # ICONV=[yes or no] (default is yes)
71 # Intl library support (always dynamically loaded):
72 # GETTEXT=[yes or no] (default is yes)
73 # See http://sourceforge.net/projects/gettext/
75 # PostScript printing: POSTSCRIPT=yes (default is no)
77 # Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
79 # XPM Image Support: XPM=[path to XPM directory]
81 # Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
83 # Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is
86 # Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400)
88 # Debug version: DEBUG=yes
89 # Mapfile: MAP=[no, yes or lines] (default is yes)
90 # no: Don't write a mapfile.
91 # yes: Write a normal mapfile.
92 # lines: Write a mapfile with line numbers (only for VC6 and later)
94 # Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
97 # Visual C Version: MSVCVER=m.n (default derived from nmake if undefined)
99 # You can combine any of these interfaces
101 # Example: To build the non-debug, GUI version with Perl interface:
102 # nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
104 # DEBUG with Make_mvc.mak and Make_dvc.mak:
105 # This makefile gives a fineness of control which is not supported in
106 # Visual C++ configuration files. Therefore, debugging requires a bit of
108 # Make_dvc.mak is a Visual C++ project to access that support. It may be
109 # badly out of date for the Visual C++ you are using...
110 # To use Make_dvc.mak:
111 # 1) Build Vim with Make_mvc.mak.
112 # Use a "DEBUG=yes" argument to build Vim with debug support.
113 # E.g. the following builds gvimd.exe:
114 # nmake -f Make_mvc.mak debug=yes gui=yes
115 # 2) Use MS Devstudio and set it up to allow that file to be debugged:
116 # i) Pass Make_dvc.mak to the IDE.
117 # Use the "open workspace" menu entry to load Make_dvc.mak.
118 # Alternatively, from the command line:
119 # msdev /nologo Make_dvc.mak
120 # Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
121 # this and offer to convert it to their own format. Accept that.
122 # It creates a file called Make_dvc.dsw which can then be used
123 # for further operations. E.g.
124 # msdev /nologo Make_dvc.dsw
125 # ii) Set the built executable for debugging:
126 # a) Alt+F7/Debug takes you to the Debug dialog.
127 # b) Fill "Executable for debug session". e.g. gvimd.exe
128 # c) Fill "Program arguments". e.g. -R dosinst.c
129 # d) Complete the dialog
130 # 3) You can now debug the executable you built with Make_mvc.mak
132 # Note: Make_dvc.mak builds vimrun.exe, because it must build something
133 # to be a valid makefile..
135 ### See feature.h for a list of optionals.
136 # If you want to build some optional features without modifying the source,
137 # you can set DEFINES on the command line, e.g.,
138 # nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
140 # Build on both Windows NT/XP and Windows 9x
144 # Select one of eight object code directories, depends on GUI, OLE, DEBUG and
146 # If you change something else, do "make clean" first!
147 !if
"$(GUI)" == "yes"
152 !if
"$(OLE)" == "yes"
170 !if
"$(DEBUG)" == "yes"
174 # Win32.mak requires that CPU be set appropriately.
175 # To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
177 !ifdef PROCESSOR_ARCHITECTURE
178 # We're on Windows NT or using VC 6+
180 ASSEMBLY_ARCHITECTURE
=$(CPU
)
181 # Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7.
182 ! if
("$(ASSEMBLY_ARCHITECTURE)" == "i386") ||
("$(ASSEMBLY_ARCHITECTURE)" == "I386")
183 ASSEMBLY_ARCHITECTURE
= x86
186 CPU
= $(PROCESSOR_ARCHITECTURE
)
187 ASSEMBLY_ARCHITECTURE
= $(PROCESSOR_ARCHITECTURE
)
188 ! if
("$(CPU)" == "x86") ||
("$(CPU)" == "X86")
192 !else # !PROCESSOR_ARCHITECTURE
193 # We're on Windows 95
195 !endif # !PROCESSOR_ARCHITECTURE
197 # Build a retail version by default
199 !if
"$(DEBUG)" != "yes"
203 MAKEFLAGS_GVIMEXT
= DEBUG
=yes
207 # Get all sorts of useful, standard macros from the Platform SDK.
211 # Turn on Win64 compatibility warnings for VC7.x and VC8.
212 # (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
213 !if
("$(MSVCVER)" == "7.0") ||
("$(MSVCVER)" == "7.1") ||
("$(MSVCVER)" == "8.0")
214 DEFINES
=$(DEFINES
) /Wp64
217 #>>>>> path of the compiler and linker; name of include and lib directories
218 # PATH = c:\msvc20\bin;$(PATH)
219 # INCLUDE = c:\msvc20\include
220 # LIB = c:\msvc20\lib
226 !if
"$(SNIFF)" == "yes"
227 # SNIFF - Include support for SNiFF+.
228 SNIFF_INCL
= if_sniff.h
229 SNIFF_OBJ
= $(OBJDIR
)/if_sniff.obj
230 SNIFF_LIB
= shell32.lib
231 SNIFF_DEFS
= -DFEAT_SNIFF
232 # The SNiFF integration needs multithreaded libraries!
240 !if
"$(CSCOPE)" == "yes"
241 # CSCOPE - Include support for Cscope
242 CSCOPE_INCL
= if_cscope.h
243 CSCOPE_OBJ
= $(OBJDIR
)/if_cscope.obj
244 CSCOPE_DEFS
= -DFEAT_CSCOPE
251 # Only allow NETBEANS and XPM for a GUI build.
252 !if
"$(GUI)" == "yes"
253 !if
"$(NETBEANS)" == "yes"
254 # NETBEANS - Include support for Netbeans integration
255 NETBEANS_PRO
= proto
/netbeans.pro
256 NETBEANS_OBJ
= $(OBJDIR
)/netbeans.obj
257 NETBEANS_DEFS
= -DFEAT_NETBEANS_INTG
259 !if
"$(NBDEBUG)" == "yes"
260 NBDEBUG_DEFS
= -DNBDEBUG
261 NBDEBUG_INCL
= nbdebug.h
262 NBDEBUG_SRC
= nbdebug.c
264 NETBEANS_LIB
= WSock32.lib
268 # XPM - Include support for XPM signs
269 # you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
270 XPM_OBJ
= $(OBJDIR
)/xpm_w32.obj
271 XPM_DEFS
= -DFEAT_XPM_W32
272 XPM_LIB
= $(XPM
)\lib\libXpm.lib
273 XPM_INC
= -I
$(XPM
)\
include
277 # Set which version of the CRT to use
278 !if defined
(USE_MSVCRT
)
279 # CVARS = $(cvarsdll)
280 # !elseif defined(MULTITHREADED)
287 # need advapi32.lib for GetUserName()
288 # need shell32.lib for ExtractIcon()
289 # gdi32.lib and comdlg32.lib for printing support
290 # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
291 CON_LIB
= oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \
292 comdlg32.lib ole32.lib uuid.lib
/machine
:$(CPU
) /nodefaultlib
293 !if
"$(DELAYLOAD)" == "yes"
294 CON_LIB
= $(CON_LIB
) /DELAYLOAD
:comdlg32.dll
/DELAYLOAD
:ole32.dll DelayImp.lib
297 ### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
298 # When set to 0x0500 ":browse" stops working.
303 # If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
304 # default, use these lines.
305 #VIMRCLOC = somewhere
306 #VIMRUNTIMEDIR = somewhere
308 CFLAGS
= -c
/W3
/nologo
$(CVARS
) -I.
-Iproto
-DHAVE_PATHDEF
-DWIN32 \
309 $(SNIFF_DEFS
) $(CSCOPE_DEFS
) $(NETBEANS_DEFS
) \
310 $(NBDEBUG_DEFS
) $(XPM_DEFS
) \
311 $(DEFINES
) -DWINVER
=$(WINVER
) -D_WIN32_WINNT
=$(WINVER
) \
314 #>>>>> end of choices
315 ###########################################################################
319 DEL_TREE
= rmdir
/s
/q
322 DEL_TREE
= deltree
/y
328 # Derive version of VC being used from nmake if not specified
329 !if
"$(MSVCVER)" == ""
330 !if
"$(_NMAKE_VER)" == ""
333 !if
"$(_NMAKE_VER)" == "162"
336 !if
"$(_NMAKE_VER)" == "6.00.8168.0"
340 !if
"$(_NMAKE_VER)" == "7.00.9466"
343 !if
"$(_NMAKE_VER)" == "7.10.3077"
346 !if
"$(_NMAKE_VER)" == "8.00.50727.42"
349 !if
"$(_NMAKE_VER)" == "8.00.50727.762"
352 !if
"$(_NMAKE_VER)" == "9.00.20706.01"
355 !if
"$(_NMAKE_VER)" == "9.00.21022.08"
358 !if
"$(_NMAKE_VER)" == "9.00.30729.01"
361 !if
"$(_NMAKE_VER)" == "10.00.20506.01"
364 !if
"$(_NMAKE_VER)" == "10.00.30128.01"
369 # Abort bulding VIM if version of VC is unrecognised.
372 !message Cannot determine Visual C version being used. If you are using the
373 !message Windows SDK then you must have the environment variable MSVCVER set to
374 !message your version of the VC compiler. If you are not using the Express
375 !message version of Visual C
, you can either set MSVCVER or update this makefile
376 !message to handle the new value for _NMAKE_VER
, "$(_NMAKE_VER)".
380 # Convert processor ID to MVC-compatible number
381 !if
("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0")
382 !if
"$(CPUNR)" == "i386"
384 !elseif
"$(CPUNR)" == "i486"
386 !elseif
"$(CPUNR)" == "i586"
388 !elseif
"$(CPUNR)" == "i686"
390 !elseif
"$(CPUNR)" == "pentium4"
391 CPUARG
= /G7
/arch
:SSE2
396 # VC8/9 only allows specifying SSE architecture
397 !if
"$(CPUNR)" == "pentium4"
407 !if
"$(OPTIMIZE)" == "SPACE"
409 !elseif
"$(OPTIMIZE)" == "SPEED"
414 !if
("$(MSVCVER)" == "8.0") ||
("$(MSVCVER)" == "9.0") ||
("$(MSVCVER)" == "10.0")
415 # Use link time code generation if not worried about size
416 !if
"$(OPTIMIZE)" != "SPACE"
417 OPTFLAG
= $(OPTFLAG
) /GL
420 CFLAGS
= $(CFLAGS
) $(OPTFLAG
) -DNDEBUG
$(CPUARG
)
421 RCFLAGS
= $(rcflags
) $(rcvars
) -DNDEBUG
423 CFLAGS
= $(CFLAGS
) /MD
427 CFLAGS
= $(CFLAGS
) /Zl
/MT
431 ! if
("$(CPU)" == "i386") ||
("$(CPU)" == "ix86")
434 CFLAGS
= $(CFLAGS
) -D_DEBUG
-DDEBUG
/Od
435 RCFLAGS
= $(rcflags
) $(rcvars
) -D_DEBUG
-DDEBUG
436 # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
437 ! if
"$(MSVCVER)" == "4.0"
443 CFLAGS
= $(CFLAGS
) /MDd
444 LIBC
= $(LIBC
) msvcrtd.lib
446 LIBC
= $(LIBC
) libcmtd.lib
447 CFLAGS
= $(CFLAGS
) /Zl
/MTd
451 INCL
= vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
452 proto.h option.h structs.h term.h
$(SNIFF_INCL
) $(CSCOPE_INCL
) \
456 $(OUTDIR
)\buffer.obj \
457 $(OUTDIR
)\charset.obj \
459 $(OUTDIR
)\digraph.obj \
462 $(OUTDIR
)\ex_cmds.obj \
463 $(OUTDIR
)\ex_cmds2.obj \
464 $(OUTDIR
)\ex_docmd.obj \
465 $(OUTDIR
)\ex_eval.obj \
466 $(OUTDIR
)\ex_getln.obj \
467 $(OUTDIR
)\fileio.obj \
469 $(OUTDIR
)\getchar.obj \
470 $(OUTDIR
)\hardcopy.obj \
471 $(OUTDIR
)\hashtab.obj \
474 $(OUTDIR
)\mbyte.obj \
475 $(OUTDIR
)\memfile.obj \
476 $(OUTDIR
)\memline.obj \
478 $(OUTDIR
)\message.obj \
479 $(OUTDIR
)\misc1.obj \
480 $(OUTDIR
)\misc2.obj \
482 $(OUTDIR
)\normal.obj \
484 $(OUTDIR
)\option.obj \
485 $(OUTDIR
)\os_mswin.obj \
486 $(OUTDIR
)\os_win32.obj \
487 $(OUTDIR
)\pathdef.obj \
488 $(OUTDIR
)\popupmnu.obj \
489 $(OUTDIR
)\quickfix.obj \
490 $(OUTDIR
)\regexp.obj \
491 $(OUTDIR
)\screen.obj \
492 $(OUTDIR
)\search.obj \
493 $(OUTDIR
)\spell.obj \
494 $(OUTDIR
)\syntax.obj \
499 $(OUTDIR
)\window.obj \
502 !if
"$(OLE)" == "yes"
503 CFLAGS
= $(CFLAGS
) -DFEAT_OLE
504 RCFLAGS
= $(RCFLAGS
) -DFEAT_OLE
505 OLE_OBJ
= $(OUTDIR
)\if_ole.obj
507 OLE_LIB
= oleaut32.lib
510 !if
"$(IME)" == "yes"
511 CFLAGS
= $(CFLAGS
) -DFEAT_MBYTE_IME
515 !if
"$(DYNAMIC_IME)" == "yes"
516 CFLAGS
= $(CFLAGS
) -DDYNAMIC_IME
522 !if
"$(GIME)" == "yes"
523 CFLAGS
= $(CFLAGS
) -DGLOBAL_IME
524 OBJ
= $(OBJ
) $(OUTDIR
)\dimm_i.obj
$(OUTDIR
)\glbl_ime.obj
528 !if
"$(MBYTE)" == "yes"
529 CFLAGS
= $(CFLAGS
) -DFEAT_MBYTE
532 !if
"$(GUI)" == "yes"
534 CFLAGS
= $(CFLAGS
) -DFEAT_GUI_W32
535 RCFLAGS
= $(RCFLAGS
) -DFEAT_GUI_W32
553 $(OUTDIR
)\gui_beval.obj \
554 $(OUTDIR
)\gui_w32.obj \
555 $(OUTDIR
)\os_w32exe.obj
557 gdi32.lib version.lib
$(IME_LIB
) \
558 winspool.lib comctl32.lib advapi32.lib shell32.lib \
559 /machine
:$(CPU
) /nodefaultlib
564 # iconv.dll library (dynamically loaded)
568 !if
"$(ICONV)" == "yes"
569 CFLAGS
= $(CFLAGS
) -DDYNAMIC_ICONV
572 # libintl.dll library
576 !if
"$(GETTEXT)" == "yes"
577 CFLAGS
= $(CFLAGS
) -DDYNAMIC_GETTEXT
586 !message Tcl requested
(version
$(TCL_VER
)) - root
dir is
"$(TCL)"
587 !if
"$(DYNAMIC_TCL)" == "yes"
588 !message Tcl DLL will be loaded dynamically
589 TCL_DLL
= tcl
$(TCL_VER
).dll
590 CFLAGS
= $(CFLAGS
) -DFEAT_TCL
-DDYNAMIC_TCL
-DDYNAMIC_TCL_DLL
=\"$(TCL_DLL
)\" \
591 -DDYNAMIC_TCL_VER
=\"$(TCL_VER_LONG
)\"
592 TCL_OBJ
= $(OUTDIR
)\if_tcl.obj
593 TCL_INC
= /I
"$(TCL)\Include" /I
"$(TCL)"
594 TCL_LIB
= $(TCL
)\lib
\tclstub
$(TCL_VER
).lib
596 CFLAGS
= $(CFLAGS
) -DFEAT_TCL
597 TCL_OBJ
= $(OUTDIR
)\if_tcl.obj
598 TCL_INC
= /I
"$(TCL)\Include" /I
"$(TCL)"
599 TCL_LIB
= $(TCL
)\lib
\tcl
$(TCL_VER
)vc.lib
608 !message Python requested
(version
$(PYTHON_VER
)) - root
dir is
"$(PYTHON)"
609 !if
"$(DYNAMIC_PYTHON)" == "yes"
610 !message Python DLL will be loaded dynamically
612 CFLAGS
= $(CFLAGS
) -DFEAT_PYTHON
613 PYTHON_OBJ
= $(OUTDIR
)\if_python.obj
614 PYTHON_INC
= /I
"$(PYTHON)\Include" /I
"$(PYTHON)\PC"
615 !if
"$(DYNAMIC_PYTHON)" == "yes"
616 CFLAGS
= $(CFLAGS
) -DDYNAMIC_PYTHON \
617 -DDYNAMIC_PYTHON_DLL
=\"python
$(PYTHON_VER
).dll
\"
618 PYTHON_LIB
= /nodefaultlib
:python
$(PYTHON_VER
).lib
620 PYTHON_LIB
= $(PYTHON
)\libs\python
$(PYTHON_VER
).lib
626 !message MzScheme requested
- root
dir is
"$(MZSCHEME)"
628 MZSCHEME_VER
= 205_000
630 CFLAGS
= $(CFLAGS
) -DFEAT_MZSCHEME
-I
$(MZSCHEME
)\
include
631 !if EXIST
("$(MZSCHEME)\collects\scheme\base.ss")
632 # for MzScheme 4.x we need to include byte code for basic Scheme stuff
633 MZSCHEME_EXTRA_DEP
= mzscheme_base.c
634 CFLAGS
= $(CFLAGS
) -DINCLUDE_MZSCHEME_BASE
636 !if EXIST
("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib") \
637 && !EXIST
("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib")
638 !message Building with Precise GC
639 MZSCHEME_PRECISE_GC
= yes
640 CFLAGS
= $(CFLAGS
) -DMZ_PRECISE_GC
642 !if
"$(DYNAMIC_MZSCHEME)" == "yes"
643 !if
"$(MZSCHEME_PRECISE_GC)" == "yes"
644 !error MzScheme with Precise GC cannot be loaded dynamically
646 !message MzScheme DLLs will be loaded dynamically
647 CFLAGS
= $(CFLAGS
) -DDYNAMIC_MZSCHEME \
648 -DDYNAMIC_MZSCH_DLL
=\"libmzsch
$(MZSCHEME_VER
).dll
\" \
649 -DDYNAMIC_MZGC_DLL
=\"libmzgc
$(MZSCHEME_VER
).dll
\"
651 !if
"$(MZSCHEME_DEBUG)" == "yes"
652 CFLAGS
= $(CFLAGS
) -DMZSCHEME_FORCE_GC
654 !if
"$(MZSCHEME_PRECISE_GC)" == "yes"
655 # Precise GC does not use separate dll
656 MZSCHEME_LIB
= $(MZSCHEME
)\lib\msvc\libmzsch
$(MZSCHEME_VER
).lib
658 MZSCHEME_LIB
= $(MZSCHEME
)\lib\msvc\libmzgc
$(MZSCHEME_VER
).lib \
659 $(MZSCHEME
)\lib\msvc\libmzsch
$(MZSCHEME_VER
).lib
662 MZSCHEME_OBJ
= $(OUTDIR
)\if_mzsch.obj
670 !message Perl requested
(version
$(PERL_VER
)) - root
dir is
"$(PERL)"
671 !if
"$(DYNAMIC_PERL)" == "yes"
672 !if
$(PERL_VER
) >= 56
673 !message Perl DLL will be loaded dynamically
675 !message Dynamic loading is not supported for Perl versions earlier than
5.6.0
676 !message Reverting to static loading...
681 # Is Perl installed in architecture-specific directories?
682 !if exist
($(PERL
)\Bin\MSWin32-x86
)
683 PERL_ARCH
= \MSWin32-x86
686 PERL_INCDIR
= $(PERL
)\Lib
$(PERL_ARCH
)\Core
688 # Version-dependent stuff
689 !if
$(PERL_VER
) == 55
690 PERL_LIB
= $(PERL_INCDIR
)\perl.lib
692 PERL_DLL
= perl
$(PERL_VER
).dll
693 PERL_LIB
= $(PERL_INCDIR
)\perl
$(PERL_VER
).lib
696 CFLAGS
= $(CFLAGS
) -DFEAT_PERL
698 # Do we want to load Perl dynamically?
699 !if
"$(DYNAMIC_PERL)" == "yes"
700 CFLAGS
= $(CFLAGS
) -DDYNAMIC_PERL
-DDYNAMIC_PERL_DLL
=\"$(PERL_DLL
)\"
704 PERL_EXE
= $(PERL
)\Bin
$(PERL_ARCH
)\perl
705 PERL_INC
= /I
$(PERL_INCDIR
)
706 PERL_OBJ
= $(OUTDIR
)\if_perl.obj
$(OUTDIR
)\if_perlsfio.obj
707 XSUBPP
= $(PERL
)\lib\ExtUtils\xsubpp
708 XSUBPP_TYPEMAP
= $(PERL
)\lib\ExtUtils
\typemap
713 # Support Ruby interface
720 !ifndef RUBY_VER_LONG
724 !if
$(RUBY_VER
) >= 18
725 !ifndef RUBY_PLATFORM
726 RUBY_PLATFORM
= i386-mswin32
728 !ifndef RUBY_INSTALL_NAME
729 RUBY_INSTALL_NAME
= msvcrt-ruby
$(RUBY_VER
)
732 !ifndef RUBY_PLATFORM
733 RUBY_PLATFORM
= i586-mswin32
735 !ifndef RUBY_INSTALL_NAME
736 RUBY_INSTALL_NAME
= mswin32-ruby
$(RUBY_VER
)
738 !endif # $(RUBY_VER) >= 18
740 !message Ruby requested
(version
$(RUBY_VER
)) - root
dir is
"$(RUBY)"
741 CFLAGS
= $(CFLAGS
) -DFEAT_RUBY
742 RUBY_OBJ
= $(OUTDIR
)\if_ruby.obj
743 RUBY_INC
= /I
"$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
744 RUBY_LIB
= $(RUBY
)\lib\
$(RUBY_INSTALL_NAME
).lib
745 # Do we want to load Ruby dynamically?
746 !if
"$(DYNAMIC_RUBY)" == "yes"
747 !message Ruby DLL will be loaded dynamically
748 CFLAGS
= $(CFLAGS
) -DDYNAMIC_RUBY
-DDYNAMIC_RUBY_VER
=$(RUBY_VER
) \
749 -DDYNAMIC_RUBY_DLL
=\"$(RUBY_INSTALL_NAME
).dll
\"
755 # Support PostScript printing
757 !if
"$(POSTSCRIPT)" == "yes"
758 CFLAGS
= $(CFLAGS
) -DMSWINPS
762 # FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
764 !if
"$(FEATURES)"==""
767 CFLAGS
= $(CFLAGS
) -DFEAT_
$(FEATURES
)
770 # Always generate the .pdb file, so that we get debug symbols that can be used
771 # on a crash (doesn't add overhead to the executable).
772 # Generate edit-and-continue debug info when no optimization - allows to
773 # debug more conveniently (able to look at variables which are in registers)
775 CFLAGS
= $(CFLAGS
) /Fd
$(OUTDIR
)/ $(DEBUGINFO
)
776 LINK_PDB
= /PDB
:$(VIM
).pdb
-debug
779 # End extra feature include
783 conflags
= /nologo
/subsystem
:$(SUBSYSTEM
)
785 PATHDEF_SRC
= $(OUTDIR
)\pathdef.c
787 !IF
"$(MAP)" == "yes"
788 # "/map" is for debugging
789 conflags
= $(conflags
) /map
790 !ELSEIF
"$(MAP)" == "lines"
791 # "/mapinfo:lines" is for debugging, only works for VC6 and later
792 conflags
= $(conflags
) /map
/mapinfo
:lines
795 LINKARGS1
= $(linkdebug
) $(conflags
)
796 LINKARGS2
= $(CON_LIB
) $(GUI_LIB
) $(LIBC
) $(OLE_LIB
) user32.lib
$(SNIFF_LIB
) \
797 $(MZSCHEME_LIB
) $(PERL_LIB
) $(PYTHON_LIB
) $(RUBY_LIB
) \
798 $(TCL_LIB
) $(NETBEANS_LIB
) $(XPM_LIB
) $(LINK_PDB
)
800 # Report link time code generation progress if used.
802 !if
("$(MSVCVER)" == "8.0") ||
("$(MSVCVER)" == "9.0") ||
("$(MSVCVER)" == "10.0")
803 !if
"$(OPTIMIZE)" != "SPACE"
804 LINKARGS1
= $(LINKARGS1
) /LTCG
:STATUS
809 all: $(VIM
).exe vimrun.exe
install.exe uninstal.exe xxd
/xxd.exe \
812 $(VIM
).exe
: $(OUTDIR
) $(OBJ
) $(GUI_OBJ
) $(OLE_OBJ
) $(OLE_IDL
) $(MZSCHEME_OBJ
) \
813 $(PERL_OBJ
) $(PYTHON_OBJ
) $(RUBY_OBJ
) $(TCL_OBJ
) $(SNIFF_OBJ
) \
814 $(CSCOPE_OBJ
) $(NETBEANS_OBJ
) $(XPM_OBJ
) version.c version.h
815 $(CC
) $(CFLAGS
) version.c
816 $(link
) $(LINKARGS1
) -out
:$(VIM
).exe
$(OBJ
) $(GUI_OBJ
) $(OLE_OBJ
) \
817 $(MZSCHEME_OBJ
) $(PERL_OBJ
) $(PYTHON_OBJ
) $(RUBY_OBJ
) \
818 $(TCL_OBJ
) $(SNIFF_OBJ
) $(CSCOPE_OBJ
) $(NETBEANS_OBJ
) \
819 $(XPM_OBJ
) $(OUTDIR
)\version.obj
$(LINKARGS2
)
824 if not exist
$(OUTDIR
)/nul mkdir
$(OUTDIR
)
826 install.exe
: dosinst.c
827 $(CC
) /nologo
-DNDEBUG
-DWIN32 dosinst.c kernel32.lib shell32.lib \
828 ole32.lib advapi32.lib uuid.lib
829 - if exist
install.exe del
install.exe
830 ren dosinst.exe
install.exe
832 uninstal.exe
: uninstal.c
833 $(CC
) /nologo
-DNDEBUG
-DWIN32 uninstal.c shell32.lib advapi32.lib
836 $(CC
) /nologo
-DNDEBUG vimrun.c
838 xxd
/xxd.exe
: xxd
/xxd.c
840 $(MAKE
) /NOLOGO
-f Make_mvc.mak
843 GvimExt
/gvimext.dll
: GvimExt
/gvimext.
cpp GvimExt
/gvimext.rc GvimExt
/gvimext.h
845 $(MAKE
) /NOLOGO
-f Makefile
$(MAKEFLAGS_GVIMEXT
)
850 $(CTAGS
) *.c
*.
cpp *.h if_perl.xs proto\
*.pro
853 - if exist
tags del
tags
856 - if exist
$(OUTDIR
)/nul
$(DEL_TREE
) $(OUTDIR
)
857 - if exist
*.obj del
*.obj
858 - if exist
$(VIM
).exe del
$(VIM
).exe
859 - if exist
$(VIM
).ilk del
$(VIM
).ilk
860 - if exist
$(VIM
).pdb del
$(VIM
).pdb
861 - if exist
$(VIM
).map del
$(VIM
).map
862 - if exist
$(VIM
).ncb del
$(VIM
).ncb
863 - if exist vimrun.exe del vimrun.exe
864 - if exist
install.exe del
install.exe
865 - if exist uninstal.exe del uninstal.exe
866 - if exist if_perl.c del if_perl.c
867 - if exist dimm.h del dimm.h
868 - if exist dimm_i.c del dimm_i.c
869 - if exist dimm.tlb del dimm.tlb
870 - if exist dosinst.exe del dosinst.exe
871 - if exist mzscheme_base.c del mzscheme_base.c
873 $(MAKE
) /NOLOGO
-f Make_mvc.mak
clean
876 $(MAKE
) /NOLOGO
-f Makefile
clean
879 $(MAKE
) /NOLOGO
-f Makefile
clean
881 - if exist testdir\
*.out del testdir\
*.out
885 $(MAKE
) /NOLOGO
-f Make_dos.mak win32
890 $(MAKE
) /NOLOGO
-f Make_dos.mak
clean
893 ###########################################################################
895 # Create a default rule for transforming .c files to .obj files in $(OUTDIR)
896 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
897 !IF
"$(MSVCVER)" == "4.0"
904 # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
905 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
906 !IF
"$(MSVCVER)" == "4.0"
907 .
cpp{$(OUTDIR
)/}.obj
:
909 .
cpp{$(OUTDIR
)/}.obj
::
913 $(OUTDIR
)/buffer.obj
: $(OUTDIR
) buffer.c
$(INCL
)
915 $(OUTDIR
)/charset.obj
: $(OUTDIR
) charset.c
$(INCL
)
917 $(OUTDIR
)/diff.obj
: $(OUTDIR
) diff.c
$(INCL
)
919 $(OUTDIR
)/digraph.obj
: $(OUTDIR
) digraph.c
$(INCL
)
921 $(OUTDIR
)/edit.obj
: $(OUTDIR
) edit.c
$(INCL
)
923 $(OUTDIR
)/eval.obj
: $(OUTDIR
) eval.c
$(INCL
)
925 $(OUTDIR
)/ex_cmds.obj
: $(OUTDIR
) ex_cmds.c
$(INCL
)
927 $(OUTDIR
)/ex_cmds2.obj
: $(OUTDIR
) ex_cmds2.c
$(INCL
)
929 $(OUTDIR
)/ex_docmd.obj
: $(OUTDIR
) ex_docmd.c
$(INCL
) ex_cmds.h
931 $(OUTDIR
)/ex_eval.obj
: $(OUTDIR
) ex_eval.c
$(INCL
) ex_cmds.h
933 $(OUTDIR
)/ex_getln.obj
: $(OUTDIR
) ex_getln.c
$(INCL
)
935 $(OUTDIR
)/fileio.obj
: $(OUTDIR
) fileio.c
$(INCL
)
937 $(OUTDIR
)/fold.obj
: $(OUTDIR
) fold.c
$(INCL
)
939 $(OUTDIR
)/getchar.obj
: $(OUTDIR
) getchar.c
$(INCL
)
941 $(OUTDIR
)/hardcopy.obj
: $(OUTDIR
) hardcopy.c
$(INCL
)
943 $(OUTDIR
)/hashtab.obj
: $(OUTDIR
) hashtab.c
$(INCL
)
945 $(OUTDIR
)/gui.obj
: $(OUTDIR
) gui.c
$(INCL
) $(GUI_INCL
)
947 $(OUTDIR
)/gui_beval.obj
: $(OUTDIR
) gui_beval.c
$(INCL
) $(GUI_INCL
)
949 $(OUTDIR
)/gui_w32.obj
: $(OUTDIR
) gui_w32.c gui_w48.c
$(INCL
) $(GUI_INCL
)
951 $(OUTDIR
)/if_cscope.obj
: $(OUTDIR
) if_cscope.c
$(INCL
)
953 if_perl.c
: if_perl.xs typemap
954 $(PERL_EXE
) $(XSUBPP
) -prototypes
-typemap
$(XSUBPP_TYPEMAP
) \
955 -typemap typemap if_perl.xs
> if_perl.c
957 $(OUTDIR
)/if_perl.obj
: $(OUTDIR
) if_perl.c
$(INCL
)
958 $(CC
) $(CFLAGS
) $(PERL_INC
) if_perl.c
960 $(OUTDIR
)/if_perlsfio.obj
: $(OUTDIR
) if_perlsfio.c
$(INCL
)
961 $(CC
) $(CFLAGS
) $(PERL_INC
) if_perlsfio.c
963 $(OUTDIR
)/if_mzsch.obj
: $(OUTDIR
) if_mzsch.c
$(INCL
) $(MZSCHEME_EXTRA_DEP
)
964 $(CC
) $(CFLAGS
) if_mzsch.c \
965 -DMZSCHEME_COLLECTS
=\"$(MZSCHEME
:\
=\\)\\collects
\"
967 $(MZSCHEME
)\mzc
--c-mods mzscheme_base.c
++lib scheme
/base
969 $(OUTDIR
)/if_python.obj
: $(OUTDIR
) if_python.c
$(INCL
)
970 $(CC
) $(CFLAGS
) $(PYTHON_INC
) if_python.c
972 $(OUTDIR
)/if_ole.obj
: $(OUTDIR
) if_ole.
cpp $(INCL
) if_ole.h
974 $(OUTDIR
)/if_ruby.obj
: $(OUTDIR
) if_ruby.c
$(INCL
)
975 $(CC
) $(CFLAGS
) $(RUBY_INC
) if_ruby.c
977 $(OUTDIR
)/if_sniff.obj
: $(OUTDIR
) if_sniff.c
$(INCL
)
978 $(CC
) $(CFLAGS
) if_sniff.c
980 $(OUTDIR
)/if_tcl.obj
: $(OUTDIR
) if_tcl.c
$(INCL
)
981 $(CC
) $(CFLAGS
) $(TCL_INC
) if_tcl.c
983 $(OUTDIR
)/main.obj
: $(OUTDIR
) main.c
$(INCL
)
985 $(OUTDIR
)/mark.obj
: $(OUTDIR
) mark.c
$(INCL
)
987 $(OUTDIR
)/memfile.obj
: $(OUTDIR
) memfile.c
$(INCL
)
989 $(OUTDIR
)/memline.obj
: $(OUTDIR
) memline.c
$(INCL
)
991 $(OUTDIR
)/menu.obj
: $(OUTDIR
) menu.c
$(INCL
)
993 $(OUTDIR
)/message.obj
: $(OUTDIR
) message.c
$(INCL
)
995 $(OUTDIR
)/misc1.obj
: $(OUTDIR
) misc1.c
$(INCL
)
997 $(OUTDIR
)/misc2.obj
: $(OUTDIR
) misc2.c
$(INCL
)
999 $(OUTDIR
)/move.obj
: $(OUTDIR
) move.c
$(INCL
)
1001 $(OUTDIR
)/mbyte.obj
: $(OUTDIR
) mbyte.c
$(INCL
)
1003 $(OUTDIR
)/netbeans.obj
: $(OUTDIR
) netbeans.c
$(NBDEBUG_SRC
) $(INCL
)
1005 $(OUTDIR
)/normal.obj
: $(OUTDIR
) normal.c
$(INCL
)
1007 $(OUTDIR
)/option.obj
: $(OUTDIR
) option.c
$(INCL
)
1009 $(OUTDIR
)/ops.obj
: $(OUTDIR
) ops.c
$(INCL
)
1011 $(OUTDIR
)/os_mswin.obj
: $(OUTDIR
) os_mswin.c
$(INCL
)
1013 $(OUTDIR
)/os_win32.obj
: $(OUTDIR
) os_win32.c
$(INCL
) os_win32.h
1015 $(OUTDIR
)/os_w32exe.obj
: $(OUTDIR
) os_w32exe.c
$(INCL
)
1017 $(OUTDIR
)/pathdef.obj
: $(OUTDIR
) $(PATHDEF_SRC
) $(INCL
)
1018 $(CC
) $(CFLAGS
) $(PATHDEF_SRC
)
1020 $(OUTDIR
)/popupmnu.obj
: $(OUTDIR
) popupmnu.c
$(INCL
)
1022 $(OUTDIR
)/quickfix.obj
: $(OUTDIR
) quickfix.c
$(INCL
)
1024 $(OUTDIR
)/regexp.obj
: $(OUTDIR
) regexp.c
$(INCL
)
1026 $(OUTDIR
)/screen.obj
: $(OUTDIR
) screen.c
$(INCL
)
1028 $(OUTDIR
)/search.obj
: $(OUTDIR
) search.c
$(INCL
)
1030 $(OUTDIR
)/spell.obj
: $(OUTDIR
) spell.c
$(INCL
)
1032 $(OUTDIR
)/syntax.obj
: $(OUTDIR
) syntax.c
$(INCL
)
1034 $(OUTDIR
)/tag.obj
: $(OUTDIR
) tag.c
$(INCL
)
1036 $(OUTDIR
)/term.obj
: $(OUTDIR
) term.c
$(INCL
)
1038 $(OUTDIR
)/ui.obj
: $(OUTDIR
) ui.c
$(INCL
)
1040 $(OUTDIR
)/undo.obj
: $(OUTDIR
) undo.c
$(INCL
)
1042 $(OUTDIR
)/window.obj
: $(OUTDIR
) window.c
$(INCL
)
1044 $(OUTDIR
)/xpm_w32.obj
: $(OUTDIR
) xpm_w32.c
1045 $(CC
) $(CFLAGS
) $(XPM_INC
) xpm_w32.c
1047 $(OUTDIR
)/vim.res
: $(OUTDIR
) vim.rc gvim.exe.mnf version.h tools.bmp tearoff.bmp \
1048 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
1049 $(RC
) /l
0x409 /Fo
$(OUTDIR
)/vim.res
$(RCFLAGS
) vim.rc
1051 iid_ole.c if_ole.h vim.tlb
: if_ole.idl
1052 midl
/nologo
/error none
/proxy nul
/iid iid_ole.c
/tlb vim.tlb \
1053 /header if_ole.h if_ole.idl
1055 dimm.h dimm_i.c
: dimm.idl
1056 midl
/nologo
/error none
/proxy nul dimm.idl
1058 $(OUTDIR
)/dimm_i.obj
: $(OUTDIR
) dimm_i.c
$(INCL
)
1060 $(OUTDIR
)/glbl_ime.obj
: $(OUTDIR
) glbl_ime.
cpp dimm.h
$(INCL
)
1062 # $CFLAGS may contain backslashes and double quotes, escape them both.
1063 E0_CFLAGS
= $(CFLAGS
:\
=\\)
1064 E_CFLAGS
= $(E0_CFLAGS
:"=\")
1065 # ") stop the string
1067 $(PATHDEF_SRC
): auto
1068 @echo creating
$(PATHDEF_SRC
)
1069 @echo
/* pathdef.c
*/ > $(PATHDEF_SRC
)
1070 @echo
#include "vim.h" >> $(PATHDEF_SRC)
1071 @echo char_u
*default_vim_dir
= (char_u
*)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC
)
1072 @echo char_u
*default_vimruntime_dir
= (char_u
*)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC
)
1073 @echo char_u
*all_cflags = (char_u
*)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC
)
1074 @echo char_u
*all_lflags
= (char_u
*)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC
)
1075 @echo char_u
*compiled_user
= (char_u
*)"$(USERNAME)"; >> $(PATHDEF_SRC
)
1076 @echo char_u
*compiled_sys
= (char_u
*)"$(USERDOMAIN)"; >> $(PATHDEF_SRC
)
1079 if not exist auto
/nul mkdir auto
1090 proto
/ex_cmds2.pro \
1091 proto
/ex_docmd.pro \
1093 proto
/ex_getln.pro \
1096 proto
/hardcopy.pro \
1111 proto
/os_mswin.pro \
1112 proto
/os_win32.pro \
1113 proto
/popupmnu.pro \
1114 proto
/quickfix.pro \
1129 # Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake
1132 $(CC
) $(CFLAGS
) /FAcs
$<
1134 # Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i"
1136 $(CC
) $(CFLAGS
) /P
/C
$<
1139 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: