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), and VC8 (VS2005).
5 # To build using other Windows compilers, see INSTALLpc.txt
7 # This makefile can build the console, GUI, OLE-enable, Perl-enabled and
8 # Python-enabled versions of vim for Win32 platforms.
10 # The basic command line to build vim is:
12 # nmake -f Make_mvc.mak
14 # This will build the console version of vim with no additional interfaces.
15 # To add features, define any of the following:
17 # !!!! After changing features do "nmake clean" first !!!!
19 # Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is BIG)
21 # GUI interface: GUI=yes (default is no)
23 # OLE interface: OLE=yes (usually with GUI=yes)
25 # Multibyte support: MBYTE=yes (default is no)
27 # IME support: IME=yes (requires GUI=yes)
28 # DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default
30 # Global IME support: GIME=yes (requires GUI=yes)
33 # MZSCHEME=[Path to MzScheme directory]
34 # DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically)
35 # MZSCHEME_VER=[version, 205_000, ...]
38 # PERL=[Path to Perl directory]
39 # DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
40 # PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc]
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)
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.
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.
62 # SNiFF+ interface: SNIFF=yes
64 # Cscope support: CSCOPE=yes
66 # Iconv library support (always dynamically loaded):
67 # ICONV=[yes or no] (default is yes)
69 # Intl library support (always dynamically loaded):
70 # GETTEXT=[yes or no] (default is yes)
71 # See http://sourceforge.net/projects/gettext/
73 # PostScript printing: POSTSCRIPT=yes (default is no)
75 # Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
77 # XPM Image Support: XPM=[path to XPM directory]
79 # Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
81 # Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is
84 # Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400)
86 # 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)
92 # Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
95 # Visual C Version: MSVCVER=m.n (default derived from nmake if undefined)
97 # You can combine any of these interfaces
99 # Example: To build the non-debug, GUI version with Perl interface:
100 # nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
102 # DEBUG with Make_mvc.mak and Make_dvc.mak:
103 # This makefile gives a fineness of control which is not supported in
104 # Visual C++ configuration files. Therefore, debugging requires a bit of
106 # Make_dvc.mak is a Visual C++ project to access that support. It may be
107 # badly out of date for the Visual C++ you are using...
108 # To use Make_dvc.mak:
109 # 1) Build Vim with Make_mvc.mak.
110 # Use a "DEBUG=yes" argument to build Vim with debug support.
111 # E.g. the following builds gvimd.exe:
112 # nmake -f Make_mvc.mak debug=yes gui=yes
113 # 2) Use MS Devstudio and set it up to allow that file to be debugged:
114 # i) Pass Make_dvc.mak to the IDE.
115 # Use the "open workspace" menu entry to load Make_dvc.mak.
116 # Alternatively, from the command line:
117 # msdev /nologo Make_dvc.mak
118 # Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
119 # this and offer to convert it to their own format. Accept that.
120 # It creates a file called Make_dvc.dsw which can then be used
121 # for further operations. E.g.
122 # msdev /nologo Make_dvc.dsw
123 # ii) Set the built executable for debugging:
124 # a) Alt+F7/Debug takes you to the Debug dialog.
125 # b) Fill "Executable for debug session". e.g. gvimd.exe
126 # c) Fill "Program arguments". e.g. -R dosinst.c
127 # d) Complete the dialog
128 # 3) You can now debug the executable you built with Make_mvc.mak
130 # Note: Make_dvc.mak builds vimrun.exe, because it must build something
131 # to be a valid makefile..
133 ### See feature.h for a list of optionals.
134 # If you want to build some optional features without modifying the source,
135 # you can set DEFINES on the command line, e.g.,
136 # nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
138 # Build on both Windows NT/XP and Windows 9x
142 # Select one of eight object code directories, depends on GUI, OLE, DEBUG and
144 # If you change something else, do "make clean" first!
145 !if
"$(GUI)" == "yes"
150 !if
"$(OLE)" == "yes"
168 !if
"$(DEBUG)" == "yes"
172 # Win32.mak requires that CPU be set appropriately.
173 # To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
175 !ifdef PROCESSOR_ARCHITECTURE
176 # We're on Windows NT or using VC 6+
178 ASSEMBLY_ARCHITECTURE
=$(CPU
)
179 # Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7.
180 ! if
("$(ASSEMBLY_ARCHITECTURE)" == "i386") ||
("$(ASSEMBLY_ARCHITECTURE)" == "I386")
181 ASSEMBLY_ARCHITECTURE
= x86
184 CPU
= $(PROCESSOR_ARCHITECTURE
)
185 ASSEMBLY_ARCHITECTURE
= $(PROCESSOR_ARCHITECTURE
)
186 ! if
("$(CPU)" == "x86") ||
("$(CPU)" == "X86")
190 !else # !PROCESSOR_ARCHITECTURE
191 # We're on Windows 95
193 !endif # !PROCESSOR_ARCHITECTURE
195 !if
("$(CPU)" == "AMD64") ||
("$(CPU)" == "IA64")
196 DEFINES
=$(DEFINES
) /Wp64
199 # Build a retail version by default
201 !if
"$(DEBUG)" != "yes"
205 MAKEFLAGS_GVIMEXT
= DEBUG
=yes
209 # Get all sorts of useful, standard macros from the Platform SDK.
214 #>>>>> path of the compiler and linker; name of include and lib directories
215 # PATH = c:\msvc20\bin;$(PATH)
216 # INCLUDE = c:\msvc20\include
217 # LIB = c:\msvc20\lib
223 !if
"$(SNIFF)" == "yes"
224 # SNIFF - Include support for SNiFF+.
225 SNIFF_INCL
= if_sniff.h
226 SNIFF_OBJ
= $(OBJDIR
)/if_sniff.obj
227 SNIFF_LIB
= shell32.lib
228 SNIFF_DEFS
= -DFEAT_SNIFF
229 # The SNiFF integration needs multithreaded libraries!
237 !if
"$(CSCOPE)" == "yes"
238 # CSCOPE - Include support for Cscope
239 CSCOPE_INCL
= if_cscope.h
240 CSCOPE_OBJ
= $(OBJDIR
)/if_cscope.obj
241 CSCOPE_DEFS
= -DFEAT_CSCOPE
248 # Only allow NETBEANS and XPM for a GUI build.
249 !if
"$(GUI)" == "yes"
250 !if
"$(NETBEANS)" == "yes"
251 # NETBEANS - Include support for Netbeans integration
252 NETBEANS_PRO
= proto
/netbeans.pro
253 NETBEANS_OBJ
= $(OBJDIR
)/netbeans.obj
254 NETBEANS_DEFS
= -DFEAT_NETBEANS_INTG
256 !if
"$(NBDEBUG)" == "yes"
257 NBDEBUG_DEFS
= -DNBDEBUG
258 NBDEBUG_INCL
= nbdebug.h
259 NBDEBUG_SRC
= nbdebug.c
261 NETBEANS_LIB
= WSock32.lib
265 # XPM - Include support for XPM signs
266 # you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
267 XPM_OBJ
= $(OBJDIR
)/xpm_w32.obj
268 XPM_DEFS
= -DFEAT_XPM_W32
269 XPM_LIB
= $(XPM
)\lib\libXpm.lib
270 XPM_INC
= -I
$(XPM
)\
include
274 # Set which version of the CRT to use
275 !if defined
(USE_MSVCRT
)
276 # CVARS = $(cvarsdll)
277 # !elseif defined(MULTITHREADED)
284 # need advapi32.lib for GetUserName()
285 # need shell32.lib for ExtractIcon()
286 # gdi32.lib and comdlg32.lib for printing support
287 # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
288 CON_LIB
= advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
289 !if
"$(DELAYLOAD)" == "yes"
290 CON_LIB
= $(CON_LIB
) /DELAYLOAD
:comdlg32.dll
/DELAYLOAD
:ole32.dll DelayImp.lib
293 ### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
294 # When set to 0x0500 ":browse" stops working.
299 # If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
300 # default, use these lines.
301 #VIMRCLOC = somewhere
302 #VIMRUNTIMEDIR = somewhere
304 CFLAGS
= -c
/W3
/nologo
$(CVARS
) -I.
-Iproto
-DHAVE_PATHDEF
-DWIN32 \
305 $(SNIFF_DEFS
) $(CSCOPE_DEFS
) $(NETBEANS_DEFS
) \
306 $(NBDEBUG_DEFS
) $(XPM_DEFS
) \
307 $(DEFINES
) -DWINVER
=$(WINVER
) -D_WIN32_WINNT
=$(WINVER
) \
310 #>>>>> end of choices
311 ###########################################################################
315 DEL_TREE
= rmdir
/s
/q
318 DEL_TREE
= deltree
/y
324 # Derive version of VC being used from nmake if not specified
325 !if
"$(MSVCVER)" == ""
326 !if
"$(_NMAKE_VER)" == ""
329 !if
"$(_NMAKE_VER)" == "162"
332 !if
"$(_NMAKE_VER)" == "6.00.8168.0"
335 !if
"$(_NMAKE_VER)" == "7.00.9466"
338 !if
"$(_NMAKE_VER)" == "7.10.3077"
341 !if
"$(_NMAKE_VER)" == "8.00.50727.42"
344 !if
"$(_NMAKE_VER)" == "8.00.50727.762"
349 # Abort bulding VIM if version of VC is unrecognised.
352 !message Cannot determine Visual C version being used. If you are using the
353 !message Windows SDK then you must have the environment variable MSVCVER set to
354 !message your version of the VC compiler. If you are not using the Express
355 !message version of Visual C you van either set MSVCVER or update this makefile
356 !message to handle the new value for _NMAKE_VER.
360 # Convert processor ID to MVC-compatible number
361 !if
"$(MSVCVER)" != "8.0"
362 !if
"$(CPUNR)" == "i386"
364 !elseif
"$(CPUNR)" == "i486"
366 !elseif
"$(CPUNR)" == "i586"
368 !elseif
"$(CPUNR)" == "i686"
370 !elseif
"$(CPUNR)" == "pentium4"
371 CPUARG
= /G7
/arch
:SSE2
376 # VC8 only allows specifying SSE architecture
377 !if
"$(CPUNR)" == "pentium4"
387 !if
"$(OPTIMIZE)" == "SPACE"
389 !elseif
"$(OPTIMIZE)" == "SPEED"
394 !if
"$(MSVCVER)" == "8.0"
395 # Use link time code generation if not worried about size
396 !if
"$(OPTIMIZE)" != "SPACE"
397 OPTFLAG
= $(OPTFLAG
) /GL
400 CFLAGS
= $(CFLAGS
) $(OPTFLAG
) -DNDEBUG
$(CPUARG
)
401 RCFLAGS
= $(rcflags
) $(rcvars
) -DNDEBUG
403 CFLAGS
= $(CFLAGS
) /MD
407 CFLAGS
= $(CFLAGS
) /MT
411 ! if
"$(CPU)" == "i386"
414 CFLAGS
= $(CFLAGS
) -D_DEBUG
-DDEBUG
/Od
415 RCFLAGS
= $(rcflags
) $(rcvars
) -D_DEBUG
-DDEBUG
416 # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
417 ! if
"$(MSVCVER)" == "4.0"
423 CFLAGS
= $(CFLAGS
) /MDd
424 LIBC
= $(LIBC
) msvcrtd.lib
426 LIBC
= $(LIBC
) libcmtd.lib
427 CFLAGS
= $(CFLAGS
) /MTd
431 INCL
= vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
432 proto.h option.h structs.h term.h
$(SNIFF_INCL
) $(CSCOPE_INCL
) \
436 $(OUTDIR
)\buffer.obj \
437 $(OUTDIR
)\charset.obj \
439 $(OUTDIR
)\digraph.obj \
442 $(OUTDIR
)\ex_cmds.obj \
443 $(OUTDIR
)\ex_cmds2.obj \
444 $(OUTDIR
)\ex_docmd.obj \
445 $(OUTDIR
)\ex_eval.obj \
446 $(OUTDIR
)\ex_getln.obj \
447 $(OUTDIR
)\fileio.obj \
449 $(OUTDIR
)\getchar.obj \
450 $(OUTDIR
)\hardcopy.obj \
451 $(OUTDIR
)\hashtab.obj \
454 $(OUTDIR
)\mbyte.obj \
455 $(OUTDIR
)\memfile.obj \
456 $(OUTDIR
)\memline.obj \
458 $(OUTDIR
)\message.obj \
459 $(OUTDIR
)\misc1.obj \
460 $(OUTDIR
)\misc2.obj \
462 $(OUTDIR
)\normal.obj \
464 $(OUTDIR
)\option.obj \
465 $(OUTDIR
)\os_mswin.obj \
466 $(OUTDIR
)\os_win32.obj \
467 $(OUTDIR
)\pathdef.obj \
468 $(OUTDIR
)\popupmnu.obj \
469 $(OUTDIR
)\quickfix.obj \
470 $(OUTDIR
)\regexp.obj \
471 $(OUTDIR
)\screen.obj \
472 $(OUTDIR
)\search.obj \
473 $(OUTDIR
)\spell.obj \
474 $(OUTDIR
)\syntax.obj \
479 $(OUTDIR
)\window.obj \
482 !if
"$(OLE)" == "yes"
483 CFLAGS
= $(CFLAGS
) -DFEAT_OLE
484 RCFLAGS
= $(RCFLAGS
) -DFEAT_OLE
485 OLE_OBJ
= $(OUTDIR
)\if_ole.obj
487 OLE_LIB
= oleaut32.lib
490 !if
"$(IME)" == "yes"
491 CFLAGS
= $(CFLAGS
) -DFEAT_MBYTE_IME
495 !if
"$(DYNAMIC_IME)" == "yes"
496 CFLAGS
= $(CFLAGS
) -DDYNAMIC_IME
502 !if
"$(GIME)" == "yes"
503 CFLAGS
= $(CFLAGS
) -DGLOBAL_IME
504 OBJ
= $(OBJ
) $(OUTDIR
)\dimm_i.obj
$(OUTDIR
)\glbl_ime.obj
508 !if
"$(MBYTE)" == "yes"
509 CFLAGS
= $(CFLAGS
) -DFEAT_MBYTE
512 !if
"$(GUI)" == "yes"
514 CFLAGS
= $(CFLAGS
) -DFEAT_GUI_W32
515 RCFLAGS
= $(RCFLAGS
) -DFEAT_GUI_W32
533 $(OUTDIR
)\gui_beval.obj \
534 $(OUTDIR
)\gui_w32.obj \
535 $(OUTDIR
)\os_w32exe.obj
537 oldnames.lib kernel32.lib gdi32.lib version.lib
$(IME_LIB
) \
538 winspool.lib comctl32.lib advapi32.lib shell32.lib \
539 /machine
:$(CPU
) /nodefaultlib
544 # iconv.dll library (dynamically loaded)
548 !if
"$(ICONV)" == "yes"
549 CFLAGS
= $(CFLAGS
) -DDYNAMIC_ICONV
552 # libintl.dll library
556 !if
"$(GETTEXT)" == "yes"
557 CFLAGS
= $(CFLAGS
) -DDYNAMIC_GETTEXT
566 !message Tcl requested
(version
$(TCL_VER
)) - root
dir is
"$(TCL)"
567 !if
"$(DYNAMIC_TCL)" == "yes"
568 !message Tcl DLL will be loaded dynamically
569 TCL_DLL
= tcl
$(TCL_VER
).dll
570 CFLAGS
= $(CFLAGS
) -DFEAT_TCL
-DDYNAMIC_TCL
-DDYNAMIC_TCL_DLL
=\"$(TCL_DLL
)\" \
571 -DDYNAMIC_TCL_VER
=\"$(TCL_VER_LONG
)\"
572 TCL_OBJ
= $(OUTDIR
)\if_tcl.obj
573 TCL_INC
= /I
"$(TCL)\Include" /I
"$(TCL)"
574 TCL_LIB
= $(TCL
)\lib
\tclstub
$(TCL_VER
).lib
576 CFLAGS
= $(CFLAGS
) -DFEAT_TCL
577 TCL_OBJ
= $(OUTDIR
)\if_tcl.obj
578 TCL_INC
= /I
"$(TCL)\Include" /I
"$(TCL)"
579 TCL_LIB
= $(TCL
)\lib
\tcl
$(TCL_VER
)vc.lib
588 !message Python requested
(version
$(PYTHON_VER
)) - root
dir is
"$(PYTHON)"
589 !if
"$(DYNAMIC_PYTHON)" == "yes"
590 !message Python DLL will be loaded dynamically
592 CFLAGS
= $(CFLAGS
) -DFEAT_PYTHON
593 PYTHON_OBJ
= $(OUTDIR
)\if_python.obj
594 PYTHON_INC
= /I
"$(PYTHON)\Include" /I
"$(PYTHON)\PC"
595 !if
"$(DYNAMIC_PYTHON)" == "yes"
596 CFLAGS
= $(CFLAGS
) -DDYNAMIC_PYTHON \
597 -DDYNAMIC_PYTHON_DLL
=\"python
$(PYTHON_VER
).dll
\"
598 PYTHON_LIB
= /nodefaultlib
:python
$(PYTHON_VER
).lib
600 PYTHON_LIB
= $(PYTHON
)\libs\python
$(PYTHON_VER
).lib
606 !message MzScheme requested
- root
dir is
"$(MZSCHEME)"
608 MZSCHEME_VER
= 205_000
610 CFLAGS
= $(CFLAGS
) -DFEAT_MZSCHEME
-I
$(MZSCHEME
)\
include
611 !if
"$(DYNAMIC_MZSCHEME)" == "yes"
612 !message MzScheme DLLs will be loaded dynamically
613 CFLAGS
= $(CFLAGS
) -DDYNAMIC_MZSCHEME \
614 -DDYNAMIC_MZSCH_DLL
=\"libmzsch
$(MZSCHEME_VER
).dll
\" \
615 -DDYNAMIC_MZGC_DLL
=\"libmzgc
$(MZSCHEME_VER
).dll
\"
617 MZSCHEME_LIB
= $(MZSCHEME
)\lib\msvc\libmzgc
$(MZSCHEME_VER
).lib \
618 $(MZSCHEME
)\lib\msvc\libmzsch
$(MZSCHEME_VER
).lib
620 MZSCHEME_OBJ
= $(OUTDIR
)\if_mzsch.obj
628 !message Perl requested
(version
$(PERL_VER
)) - root
dir is
"$(PERL)"
629 !if
"$(DYNAMIC_PERL)" == "yes"
630 !if
$(PERL_VER
) >= 56
631 !message Perl DLL will be loaded dynamically
633 !message Dynamic loading is not supported for Perl versions earlier than
5.6.0
634 !message Reverting to static loading...
639 # Is Perl installed in architecture-specific directories?
640 !if exist
($(PERL
)\Bin\MSWin32-x86
)
641 PERL_ARCH
= \MSWin32-x86
644 PERL_INCDIR
= $(PERL
)\Lib
$(PERL_ARCH
)\Core
646 # Version-dependent stuff
647 !if
$(PERL_VER
) == 55
648 PERL_LIB
= $(PERL_INCDIR
)\perl.lib
650 PERL_DLL
= perl
$(PERL_VER
).dll
651 PERL_LIB
= $(PERL_INCDIR
)\perl
$(PERL_VER
).lib
654 CFLAGS
= $(CFLAGS
) -DFEAT_PERL
656 # Do we want to load Perl dynamically?
657 !if
"$(DYNAMIC_PERL)" == "yes"
658 CFLAGS
= $(CFLAGS
) -DDYNAMIC_PERL
-DDYNAMIC_PERL_DLL
=\"$(PERL_DLL
)\"
662 PERL_EXE
= $(PERL
)\Bin
$(PERL_ARCH
)\perl
663 PERL_INC
= /I
$(PERL_INCDIR
)
664 PERL_OBJ
= $(OUTDIR
)\if_perl.obj
$(OUTDIR
)\if_perlsfio.obj
665 XSUBPP
= $(PERL
)\lib\ExtUtils\xsubpp
666 XSUBPP_TYPEMAP
= $(PERL
)\lib\ExtUtils
\typemap
671 # Support Ruby interface
678 !ifndef RUBY_VER_LONG
682 !if
$(RUBY_VER
) >= 18
683 !ifndef RUBY_PLATFORM
684 RUBY_PLATFORM
= i386-mswin32
686 !ifndef RUBY_INSTALL_NAME
687 RUBY_INSTALL_NAME
= msvcrt-ruby
$(RUBY_VER
)
690 !ifndef RUBY_PLATFORM
691 RUBY_PLATFORM
= i586-mswin32
693 !ifndef RUBY_INSTALL_NAME
694 RUBY_INSTALL_NAME
= mswin32-ruby
$(RUBY_VER
)
696 !endif # $(RUBY_VER) >= 18
698 !message Ruby requested
(version
$(RUBY_VER
)) - root
dir is
"$(RUBY)"
699 CFLAGS
= $(CFLAGS
) -DFEAT_RUBY
700 RUBY_OBJ
= $(OUTDIR
)\if_ruby.obj
701 RUBY_INC
= /I
"$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
702 RUBY_LIB
= $(RUBY
)\lib\
$(RUBY_INSTALL_NAME
).lib
703 # Do we want to load Ruby dynamically?
704 !if
"$(DYNAMIC_RUBY)" == "yes"
705 !message Ruby DLL will be loaded dynamically
706 CFLAGS
= $(CFLAGS
) -DDYNAMIC_RUBY
-DDYNAMIC_RUBY_VER
=$(RUBY_VER
) \
707 -DDYNAMIC_RUBY_DLL
=\"$(RUBY_INSTALL_NAME
).dll
\"
713 # Support PostScript printing
715 !if
"$(POSTSCRIPT)" == "yes"
716 CFLAGS
= $(CFLAGS
) -DMSWINPS
720 # FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
722 !if
"$(FEATURES)"==""
725 CFLAGS
= $(CFLAGS
) -DFEAT_
$(FEATURES
)
728 # Always generate the .pdb file, so that we get debug symbols that can be used
729 # on a crash (doesn't add overhead to the executable).
730 # Generate edit-and-continue debug info when no optimization - allows to
731 # debug more conveniently (able to look at variables which are in registers)
733 CFLAGS
= $(CFLAGS
) /Fd
$(OUTDIR
)/ $(DEBUGINFO
)
734 LINK_PDB
= /PDB
:$(VIM
).pdb
-debug
737 # End extra feature include
741 conflags
= /nologo
/subsystem
:$(SUBSYSTEM
)
743 PATHDEF_SRC
= $(OUTDIR
)\pathdef.c
745 !IF
"$(MAP)" == "yes"
746 # "/map" is for debugging
747 conflags
= $(conflags
) /map
748 !ELSEIF
"$(MAP)" == "lines"
749 # "/mapinfo:lines" is for debugging, only works for VC6 and later
750 conflags
= $(conflags
) /map
/mapinfo
:lines
753 LINKARGS1
= $(linkdebug
) $(conflags
)
754 LINKARGS2
= $(CON_LIB
) $(GUI_LIB
) $(LIBC
) $(OLE_LIB
) user32.lib
$(SNIFF_LIB
) \
755 $(MZSCHEME_LIB
) $(PERL_LIB
) $(PYTHON_LIB
) $(RUBY_LIB
) \
756 $(TCL_LIB
) $(NETBEANS_LIB
) $(XPM_LIB
) $(LINK_PDB
)
758 # Report link time code generation progress if used.
760 !if
"$(MSVCVER)" == "8.0"
761 !if
"$(OPTIMIZE)" != "SPACE"
762 LINKARGS1
= $(LINKARGS1
) /LTCG
:STATUS
767 all: $(VIM
).exe vimrun.exe
install.exe uninstal.exe xxd
/xxd.exe \
770 $(VIM
).exe
: $(OUTDIR
) $(OBJ
) $(GUI_OBJ
) $(OLE_OBJ
) $(OLE_IDL
) $(MZSCHEME_OBJ
) \
771 $(PERL_OBJ
) $(PYTHON_OBJ
) $(RUBY_OBJ
) $(TCL_OBJ
) $(SNIFF_OBJ
) \
772 $(CSCOPE_OBJ
) $(NETBEANS_OBJ
) $(XPM_OBJ
) version.c version.h
773 $(CC
) $(CFLAGS
) version.c
774 $(link
) $(LINKARGS1
) -out
:$(VIM
).exe
$(OBJ
) $(GUI_OBJ
) $(OLE_OBJ
) \
775 $(MZSCHEME_OBJ
) $(PERL_OBJ
) $(PYTHON_OBJ
) $(RUBY_OBJ
) \
776 $(TCL_OBJ
) $(SNIFF_OBJ
) $(CSCOPE_OBJ
) $(NETBEANS_OBJ
) \
777 $(XPM_OBJ
) $(OUTDIR
)\version.obj
$(LINKARGS2
)
782 if not exist
$(OUTDIR
)/nul mkdir
$(OUTDIR
)
784 install.exe
: dosinst.c
785 $(CC
) /nologo
-DNDEBUG
-DWIN32 dosinst.c kernel32.lib shell32.lib \
786 ole32.lib advapi32.lib uuid.lib
787 - if exist
install.exe del
install.exe
788 ren dosinst.exe
install.exe
790 uninstal.exe
: uninstal.c
791 $(CC
) /nologo
-DNDEBUG
-DWIN32 uninstal.c shell32.lib advapi32.lib
794 $(CC
) /nologo
-DNDEBUG vimrun.c
796 xxd
/xxd.exe
: xxd
/xxd.c
798 $(MAKE
) /NOLOGO
-f Make_mvc.mak
801 GvimExt
/gvimext.dll
: GvimExt
/gvimext.
cpp GvimExt
/gvimext.rc GvimExt
/gvimext.h
803 $(MAKE
) /NOLOGO
-f Makefile
$(MAKEFLAGS_GVIMEXT
)
808 $(CTAGS
) *.c
*.
cpp *.h if_perl.xs proto\
*.pro
811 - if exist
tags del
tags
814 - if exist
$(OUTDIR
)/nul
$(DEL_TREE
) $(OUTDIR
)
815 - if exist
*.obj del
*.obj
816 - if exist
$(VIM
).exe del
$(VIM
).exe
817 - if exist
$(VIM
).ilk del
$(VIM
).ilk
818 - if exist
$(VIM
).pdb del
$(VIM
).pdb
819 - if exist
$(VIM
).map del
$(VIM
).map
820 - if exist
$(VIM
).ncb del
$(VIM
).ncb
821 - if exist vimrun.exe del vimrun.exe
822 - if exist
install.exe del
install.exe
823 - if exist uninstal.exe del uninstal.exe
824 - if exist if_perl.c del if_perl.c
825 - if exist dimm.h del dimm.h
826 - if exist dimm_i.c del dimm_i.c
827 - if exist dimm.tlb del dimm.tlb
828 - if exist dosinst.exe del dosinst.exe
830 $(MAKE
) /NOLOGO
-f Make_mvc.mak
clean
833 $(MAKE
) /NOLOGO
-f Makefile
clean
836 $(MAKE
) /NOLOGO
-f Makefile
clean
838 - if exist testdir\
*.out del testdir\
*.out
842 $(MAKE
) /NOLOGO
-f Make_dos.mak win32
847 $(MAKE
) /NOLOGO
-f Make_dos.mak
clean
850 ###########################################################################
852 # Create a default rule for transforming .c files to .obj files in $(OUTDIR)
853 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
854 !IF
"$(MSVCVER)" == "4.0"
861 # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
862 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
863 !IF
"$(MSVCVER)" == "4.0"
864 .
cpp{$(OUTDIR
)/}.obj
:
866 .
cpp{$(OUTDIR
)/}.obj
::
870 $(OUTDIR
)/buffer.obj
: $(OUTDIR
) buffer.c
$(INCL
)
872 $(OUTDIR
)/charset.obj
: $(OUTDIR
) charset.c
$(INCL
)
874 $(OUTDIR
)/diff.obj
: $(OUTDIR
) diff.c
$(INCL
)
876 $(OUTDIR
)/digraph.obj
: $(OUTDIR
) digraph.c
$(INCL
)
878 $(OUTDIR
)/edit.obj
: $(OUTDIR
) edit.c
$(INCL
)
880 $(OUTDIR
)/eval.obj
: $(OUTDIR
) eval.c
$(INCL
)
882 $(OUTDIR
)/ex_cmds.obj
: $(OUTDIR
) ex_cmds.c
$(INCL
)
884 $(OUTDIR
)/ex_cmds2.obj
: $(OUTDIR
) ex_cmds2.c
$(INCL
)
886 $(OUTDIR
)/ex_docmd.obj
: $(OUTDIR
) ex_docmd.c
$(INCL
) ex_cmds.h
888 $(OUTDIR
)/ex_eval.obj
: $(OUTDIR
) ex_eval.c
$(INCL
) ex_cmds.h
890 $(OUTDIR
)/ex_getln.obj
: $(OUTDIR
) ex_getln.c
$(INCL
)
892 $(OUTDIR
)/fileio.obj
: $(OUTDIR
) fileio.c
$(INCL
)
894 $(OUTDIR
)/fold.obj
: $(OUTDIR
) fold.c
$(INCL
)
896 $(OUTDIR
)/getchar.obj
: $(OUTDIR
) getchar.c
$(INCL
)
898 $(OUTDIR
)/hardcopy.obj
: $(OUTDIR
) hardcopy.c
$(INCL
)
900 $(OUTDIR
)/hashtab.obj
: $(OUTDIR
) hashtab.c
$(INCL
)
902 $(OUTDIR
)/gui.obj
: $(OUTDIR
) gui.c
$(INCL
) $(GUI_INCL
)
904 $(OUTDIR
)/gui_beval.obj
: $(OUTDIR
) gui_beval.c
$(INCL
) $(GUI_INCL
)
906 $(OUTDIR
)/gui_w32.obj
: $(OUTDIR
) gui_w32.c gui_w48.c
$(INCL
) $(GUI_INCL
)
908 $(OUTDIR
)/if_cscope.obj
: $(OUTDIR
) if_cscope.c
$(INCL
)
910 if_perl.c
: if_perl.xs typemap
911 $(PERL_EXE
) $(XSUBPP
) -prototypes
-typemap
$(XSUBPP_TYPEMAP
) \
912 -typemap typemap if_perl.xs
> if_perl.c
914 $(OUTDIR
)/if_perl.obj
: $(OUTDIR
) if_perl.c
$(INCL
)
915 $(CC
) $(CFLAGS
) $(PERL_INC
) if_perl.c
917 $(OUTDIR
)/if_perlsfio.obj
: $(OUTDIR
) if_perlsfio.c
$(INCL
)
918 $(CC
) $(CFLAGS
) $(PERL_INC
) if_perlsfio.c
920 $(OUTDIR
)/if_mzsch.obj
: $(OUTDIR
) if_mzsch.c
$(INCL
)
921 $(CC
) $(CFLAGS
) if_mzsch.c \
922 -DMZSCHEME_COLLECTS
=\"$(MZSCHEME
:\
=\\)\\collects
\"
924 $(OUTDIR
)/if_python.obj
: $(OUTDIR
) if_python.c
$(INCL
)
925 $(CC
) $(CFLAGS
) $(PYTHON_INC
) if_python.c
927 $(OUTDIR
)/if_ole.obj
: $(OUTDIR
) if_ole.
cpp $(INCL
) if_ole.h
929 $(OUTDIR
)/if_ruby.obj
: $(OUTDIR
) if_ruby.c
$(INCL
)
930 $(CC
) $(CFLAGS
) $(RUBY_INC
) if_ruby.c
932 $(OUTDIR
)/if_sniff.obj
: $(OUTDIR
) if_sniff.c
$(INCL
)
933 $(CC
) $(CFLAGS
) if_sniff.c
935 $(OUTDIR
)/if_tcl.obj
: $(OUTDIR
) if_tcl.c
$(INCL
)
936 $(CC
) $(CFLAGS
) $(TCL_INC
) if_tcl.c
938 $(OUTDIR
)/main.obj
: $(OUTDIR
) main.c
$(INCL
)
940 $(OUTDIR
)/mark.obj
: $(OUTDIR
) mark.c
$(INCL
)
942 $(OUTDIR
)/memfile.obj
: $(OUTDIR
) memfile.c
$(INCL
)
944 $(OUTDIR
)/memline.obj
: $(OUTDIR
) memline.c
$(INCL
)
946 $(OUTDIR
)/menu.obj
: $(OUTDIR
) menu.c
$(INCL
)
948 $(OUTDIR
)/message.obj
: $(OUTDIR
) message.c
$(INCL
)
950 $(OUTDIR
)/misc1.obj
: $(OUTDIR
) misc1.c
$(INCL
)
952 $(OUTDIR
)/misc2.obj
: $(OUTDIR
) misc2.c
$(INCL
)
954 $(OUTDIR
)/move.obj
: $(OUTDIR
) move.c
$(INCL
)
956 $(OUTDIR
)/mbyte.obj
: $(OUTDIR
) mbyte.c
$(INCL
)
958 $(OUTDIR
)/netbeans.obj
: $(OUTDIR
) netbeans.c
$(NBDEBUG_SRC
) $(INCL
)
960 $(OUTDIR
)/normal.obj
: $(OUTDIR
) normal.c
$(INCL
)
962 $(OUTDIR
)/option.obj
: $(OUTDIR
) option.c
$(INCL
)
964 $(OUTDIR
)/ops.obj
: $(OUTDIR
) ops.c
$(INCL
)
966 $(OUTDIR
)/os_mswin.obj
: $(OUTDIR
) os_mswin.c
$(INCL
)
968 $(OUTDIR
)/os_win32.obj
: $(OUTDIR
) os_win32.c
$(INCL
) os_win32.h
970 $(OUTDIR
)/os_w32exe.obj
: $(OUTDIR
) os_w32exe.c
$(INCL
)
972 $(OUTDIR
)/pathdef.obj
: $(OUTDIR
) $(PATHDEF_SRC
) $(INCL
)
973 $(CC
) $(CFLAGS
) $(PATHDEF_SRC
)
975 $(OUTDIR
)/popupmnu.obj
: $(OUTDIR
) popupmnu.c
$(INCL
)
977 $(OUTDIR
)/quickfix.obj
: $(OUTDIR
) quickfix.c
$(INCL
)
979 $(OUTDIR
)/regexp.obj
: $(OUTDIR
) regexp.c
$(INCL
)
981 $(OUTDIR
)/screen.obj
: $(OUTDIR
) screen.c
$(INCL
)
983 $(OUTDIR
)/search.obj
: $(OUTDIR
) search.c
$(INCL
)
985 $(OUTDIR
)/spell.obj
: $(OUTDIR
) spell.c
$(INCL
)
987 $(OUTDIR
)/syntax.obj
: $(OUTDIR
) syntax.c
$(INCL
)
989 $(OUTDIR
)/tag.obj
: $(OUTDIR
) tag.c
$(INCL
)
991 $(OUTDIR
)/term.obj
: $(OUTDIR
) term.c
$(INCL
)
993 $(OUTDIR
)/ui.obj
: $(OUTDIR
) ui.c
$(INCL
)
995 $(OUTDIR
)/undo.obj
: $(OUTDIR
) undo.c
$(INCL
)
997 $(OUTDIR
)/window.obj
: $(OUTDIR
) window.c
$(INCL
)
999 $(OUTDIR
)/xpm_w32.obj
: $(OUTDIR
) xpm_w32.c
1000 $(CC
) $(CFLAGS
) $(XPM_INC
) xpm_w32.c
1002 $(OUTDIR
)/vim.res
: $(OUTDIR
) vim.rc version.h tools.bmp tearoff.bmp \
1003 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
1004 $(RC
) /l
0x409 /Fo
$(OUTDIR
)/vim.res
$(RCFLAGS
) vim.rc
1006 iid_ole.c if_ole.h vim.tlb
: if_ole.idl
1007 midl
/nologo
/error none
/proxy nul
/iid iid_ole.c
/tlb vim.tlb \
1008 /header if_ole.h if_ole.idl
1010 dimm.h dimm_i.c
: dimm.idl
1011 midl
/nologo
/error none
/proxy nul dimm.idl
1013 $(OUTDIR
)/dimm_i.obj
: $(OUTDIR
) dimm_i.c
$(INCL
)
1015 $(OUTDIR
)/glbl_ime.obj
: $(OUTDIR
) glbl_ime.
cpp dimm.h
$(INCL
)
1017 # $CFLAGS may contain backslashes and double quotes, escape them both.
1018 E0_CFLAGS
= $(CFLAGS
:\
=\\)
1019 E_CFLAGS
= $(E0_CFLAGS
:"=\")
1020 # ") stop the string
1022 $(PATHDEF_SRC
): auto
1023 @echo creating
$(PATHDEF_SRC
)
1024 @echo
/* pathdef.c
*/ > $(PATHDEF_SRC
)
1025 @echo
#include "vim.h" >> $(PATHDEF_SRC)
1026 @echo char_u
*default_vim_dir
= (char_u
*)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC
)
1027 @echo char_u
*default_vimruntime_dir
= (char_u
*)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC
)
1028 @echo char_u
*all_cflags = (char_u
*)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC
)
1029 @echo char_u
*all_lflags
= (char_u
*)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC
)
1030 @echo char_u
*compiled_user
= (char_u
*)"$(USERNAME)"; >> $(PATHDEF_SRC
)
1031 @echo char_u
*compiled_sys
= (char_u
*)"$(USERDOMAIN)"; >> $(PATHDEF_SRC
)
1034 if not exist auto
/nul mkdir auto
1045 proto
/ex_cmds2.pro \
1046 proto
/ex_docmd.pro \
1048 proto
/ex_getln.pro \
1051 proto
/hardcopy.pro \
1066 proto
/os_mswin.pro \
1067 proto
/os_win32.pro \
1068 proto
/popupmnu.pro \
1069 proto
/quickfix.pro \
1084 # Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake
1087 $(CC
) $(CFLAGS
) /FAcs
$<
1089 # Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i"
1091 $(CC
) $(CFLAGS
) /P
/C
$<
1094 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: