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),
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, ...]
39 # PERL=[Path to Perl directory]
40 # DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
41 # PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc]
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)
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.
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.
63 # SNiFF+ interface: SNIFF=yes
65 # Cscope support: CSCOPE=yes
67 # Iconv library support (always dynamically loaded):
68 # ICONV=[yes or no] (default is yes)
70 # Intl library support (always dynamically loaded):
71 # GETTEXT=[yes or no] (default is yes)
72 # See http://sourceforge.net/projects/gettext/
74 # PostScript printing: POSTSCRIPT=yes (default is no)
76 # Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
78 # XPM Image Support: XPM=[path to XPM directory]
80 # Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
82 # Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is
85 # Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400)
87 # 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)
93 # Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
96 # Visual C Version: MSVCVER=m.n (default derived from nmake if undefined)
98 # You can combine any of these interfaces
100 # Example: To build the non-debug, GUI version with Perl interface:
101 # nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
103 # DEBUG with Make_mvc.mak and Make_dvc.mak:
104 # This makefile gives a fineness of control which is not supported in
105 # Visual C++ configuration files. Therefore, debugging requires a bit of
107 # Make_dvc.mak is a Visual C++ project to access that support. It may be
108 # badly out of date for the Visual C++ you are using...
109 # To use Make_dvc.mak:
110 # 1) Build Vim with Make_mvc.mak.
111 # Use a "DEBUG=yes" argument to build Vim with debug support.
112 # E.g. the following builds gvimd.exe:
113 # nmake -f Make_mvc.mak debug=yes gui=yes
114 # 2) Use MS Devstudio and set it up to allow that file to be debugged:
115 # i) Pass Make_dvc.mak to the IDE.
116 # Use the "open workspace" menu entry to load Make_dvc.mak.
117 # Alternatively, from the command line:
118 # msdev /nologo Make_dvc.mak
119 # Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
120 # this and offer to convert it to their own format. Accept that.
121 # It creates a file called Make_dvc.dsw which can then be used
122 # for further operations. E.g.
123 # msdev /nologo Make_dvc.dsw
124 # ii) Set the built executable for debugging:
125 # a) Alt+F7/Debug takes you to the Debug dialog.
126 # b) Fill "Executable for debug session". e.g. gvimd.exe
127 # c) Fill "Program arguments". e.g. -R dosinst.c
128 # d) Complete the dialog
129 # 3) You can now debug the executable you built with Make_mvc.mak
131 # Note: Make_dvc.mak builds vimrun.exe, because it must build something
132 # to be a valid makefile..
134 ### See feature.h for a list of optionals.
135 # If you want to build some optional features without modifying the source,
136 # you can set DEFINES on the command line, e.g.,
137 # nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
139 # Build on both Windows NT/XP and Windows 9x
143 # Select one of eight object code directories, depends on GUI, OLE, DEBUG and
145 # If you change something else, do "make clean" first!
146 !if
"$(GUI)" == "yes"
151 !if
"$(OLE)" == "yes"
169 !if
"$(DEBUG)" == "yes"
173 # Win32.mak requires that CPU be set appropriately.
174 # To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
176 !ifdef PROCESSOR_ARCHITECTURE
177 # We're on Windows NT or using VC 6+
179 ASSEMBLY_ARCHITECTURE
=$(CPU
)
180 # Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7.
181 ! if
("$(ASSEMBLY_ARCHITECTURE)" == "i386") ||
("$(ASSEMBLY_ARCHITECTURE)" == "I386")
182 ASSEMBLY_ARCHITECTURE
= x86
185 CPU
= $(PROCESSOR_ARCHITECTURE
)
186 ASSEMBLY_ARCHITECTURE
= $(PROCESSOR_ARCHITECTURE
)
187 ! if
("$(CPU)" == "x86") ||
("$(CPU)" == "X86")
191 !else # !PROCESSOR_ARCHITECTURE
192 # We're on Windows 95
194 !endif # !PROCESSOR_ARCHITECTURE
196 # Build a retail version by default
198 !if
"$(DEBUG)" != "yes"
202 MAKEFLAGS_GVIMEXT
= DEBUG
=yes
206 # Get all sorts of useful, standard macros from the Platform SDK.
210 # Turn on Win64 compatibility warnings for 32-bit compiler in VC8. (/Wp64 is
211 # deprecated in VC9.)
212 !if
("$(MSVCVER)" == "8.0")
213 DEFINES
=$(DEFINES
) /Wp64
216 #>>>>> path of the compiler and linker; name of include and lib directories
217 # PATH = c:\msvc20\bin;$(PATH)
218 # INCLUDE = c:\msvc20\include
219 # LIB = c:\msvc20\lib
225 !if
"$(SNIFF)" == "yes"
226 # SNIFF - Include support for SNiFF+.
227 SNIFF_INCL
= if_sniff.h
228 SNIFF_OBJ
= $(OBJDIR
)/if_sniff.obj
229 SNIFF_LIB
= shell32.lib
230 SNIFF_DEFS
= -DFEAT_SNIFF
231 # The SNiFF integration needs multithreaded libraries!
239 !if
"$(CSCOPE)" == "yes"
240 # CSCOPE - Include support for Cscope
241 CSCOPE_INCL
= if_cscope.h
242 CSCOPE_OBJ
= $(OBJDIR
)/if_cscope.obj
243 CSCOPE_DEFS
= -DFEAT_CSCOPE
250 # Only allow NETBEANS and XPM for a GUI build.
251 !if
"$(GUI)" == "yes"
252 !if
"$(NETBEANS)" == "yes"
253 # NETBEANS - Include support for Netbeans integration
254 NETBEANS_PRO
= proto
/netbeans.pro
255 NETBEANS_OBJ
= $(OBJDIR
)/netbeans.obj
256 NETBEANS_DEFS
= -DFEAT_NETBEANS_INTG
258 !if
"$(NBDEBUG)" == "yes"
259 NBDEBUG_DEFS
= -DNBDEBUG
260 NBDEBUG_INCL
= nbdebug.h
261 NBDEBUG_SRC
= nbdebug.c
263 NETBEANS_LIB
= WSock32.lib
267 # XPM - Include support for XPM signs
268 # you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
269 XPM_OBJ
= $(OBJDIR
)/xpm_w32.obj
270 XPM_DEFS
= -DFEAT_XPM_W32
271 XPM_LIB
= $(XPM
)\lib\libXpm.lib
272 XPM_INC
= -I
$(XPM
)\
include
276 # Set which version of the CRT to use
277 !if defined
(USE_MSVCRT
)
278 # CVARS = $(cvarsdll)
279 # !elseif defined(MULTITHREADED)
286 # need advapi32.lib for GetUserName()
287 # need shell32.lib for ExtractIcon()
288 # gdi32.lib and comdlg32.lib for printing support
289 # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
290 CON_LIB
= oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \
291 comdlg32.lib ole32.lib uuid.lib
/machine
:$(CPU
) /nodefaultlib
292 !if
"$(DELAYLOAD)" == "yes"
293 CON_LIB
= $(CON_LIB
) /DELAYLOAD
:comdlg32.dll
/DELAYLOAD
:ole32.dll DelayImp.lib
296 ### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
297 # When set to 0x0500 ":browse" stops working.
302 # If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
303 # default, use these lines.
304 #VIMRCLOC = somewhere
305 #VIMRUNTIMEDIR = somewhere
307 CFLAGS
= -c
/W3
/nologo
$(CVARS
) -I.
-Iproto
-DHAVE_PATHDEF
-DWIN32 \
308 $(SNIFF_DEFS
) $(CSCOPE_DEFS
) $(NETBEANS_DEFS
) \
309 $(NBDEBUG_DEFS
) $(XPM_DEFS
) \
310 $(DEFINES
) -DWINVER
=$(WINVER
) -D_WIN32_WINNT
=$(WINVER
) \
313 #>>>>> end of choices
314 ###########################################################################
318 DEL_TREE
= rmdir
/s
/q
321 DEL_TREE
= deltree
/y
327 # Derive version of VC being used from nmake if not specified
328 !if
"$(MSVCVER)" == ""
329 !if
"$(_NMAKE_VER)" == ""
332 !if
"$(_NMAKE_VER)" == "162"
335 !if
"$(_NMAKE_VER)" == "6.00.8168.0"
339 !if
"$(_NMAKE_VER)" == "7.00.9466"
342 !if
"$(_NMAKE_VER)" == "7.10.3077"
345 !if
"$(_NMAKE_VER)" == "8.00.50727.42"
348 !if
"$(_NMAKE_VER)" == "8.00.50727.762"
351 !if
"$(_NMAKE_VER)" == "9.00.20706.01"
354 !if
"$(_NMAKE_VER)" == "9.00.21022.08"
359 # Abort bulding VIM if version of VC is unrecognised.
362 !message Cannot determine Visual C version being used. If you are using the
363 !message Windows SDK then you must have the environment variable MSVCVER set to
364 !message your version of the VC compiler. If you are not using the Express
365 !message version of Visual C
, you can either set MSVCVER or update this makefile
366 !message to handle the new value for _NMAKE_VER
, "$(_NMAKE_VER)".
370 # Convert processor ID to MVC-compatible number
371 !if
("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0")
372 !if
"$(CPUNR)" == "i386"
374 !elseif
"$(CPUNR)" == "i486"
376 !elseif
"$(CPUNR)" == "i586"
378 !elseif
"$(CPUNR)" == "i686"
380 !elseif
"$(CPUNR)" == "pentium4"
381 CPUARG
= /G7
/arch
:SSE2
386 # VC8/9 only allows specifying SSE architecture
387 !if
"$(CPUNR)" == "pentium4"
397 !if
"$(OPTIMIZE)" == "SPACE"
399 !elseif
"$(OPTIMIZE)" == "SPEED"
404 !if
("$(MSVCVER)" == "8.0") ||
("$(MSVCVER)" == "9.0")
405 # Use link time code generation if not worried about size
406 !if
"$(OPTIMIZE)" != "SPACE"
407 OPTFLAG
= $(OPTFLAG
) /GL
410 CFLAGS
= $(CFLAGS
) $(OPTFLAG
) -DNDEBUG
$(CPUARG
)
411 RCFLAGS
= $(rcflags
) $(rcvars
) -DNDEBUG
413 CFLAGS
= $(CFLAGS
) /MD
417 CFLAGS
= $(CFLAGS
) /Zl
/MT
421 ! if
("$(CPU)" == "i386") ||
("$(CPU)" == "ix86")
424 CFLAGS
= $(CFLAGS
) -D_DEBUG
-DDEBUG
/Od
425 RCFLAGS
= $(rcflags
) $(rcvars
) -D_DEBUG
-DDEBUG
426 # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
427 ! if
"$(MSVCVER)" == "4.0"
433 CFLAGS
= $(CFLAGS
) /MDd
434 LIBC
= $(LIBC
) msvcrtd.lib
436 LIBC
= $(LIBC
) libcmtd.lib
437 CFLAGS
= $(CFLAGS
) /Zl
/MTd
441 INCL
= vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
442 proto.h option.h structs.h term.h
$(SNIFF_INCL
) $(CSCOPE_INCL
) \
446 $(OUTDIR
)\buffer.obj \
447 $(OUTDIR
)\charset.obj \
449 $(OUTDIR
)\digraph.obj \
452 $(OUTDIR
)\ex_cmds.obj \
453 $(OUTDIR
)\ex_cmds2.obj \
454 $(OUTDIR
)\ex_docmd.obj \
455 $(OUTDIR
)\ex_eval.obj \
456 $(OUTDIR
)\ex_getln.obj \
457 $(OUTDIR
)\fileio.obj \
459 $(OUTDIR
)\getchar.obj \
460 $(OUTDIR
)\hardcopy.obj \
461 $(OUTDIR
)\hashtab.obj \
464 $(OUTDIR
)\mbyte.obj \
465 $(OUTDIR
)\memfile.obj \
466 $(OUTDIR
)\memline.obj \
468 $(OUTDIR
)\message.obj \
469 $(OUTDIR
)\misc1.obj \
470 $(OUTDIR
)\misc2.obj \
472 $(OUTDIR
)\normal.obj \
474 $(OUTDIR
)\option.obj \
475 $(OUTDIR
)\os_mswin.obj \
476 $(OUTDIR
)\os_win32.obj \
477 $(OUTDIR
)\pathdef.obj \
478 $(OUTDIR
)\popupmnu.obj \
479 $(OUTDIR
)\quickfix.obj \
480 $(OUTDIR
)\regexp.obj \
481 $(OUTDIR
)\screen.obj \
482 $(OUTDIR
)\search.obj \
483 $(OUTDIR
)\spell.obj \
484 $(OUTDIR
)\syntax.obj \
489 $(OUTDIR
)\window.obj \
492 !if
"$(OLE)" == "yes"
493 CFLAGS
= $(CFLAGS
) -DFEAT_OLE
494 RCFLAGS
= $(RCFLAGS
) -DFEAT_OLE
495 OLE_OBJ
= $(OUTDIR
)\if_ole.obj
497 OLE_LIB
= oleaut32.lib
500 !if
"$(IME)" == "yes"
501 CFLAGS
= $(CFLAGS
) -DFEAT_MBYTE_IME
505 !if
"$(DYNAMIC_IME)" == "yes"
506 CFLAGS
= $(CFLAGS
) -DDYNAMIC_IME
512 !if
"$(GIME)" == "yes"
513 CFLAGS
= $(CFLAGS
) -DGLOBAL_IME
514 OBJ
= $(OBJ
) $(OUTDIR
)\dimm_i.obj
$(OUTDIR
)\glbl_ime.obj
518 !if
"$(MBYTE)" == "yes"
519 CFLAGS
= $(CFLAGS
) -DFEAT_MBYTE
522 !if
"$(GUI)" == "yes"
524 CFLAGS
= $(CFLAGS
) -DFEAT_GUI_W32
525 RCFLAGS
= $(RCFLAGS
) -DFEAT_GUI_W32
543 $(OUTDIR
)\gui_beval.obj \
544 $(OUTDIR
)\gui_w32.obj \
545 $(OUTDIR
)\os_w32exe.obj
547 gdi32.lib version.lib
$(IME_LIB
) \
548 winspool.lib comctl32.lib advapi32.lib shell32.lib \
549 /machine
:$(CPU
) /nodefaultlib
554 # iconv.dll library (dynamically loaded)
558 !if
"$(ICONV)" == "yes"
559 CFLAGS
= $(CFLAGS
) -DDYNAMIC_ICONV
562 # libintl.dll library
566 !if
"$(GETTEXT)" == "yes"
567 CFLAGS
= $(CFLAGS
) -DDYNAMIC_GETTEXT
576 !message Tcl requested
(version
$(TCL_VER
)) - root
dir is
"$(TCL)"
577 !if
"$(DYNAMIC_TCL)" == "yes"
578 !message Tcl DLL will be loaded dynamically
579 TCL_DLL
= tcl
$(TCL_VER
).dll
580 CFLAGS
= $(CFLAGS
) -DFEAT_TCL
-DDYNAMIC_TCL
-DDYNAMIC_TCL_DLL
=\"$(TCL_DLL
)\" \
581 -DDYNAMIC_TCL_VER
=\"$(TCL_VER_LONG
)\"
582 TCL_OBJ
= $(OUTDIR
)\if_tcl.obj
583 TCL_INC
= /I
"$(TCL)\Include" /I
"$(TCL)"
584 TCL_LIB
= $(TCL
)\lib
\tclstub
$(TCL_VER
).lib
586 CFLAGS
= $(CFLAGS
) -DFEAT_TCL
587 TCL_OBJ
= $(OUTDIR
)\if_tcl.obj
588 TCL_INC
= /I
"$(TCL)\Include" /I
"$(TCL)"
589 TCL_LIB
= $(TCL
)\lib
\tcl
$(TCL_VER
)vc.lib
598 !message Python requested
(version
$(PYTHON_VER
)) - root
dir is
"$(PYTHON)"
599 !if
"$(DYNAMIC_PYTHON)" == "yes"
600 !message Python DLL will be loaded dynamically
602 CFLAGS
= $(CFLAGS
) -DFEAT_PYTHON
603 PYTHON_OBJ
= $(OUTDIR
)\if_python.obj
604 PYTHON_INC
= /I
"$(PYTHON)\Include" /I
"$(PYTHON)\PC"
605 !if
"$(DYNAMIC_PYTHON)" == "yes"
606 CFLAGS
= $(CFLAGS
) -DDYNAMIC_PYTHON \
607 -DDYNAMIC_PYTHON_DLL
=\"python
$(PYTHON_VER
).dll
\"
608 PYTHON_LIB
= /nodefaultlib
:python
$(PYTHON_VER
).lib
610 PYTHON_LIB
= $(PYTHON
)\libs\python
$(PYTHON_VER
).lib
616 !message MzScheme requested
- root
dir is
"$(MZSCHEME)"
618 MZSCHEME_VER
= 205_000
620 CFLAGS
= $(CFLAGS
) -DFEAT_MZSCHEME
-I
$(MZSCHEME
)\
include
621 !if
"$(DYNAMIC_MZSCHEME)" == "yes"
622 !message MzScheme DLLs will be loaded dynamically
623 CFLAGS
= $(CFLAGS
) -DDYNAMIC_MZSCHEME \
624 -DDYNAMIC_MZSCH_DLL
=\"libmzsch
$(MZSCHEME_VER
).dll
\" \
625 -DDYNAMIC_MZGC_DLL
=\"libmzgc
$(MZSCHEME_VER
).dll
\"
627 MZSCHEME_LIB
= $(MZSCHEME
)\lib\msvc\libmzgc
$(MZSCHEME_VER
).lib \
628 $(MZSCHEME
)\lib\msvc\libmzsch
$(MZSCHEME_VER
).lib
630 MZSCHEME_OBJ
= $(OUTDIR
)\if_mzsch.obj
638 !message Perl requested
(version
$(PERL_VER
)) - root
dir is
"$(PERL)"
639 !if
"$(DYNAMIC_PERL)" == "yes"
640 !if
$(PERL_VER
) >= 56
641 !message Perl DLL will be loaded dynamically
643 !message Dynamic loading is not supported for Perl versions earlier than
5.6.0
644 !message Reverting to static loading...
649 # Is Perl installed in architecture-specific directories?
650 !if exist
($(PERL
)\Bin\MSWin32-x86
)
651 PERL_ARCH
= \MSWin32-x86
654 PERL_INCDIR
= $(PERL
)\Lib
$(PERL_ARCH
)\Core
656 # Version-dependent stuff
657 !if
$(PERL_VER
) == 55
658 PERL_LIB
= $(PERL_INCDIR
)\perl.lib
660 PERL_DLL
= perl
$(PERL_VER
).dll
661 PERL_LIB
= $(PERL_INCDIR
)\perl
$(PERL_VER
).lib
664 CFLAGS
= $(CFLAGS
) -DFEAT_PERL
666 # Do we want to load Perl dynamically?
667 !if
"$(DYNAMIC_PERL)" == "yes"
668 CFLAGS
= $(CFLAGS
) -DDYNAMIC_PERL
-DDYNAMIC_PERL_DLL
=\"$(PERL_DLL
)\"
672 PERL_EXE
= $(PERL
)\Bin
$(PERL_ARCH
)\perl
673 PERL_INC
= /I
$(PERL_INCDIR
)
674 PERL_OBJ
= $(OUTDIR
)\if_perl.obj
$(OUTDIR
)\if_perlsfio.obj
675 XSUBPP
= $(PERL
)\lib\ExtUtils\xsubpp
676 XSUBPP_TYPEMAP
= $(PERL
)\lib\ExtUtils
\typemap
681 # Support Ruby interface
688 !ifndef RUBY_VER_LONG
692 !if
$(RUBY_VER
) >= 18
693 !ifndef RUBY_PLATFORM
694 RUBY_PLATFORM
= i386-mswin32
696 !ifndef RUBY_INSTALL_NAME
697 RUBY_INSTALL_NAME
= msvcrt-ruby
$(RUBY_VER
)
700 !ifndef RUBY_PLATFORM
701 RUBY_PLATFORM
= i586-mswin32
703 !ifndef RUBY_INSTALL_NAME
704 RUBY_INSTALL_NAME
= mswin32-ruby
$(RUBY_VER
)
706 !endif # $(RUBY_VER) >= 18
708 !message Ruby requested
(version
$(RUBY_VER
)) - root
dir is
"$(RUBY)"
709 CFLAGS
= $(CFLAGS
) -DFEAT_RUBY
710 RUBY_OBJ
= $(OUTDIR
)\if_ruby.obj
711 RUBY_INC
= /I
"$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
712 RUBY_LIB
= $(RUBY
)\lib\
$(RUBY_INSTALL_NAME
).lib
713 # Do we want to load Ruby dynamically?
714 !if
"$(DYNAMIC_RUBY)" == "yes"
715 !message Ruby DLL will be loaded dynamically
716 CFLAGS
= $(CFLAGS
) -DDYNAMIC_RUBY
-DDYNAMIC_RUBY_VER
=$(RUBY_VER
) \
717 -DDYNAMIC_RUBY_DLL
=\"$(RUBY_INSTALL_NAME
).dll
\"
723 # Support PostScript printing
725 !if
"$(POSTSCRIPT)" == "yes"
726 CFLAGS
= $(CFLAGS
) -DMSWINPS
730 # FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
732 !if
"$(FEATURES)"==""
735 CFLAGS
= $(CFLAGS
) -DFEAT_
$(FEATURES
)
738 # Always generate the .pdb file, so that we get debug symbols that can be used
739 # on a crash (doesn't add overhead to the executable).
740 # Generate edit-and-continue debug info when no optimization - allows to
741 # debug more conveniently (able to look at variables which are in registers)
743 CFLAGS
= $(CFLAGS
) /Fd
$(OUTDIR
)/ $(DEBUGINFO
)
744 LINK_PDB
= /PDB
:$(VIM
).pdb
-debug
747 # End extra feature include
751 conflags
= /nologo
/subsystem
:$(SUBSYSTEM
)
753 PATHDEF_SRC
= $(OUTDIR
)\pathdef.c
755 !IF
"$(MAP)" == "yes"
756 # "/map" is for debugging
757 conflags
= $(conflags
) /map
758 !ELSEIF
"$(MAP)" == "lines"
759 # "/mapinfo:lines" is for debugging, only works for VC6 and later
760 conflags
= $(conflags
) /map
/mapinfo
:lines
763 LINKARGS1
= $(linkdebug
) $(conflags
)
764 LINKARGS2
= $(CON_LIB
) $(GUI_LIB
) $(LIBC
) $(OLE_LIB
) user32.lib
$(SNIFF_LIB
) \
765 $(MZSCHEME_LIB
) $(PERL_LIB
) $(PYTHON_LIB
) $(RUBY_LIB
) \
766 $(TCL_LIB
) $(NETBEANS_LIB
) $(XPM_LIB
) $(LINK_PDB
)
768 # Report link time code generation progress if used.
770 !if
("$(MSVCVER)" == "8.0") ||
("$(MSVCVER)" == "9.0")
771 !if
"$(OPTIMIZE)" != "SPACE"
772 LINKARGS1
= $(LINKARGS1
) /LTCG
:STATUS
777 all: $(VIM
).exe vimrun.exe
install.exe uninstal.exe xxd
/xxd.exe \
780 $(VIM
).exe
: $(OUTDIR
) $(OBJ
) $(GUI_OBJ
) $(OLE_OBJ
) $(OLE_IDL
) $(MZSCHEME_OBJ
) \
781 $(PERL_OBJ
) $(PYTHON_OBJ
) $(RUBY_OBJ
) $(TCL_OBJ
) $(SNIFF_OBJ
) \
782 $(CSCOPE_OBJ
) $(NETBEANS_OBJ
) $(XPM_OBJ
) version.c version.h
783 $(CC
) $(CFLAGS
) version.c
784 $(link
) $(LINKARGS1
) -out
:$(VIM
).exe
$(OBJ
) $(GUI_OBJ
) $(OLE_OBJ
) \
785 $(MZSCHEME_OBJ
) $(PERL_OBJ
) $(PYTHON_OBJ
) $(RUBY_OBJ
) \
786 $(TCL_OBJ
) $(SNIFF_OBJ
) $(CSCOPE_OBJ
) $(NETBEANS_OBJ
) \
787 $(XPM_OBJ
) $(OUTDIR
)\version.obj
$(LINKARGS2
)
792 if not exist
$(OUTDIR
)/nul mkdir
$(OUTDIR
)
794 install.exe
: dosinst.c
795 $(CC
) /nologo
-DNDEBUG
-DWIN32 dosinst.c kernel32.lib shell32.lib \
796 ole32.lib advapi32.lib uuid.lib
797 - if exist
install.exe del
install.exe
798 ren dosinst.exe
install.exe
800 uninstal.exe
: uninstal.c
801 $(CC
) /nologo
-DNDEBUG
-DWIN32 uninstal.c shell32.lib advapi32.lib
804 $(CC
) /nologo
-DNDEBUG vimrun.c
806 xxd
/xxd.exe
: xxd
/xxd.c
808 $(MAKE
) /NOLOGO
-f Make_mvc.mak
811 GvimExt
/gvimext.dll
: GvimExt
/gvimext.
cpp GvimExt
/gvimext.rc GvimExt
/gvimext.h
813 $(MAKE
) /NOLOGO
-f Makefile
$(MAKEFLAGS_GVIMEXT
)
818 $(CTAGS
) *.c
*.
cpp *.h if_perl.xs proto\
*.pro
821 - if exist
tags del
tags
824 - if exist
$(OUTDIR
)/nul
$(DEL_TREE
) $(OUTDIR
)
825 - if exist
*.obj del
*.obj
826 - if exist
$(VIM
).exe del
$(VIM
).exe
827 - if exist
$(VIM
).ilk del
$(VIM
).ilk
828 - if exist
$(VIM
).pdb del
$(VIM
).pdb
829 - if exist
$(VIM
).map del
$(VIM
).map
830 - if exist
$(VIM
).ncb del
$(VIM
).ncb
831 - if exist vimrun.exe del vimrun.exe
832 - if exist
install.exe del
install.exe
833 - if exist uninstal.exe del uninstal.exe
834 - if exist if_perl.c del if_perl.c
835 - if exist dimm.h del dimm.h
836 - if exist dimm_i.c del dimm_i.c
837 - if exist dimm.tlb del dimm.tlb
838 - if exist dosinst.exe del dosinst.exe
840 $(MAKE
) /NOLOGO
-f Make_mvc.mak
clean
843 $(MAKE
) /NOLOGO
-f Makefile
clean
846 $(MAKE
) /NOLOGO
-f Makefile
clean
848 - if exist testdir\
*.out del testdir\
*.out
852 $(MAKE
) /NOLOGO
-f Make_dos.mak win32
857 $(MAKE
) /NOLOGO
-f Make_dos.mak
clean
860 ###########################################################################
862 # Create a default rule for transforming .c files to .obj files in $(OUTDIR)
863 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
864 !IF
"$(MSVCVER)" == "4.0"
871 # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
872 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
873 !IF
"$(MSVCVER)" == "4.0"
874 .
cpp{$(OUTDIR
)/}.obj
:
876 .
cpp{$(OUTDIR
)/}.obj
::
880 $(OUTDIR
)/buffer.obj
: $(OUTDIR
) buffer.c
$(INCL
)
882 $(OUTDIR
)/charset.obj
: $(OUTDIR
) charset.c
$(INCL
)
884 $(OUTDIR
)/diff.obj
: $(OUTDIR
) diff.c
$(INCL
)
886 $(OUTDIR
)/digraph.obj
: $(OUTDIR
) digraph.c
$(INCL
)
888 $(OUTDIR
)/edit.obj
: $(OUTDIR
) edit.c
$(INCL
)
890 $(OUTDIR
)/eval.obj
: $(OUTDIR
) eval.c
$(INCL
)
892 $(OUTDIR
)/ex_cmds.obj
: $(OUTDIR
) ex_cmds.c
$(INCL
)
894 $(OUTDIR
)/ex_cmds2.obj
: $(OUTDIR
) ex_cmds2.c
$(INCL
)
896 $(OUTDIR
)/ex_docmd.obj
: $(OUTDIR
) ex_docmd.c
$(INCL
) ex_cmds.h
898 $(OUTDIR
)/ex_eval.obj
: $(OUTDIR
) ex_eval.c
$(INCL
) ex_cmds.h
900 $(OUTDIR
)/ex_getln.obj
: $(OUTDIR
) ex_getln.c
$(INCL
)
902 $(OUTDIR
)/fileio.obj
: $(OUTDIR
) fileio.c
$(INCL
)
904 $(OUTDIR
)/fold.obj
: $(OUTDIR
) fold.c
$(INCL
)
906 $(OUTDIR
)/getchar.obj
: $(OUTDIR
) getchar.c
$(INCL
)
908 $(OUTDIR
)/hardcopy.obj
: $(OUTDIR
) hardcopy.c
$(INCL
)
910 $(OUTDIR
)/hashtab.obj
: $(OUTDIR
) hashtab.c
$(INCL
)
912 $(OUTDIR
)/gui.obj
: $(OUTDIR
) gui.c
$(INCL
) $(GUI_INCL
)
914 $(OUTDIR
)/gui_beval.obj
: $(OUTDIR
) gui_beval.c
$(INCL
) $(GUI_INCL
)
916 $(OUTDIR
)/gui_w32.obj
: $(OUTDIR
) gui_w32.c gui_w48.c
$(INCL
) $(GUI_INCL
)
918 $(OUTDIR
)/if_cscope.obj
: $(OUTDIR
) if_cscope.c
$(INCL
)
920 if_perl.c
: if_perl.xs typemap
921 $(PERL_EXE
) $(XSUBPP
) -prototypes
-typemap
$(XSUBPP_TYPEMAP
) \
922 -typemap typemap if_perl.xs
> if_perl.c
924 $(OUTDIR
)/if_perl.obj
: $(OUTDIR
) if_perl.c
$(INCL
)
925 $(CC
) $(CFLAGS
) $(PERL_INC
) if_perl.c
927 $(OUTDIR
)/if_perlsfio.obj
: $(OUTDIR
) if_perlsfio.c
$(INCL
)
928 $(CC
) $(CFLAGS
) $(PERL_INC
) if_perlsfio.c
930 $(OUTDIR
)/if_mzsch.obj
: $(OUTDIR
) if_mzsch.c
$(INCL
)
931 $(CC
) $(CFLAGS
) if_mzsch.c \
932 -DMZSCHEME_COLLECTS
=\"$(MZSCHEME
:\
=\\)\\collects
\"
934 $(OUTDIR
)/if_python.obj
: $(OUTDIR
) if_python.c
$(INCL
)
935 $(CC
) $(CFLAGS
) $(PYTHON_INC
) if_python.c
937 $(OUTDIR
)/if_ole.obj
: $(OUTDIR
) if_ole.
cpp $(INCL
) if_ole.h
939 $(OUTDIR
)/if_ruby.obj
: $(OUTDIR
) if_ruby.c
$(INCL
)
940 $(CC
) $(CFLAGS
) $(RUBY_INC
) if_ruby.c
942 $(OUTDIR
)/if_sniff.obj
: $(OUTDIR
) if_sniff.c
$(INCL
)
943 $(CC
) $(CFLAGS
) if_sniff.c
945 $(OUTDIR
)/if_tcl.obj
: $(OUTDIR
) if_tcl.c
$(INCL
)
946 $(CC
) $(CFLAGS
) $(TCL_INC
) if_tcl.c
948 $(OUTDIR
)/main.obj
: $(OUTDIR
) main.c
$(INCL
)
950 $(OUTDIR
)/mark.obj
: $(OUTDIR
) mark.c
$(INCL
)
952 $(OUTDIR
)/memfile.obj
: $(OUTDIR
) memfile.c
$(INCL
)
954 $(OUTDIR
)/memline.obj
: $(OUTDIR
) memline.c
$(INCL
)
956 $(OUTDIR
)/menu.obj
: $(OUTDIR
) menu.c
$(INCL
)
958 $(OUTDIR
)/message.obj
: $(OUTDIR
) message.c
$(INCL
)
960 $(OUTDIR
)/misc1.obj
: $(OUTDIR
) misc1.c
$(INCL
)
962 $(OUTDIR
)/misc2.obj
: $(OUTDIR
) misc2.c
$(INCL
)
964 $(OUTDIR
)/move.obj
: $(OUTDIR
) move.c
$(INCL
)
966 $(OUTDIR
)/mbyte.obj
: $(OUTDIR
) mbyte.c
$(INCL
)
968 $(OUTDIR
)/netbeans.obj
: $(OUTDIR
) netbeans.c
$(NBDEBUG_SRC
) $(INCL
)
970 $(OUTDIR
)/normal.obj
: $(OUTDIR
) normal.c
$(INCL
)
972 $(OUTDIR
)/option.obj
: $(OUTDIR
) option.c
$(INCL
)
974 $(OUTDIR
)/ops.obj
: $(OUTDIR
) ops.c
$(INCL
)
976 $(OUTDIR
)/os_mswin.obj
: $(OUTDIR
) os_mswin.c
$(INCL
)
978 $(OUTDIR
)/os_win32.obj
: $(OUTDIR
) os_win32.c
$(INCL
) os_win32.h
980 $(OUTDIR
)/os_w32exe.obj
: $(OUTDIR
) os_w32exe.c
$(INCL
)
982 $(OUTDIR
)/pathdef.obj
: $(OUTDIR
) $(PATHDEF_SRC
) $(INCL
)
983 $(CC
) $(CFLAGS
) $(PATHDEF_SRC
)
985 $(OUTDIR
)/popupmnu.obj
: $(OUTDIR
) popupmnu.c
$(INCL
)
987 $(OUTDIR
)/quickfix.obj
: $(OUTDIR
) quickfix.c
$(INCL
)
989 $(OUTDIR
)/regexp.obj
: $(OUTDIR
) regexp.c
$(INCL
)
991 $(OUTDIR
)/screen.obj
: $(OUTDIR
) screen.c
$(INCL
)
993 $(OUTDIR
)/search.obj
: $(OUTDIR
) search.c
$(INCL
)
995 $(OUTDIR
)/spell.obj
: $(OUTDIR
) spell.c
$(INCL
)
997 $(OUTDIR
)/syntax.obj
: $(OUTDIR
) syntax.c
$(INCL
)
999 $(OUTDIR
)/tag.obj
: $(OUTDIR
) tag.c
$(INCL
)
1001 $(OUTDIR
)/term.obj
: $(OUTDIR
) term.c
$(INCL
)
1003 $(OUTDIR
)/ui.obj
: $(OUTDIR
) ui.c
$(INCL
)
1005 $(OUTDIR
)/undo.obj
: $(OUTDIR
) undo.c
$(INCL
)
1007 $(OUTDIR
)/window.obj
: $(OUTDIR
) window.c
$(INCL
)
1009 $(OUTDIR
)/xpm_w32.obj
: $(OUTDIR
) xpm_w32.c
1010 $(CC
) $(CFLAGS
) $(XPM_INC
) xpm_w32.c
1012 $(OUTDIR
)/vim.res
: $(OUTDIR
) vim.rc version.h tools.bmp tearoff.bmp \
1013 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
1014 $(RC
) /l
0x409 /Fo
$(OUTDIR
)/vim.res
$(RCFLAGS
) vim.rc
1016 iid_ole.c if_ole.h vim.tlb
: if_ole.idl
1017 midl
/nologo
/error none
/proxy nul
/iid iid_ole.c
/tlb vim.tlb \
1018 /header if_ole.h if_ole.idl
1020 dimm.h dimm_i.c
: dimm.idl
1021 midl
/nologo
/error none
/proxy nul dimm.idl
1023 $(OUTDIR
)/dimm_i.obj
: $(OUTDIR
) dimm_i.c
$(INCL
)
1025 $(OUTDIR
)/glbl_ime.obj
: $(OUTDIR
) glbl_ime.
cpp dimm.h
$(INCL
)
1027 # $CFLAGS may contain backslashes and double quotes, escape them both.
1028 E0_CFLAGS
= $(CFLAGS
:\
=\\)
1029 E_CFLAGS
= $(E0_CFLAGS
:"=\")
1030 # ") stop the string
1032 $(PATHDEF_SRC
): auto
1033 @echo creating
$(PATHDEF_SRC
)
1034 @echo
/* pathdef.c
*/ > $(PATHDEF_SRC
)
1035 @echo
#include "vim.h" >> $(PATHDEF_SRC)
1036 @echo char_u
*default_vim_dir
= (char_u
*)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC
)
1037 @echo char_u
*default_vimruntime_dir
= (char_u
*)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC
)
1038 @echo char_u
*all_cflags = (char_u
*)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC
)
1039 @echo char_u
*all_lflags
= (char_u
*)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC
)
1040 @echo char_u
*compiled_user
= (char_u
*)"$(USERNAME)"; >> $(PATHDEF_SRC
)
1041 @echo char_u
*compiled_sys
= (char_u
*)"$(USERDOMAIN)"; >> $(PATHDEF_SRC
)
1044 if not exist auto
/nul mkdir auto
1055 proto
/ex_cmds2.pro \
1056 proto
/ex_docmd.pro \
1058 proto
/ex_getln.pro \
1061 proto
/hardcopy.pro \
1076 proto
/os_mswin.pro \
1077 proto
/os_win32.pro \
1078 proto
/popupmnu.pro \
1079 proto
/quickfix.pro \
1094 # Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake
1097 $(CC
) $(CFLAGS
) /FAcs
$<
1099 # Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i"
1101 $(CC
) $(CFLAGS
) /P
/C
$<
1104 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: