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 # You can combine any of these interfaces
97 # Example: To build the non-debug, GUI version with Perl interface:
98 # nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
100 # 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
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
127 # Note: Make_dvc.mak builds vimrun.exe, because it must build something
128 # to be a valid makefile..
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.,
133 # nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
135 # Build on both Windows NT/XP and Windows 9x
139 # Select one of eight object code directories, depends on GUI, OLE, DEBUG and
141 # If you change something else, do "make clean" first!
142 !if
"$(GUI)" == "yes"
147 !if
"$(OLE)" == "yes"
165 !if
"$(DEBUG)" == "yes"
169 # Win32.mak requires that CPU be set appropriately.
170 # To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
172 !ifdef PROCESSOR_ARCHITECTURE
173 # We're on Windows NT or using VC 6+
175 ASSEMBLY_ARCHITECTURE
=$(CPU
)
176 # Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7.
177 ! if
("$(ASSEMBLY_ARCHITECTURE)" == "i386") ||
("$(ASSEMBLY_ARCHITECTURE)" == "I386")
178 ASSEMBLY_ARCHITECTURE
= x86
181 CPU
= $(PROCESSOR_ARCHITECTURE
)
182 ASSEMBLY_ARCHITECTURE
= $(PROCESSOR_ARCHITECTURE
)
183 ! if
("$(CPU)" == "x86") ||
("$(CPU)" == "X86")
187 !else # !PROCESSOR_ARCHITECTURE
188 # We're on Windows 95
190 !endif # !PROCESSOR_ARCHITECTURE
192 !if
("$(CPU)" == "AMD64") ||
("$(CPU)" == "IA64")
193 DEFINES
=$(DEFINES
) /Wp64
196 # Build a retail version by default
198 !if
"$(DEBUG)" != "yes"
201 MAKEFLAGS_GVIMEXT
= DEBUG
=yes
205 # Get all sorts of useful, standard macros from the SDK. (Note that
206 # MSVC 2.2 does not install <ntwin32.mak> in the \msvc20\include
207 # directory, but you can find it in \msvc20\include on the CD-ROM.
208 # You may also need <win32.mak> from the same place.)
213 #>>>>> path of the compiler and linker; name of include and lib directories
214 # PATH = c:\msvc20\bin;$(PATH)
215 # INCLUDE = c:\msvc20\include
216 # LIB = c:\msvc20\lib
222 !if
"$(SNIFF)" == "yes"
223 # SNIFF - Include support for SNiFF+.
224 SNIFF_INCL
= if_sniff.h
225 SNIFF_OBJ
= $(OBJDIR
)/if_sniff.obj
226 SNIFF_LIB
= shell32.lib
227 SNIFF_DEFS
= -DFEAT_SNIFF
228 # The SNiFF integration needs multithreaded libraries!
236 !if
"$(CSCOPE)" == "yes"
237 # CSCOPE - Include support for Cscope
238 CSCOPE_INCL
= if_cscope.h
239 CSCOPE_OBJ
= $(OBJDIR
)/if_cscope.obj
240 CSCOPE_DEFS
= -DFEAT_CSCOPE
247 # Only allow NETBEANS and XPM for a GUI build.
248 !if
"$(GUI)" == "yes"
249 !if
"$(NETBEANS)" == "yes"
250 # NETBEANS - Include support for Netbeans integration
251 NETBEANS_PRO
= proto
/netbeans.pro
252 NETBEANS_OBJ
= $(OBJDIR
)/netbeans.obj
253 NETBEANS_DEFS
= -DFEAT_NETBEANS_INTG
255 !if
"$(NBDEBUG)" == "yes"
256 NBDEBUG_DEFS
= -DNBDEBUG
257 NBDEBUG_INCL
= nbdebug.h
258 NBDEBUG_SRC
= nbdebug.c
260 NETBEANS_LIB
= WSock32.lib
264 # XPM - Include support for XPM signs
265 # you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
266 XPM_OBJ
= $(OBJDIR
)/xpm_w32.obj
267 XPM_DEFS
= -DFEAT_XPM_W32
268 XPM_LIB
= $(XPM
)\lib\libXpm.lib
269 XPM_INC
= -I
$(XPM
)\
include
273 # Set which version of the CRT to use
274 !if defined
(USE_MSVCRT
)
276 # !elseif defined(MULTITHREADED)
283 # need advapi32.lib for GetUserName()
284 # need shell32.lib for ExtractIcon()
285 # gdi32.lib and comdlg32.lib for printing support
286 # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
287 CON_LIB
= advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
288 !if
"$(DELAYLOAD)" == "yes"
289 CON_LIB
= $(CON_LIB
) /DELAYLOAD
:comdlg32.dll
/DELAYLOAD
:ole32.dll DelayImp.lib
292 ### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
293 # When set to 0x0500 ":browse" stops working.
298 # If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
299 # default, use these lines.
300 #VIMRCLOC = somewhere
301 #VIMRUNTIMEDIR = somewhere
303 CFLAGS
= -c
/W3
/nologo
$(CVARS
) -I.
-Iproto
-DHAVE_PATHDEF
-DWIN32 \
304 $(SNIFF_DEFS
) $(CSCOPE_DEFS
) $(NETBEANS_DEFS
) \
305 $(NBDEBUG_DEFS
) $(XPM_DEFS
) \
306 $(DEFINES
) -DWINVER
=$(WINVER
) -D_WIN32_WINNT
=$(WINVER
) \
309 #>>>>> end of choices
310 ###########################################################################
314 DEL_TREE
= rmdir
/s
/q
317 DEL_TREE
= deltree
/y
323 # Convert processor ID to MVC-compatible number
324 !if
"$(CPUNR)" == "i386"
326 !elseif
"$(CPUNR)" == "i486"
328 !elseif
"$(CPUNR)" == "i586"
330 !elseif
"$(CPUNR)" == "i686"
332 !elseif
"$(CPUNR)" == "pentium4"
333 CPUARG
= /G7
/arch
:SSE2
340 !if
"$(OPTIMIZE)" == "SPACE"
342 !elseif
"$(OPTIMIZE)" == "SPEED"
347 CFLAGS
= $(CFLAGS
) $(OPTFLAG
) -DNDEBUG
$(CPUARG
)
348 RCFLAGS
= $(rcflags
) $(rcvars
) -DNDEBUG
350 CFLAGS
= $(CFLAGS
) -MD
352 # CFLAGS = $(CFLAGS) $(cvarsdll)
353 # ! elseif defined(MULTITHREADED)
355 # CFLAGS = $(CFLAGS) $(cvarsmt)
359 # CFLAGS = $(CFLAGS) $(cvars)
363 CFLAGS
= $(CFLAGS
) -D_DEBUG
-DDEBUG
/Od
364 RCFLAGS
= $(rcflags
) $(rcvars
) -D_DEBUG
-DDEBUG
365 # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
366 ! if
"$(_NMAKE_VER)" == ""
372 CFLAGS
= $(CFLAGS
) -MDd
373 LIBC
= $(LIBC
) msvcrtd.lib
374 # CFLAGS = $(CFLAGS) $(cvarsdll)
375 # ! elseif defined(MULTITHREADED)
376 # LIBC = $(LIBC) libcmtd.lib
377 # CFLAGS = $(CFLAGS) $(cvarsmt)
379 # LIBC = $(LIBC) libcd.lib
380 LIBC
= $(LIBC
) libcmtd.lib
381 # CFLAGS = $(CFLAGS) $(cvars)
385 INCL
= vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
386 proto.h option.h structs.h term.h
$(SNIFF_INCL
) $(CSCOPE_INCL
) \
390 $(OUTDIR
)\buffer.obj \
391 $(OUTDIR
)\charset.obj \
393 $(OUTDIR
)\digraph.obj \
396 $(OUTDIR
)\ex_cmds.obj \
397 $(OUTDIR
)\ex_cmds2.obj \
398 $(OUTDIR
)\ex_docmd.obj \
399 $(OUTDIR
)\ex_eval.obj \
400 $(OUTDIR
)\ex_getln.obj \
401 $(OUTDIR
)\fileio.obj \
403 $(OUTDIR
)\getchar.obj \
404 $(OUTDIR
)\hardcopy.obj \
405 $(OUTDIR
)\hashtab.obj \
408 $(OUTDIR
)\mbyte.obj \
409 $(OUTDIR
)\memfile.obj \
410 $(OUTDIR
)\memline.obj \
412 $(OUTDIR
)\message.obj \
413 $(OUTDIR
)\misc1.obj \
414 $(OUTDIR
)\misc2.obj \
416 $(OUTDIR
)\normal.obj \
418 $(OUTDIR
)\option.obj \
419 $(OUTDIR
)\os_mswin.obj \
420 $(OUTDIR
)\os_win32.obj \
421 $(OUTDIR
)\pathdef.obj \
422 $(OUTDIR
)\popupmnu.obj \
423 $(OUTDIR
)\quickfix.obj \
424 $(OUTDIR
)\regexp.obj \
425 $(OUTDIR
)\screen.obj \
426 $(OUTDIR
)\search.obj \
427 $(OUTDIR
)\spell.obj \
428 $(OUTDIR
)\syntax.obj \
433 $(OUTDIR
)\window.obj \
436 !if
"$(OLE)" == "yes"
437 CFLAGS
= $(CFLAGS
) -DFEAT_OLE
438 RCFLAGS
= $(RCFLAGS
) -DFEAT_OLE
439 OLE_OBJ
= $(OUTDIR
)\if_ole.obj
441 OLE_LIB
= oleaut32.lib
444 !if
"$(IME)" == "yes"
445 CFLAGS
= $(CFLAGS
) -DFEAT_MBYTE_IME
449 !if
"$(DYNAMIC_IME)" == "yes"
450 CFLAGS
= $(CFLAGS
) -DDYNAMIC_IME
456 !if
"$(GIME)" == "yes"
457 CFLAGS
= $(CFLAGS
) -DGLOBAL_IME
458 OBJ
= $(OBJ
) $(OUTDIR
)\dimm_i.obj
$(OUTDIR
)\glbl_ime.obj
462 !if
"$(MBYTE)" == "yes"
463 CFLAGS
= $(CFLAGS
) -DFEAT_MBYTE
466 !if
"$(GUI)" == "yes"
468 CFLAGS
= $(CFLAGS
) -DFEAT_GUI_W32
469 RCFLAGS
= $(RCFLAGS
) -DFEAT_GUI_W32
487 $(OUTDIR
)\gui_beval.obj \
488 $(OUTDIR
)\gui_w32.obj \
489 $(OUTDIR
)\os_w32exe.obj
491 oldnames.lib kernel32.lib gdi32.lib version.lib
$(IME_LIB
) \
492 winspool.lib comctl32.lib advapi32.lib shell32.lib \
493 /machine
:$(CPU
) /nodefaultlib
498 # iconv.dll library (dynamically loaded)
502 !if
"$(ICONV)" == "yes"
503 CFLAGS
= $(CFLAGS
) -DDYNAMIC_ICONV
506 # libintl.dll library
510 !if
"$(GETTEXT)" == "yes"
511 CFLAGS
= $(CFLAGS
) -DDYNAMIC_GETTEXT
520 !message Tcl requested
(version
$(TCL_VER
)) - root
dir is
"$(TCL)"
521 !if
"$(DYNAMIC_TCL)" == "yes"
522 !message Tcl DLL will be loaded dynamically
523 TCL_DLL
= tcl
$(TCL_VER
).dll
524 CFLAGS
= $(CFLAGS
) -DFEAT_TCL
-DDYNAMIC_TCL
-DDYNAMIC_TCL_DLL
=\"$(TCL_DLL
)\" \
525 -DDYNAMIC_TCL_VER
=\"$(TCL_VER_LONG
)\"
526 TCL_OBJ
= $(OUTDIR
)\if_tcl.obj
527 TCL_INC
= /I
"$(TCL)\Include" /I
"$(TCL)"
528 TCL_LIB
= $(TCL
)\lib
\tclstub
$(TCL_VER
).lib
530 CFLAGS
= $(CFLAGS
) -DFEAT_TCL
531 TCL_OBJ
= $(OUTDIR
)\if_tcl.obj
532 TCL_INC
= /I
"$(TCL)\Include" /I
"$(TCL)"
533 TCL_LIB
= $(TCL
)\lib
\tcl
$(TCL_VER
)vc.lib
542 !message Python requested
(version
$(PYTHON_VER
)) - root
dir is
"$(PYTHON)"
543 !if
"$(DYNAMIC_PYTHON)" == "yes"
544 !message Python DLL will be loaded dynamically
546 CFLAGS
= $(CFLAGS
) -DFEAT_PYTHON
547 PYTHON_OBJ
= $(OUTDIR
)\if_python.obj
548 PYTHON_INC
= /I
"$(PYTHON)\Include" /I
"$(PYTHON)\PC"
549 !if
"$(DYNAMIC_PYTHON)" == "yes"
550 CFLAGS
= $(CFLAGS
) -DDYNAMIC_PYTHON \
551 -DDYNAMIC_PYTHON_DLL
=\"python
$(PYTHON_VER
).dll
\"
552 PYTHON_LIB
= /nodefaultlib
:python
$(PYTHON_VER
).lib
554 PYTHON_LIB
= $(PYTHON
)\libs\python
$(PYTHON_VER
).lib
560 !message MzScheme requested
- root
dir is
"$(MZSCHEME)"
562 MZSCHEME_VER
= 205_000
564 CFLAGS
= $(CFLAGS
) -DFEAT_MZSCHEME
-I
$(MZSCHEME
)\
include
565 !if
"$(DYNAMIC_MZSCHEME)" == "yes"
566 !message MzScheme DLLs will be loaded dynamically
567 CFLAGS
= $(CFLAGS
) -DDYNAMIC_MZSCHEME \
568 -DDYNAMIC_MZSCH_DLL
=\"libmzsch
$(MZSCHEME_VER
).dll
\" \
569 -DDYNAMIC_MZGC_DLL
=\"libmzgc
$(MZSCHEME_VER
).dll
\"
571 MZSCHEME_LIB
= $(MZSCHEME
)\lib\msvc\libmzgc
$(MZSCHEME_VER
).lib \
572 $(MZSCHEME
)\lib\msvc\libmzsch
$(MZSCHEME_VER
).lib
574 MZSCHEME_OBJ
= $(OUTDIR
)\if_mzsch.obj
582 !message Perl requested
(version
$(PERL_VER
)) - root
dir is
"$(PERL)"
583 !if
"$(DYNAMIC_PERL)" == "yes"
584 !if
$(PERL_VER
) >= 56
585 !message Perl DLL will be loaded dynamically
587 !message Dynamic loading is not supported for Perl versions earlier than
5.6.0
588 !message Reverting to static loading...
593 # Is Perl installed in architecture-specific directories?
594 !if exist
($(PERL
)\Bin\MSWin32-x86
)
595 PERL_ARCH
= \MSWin32-x86
598 PERL_INCDIR
= $(PERL
)\Lib
$(PERL_ARCH
)\Core
600 # Version-dependent stuff
601 !if
$(PERL_VER
) == 55
602 PERL_LIB
= $(PERL_INCDIR
)\perl.lib
604 PERL_DLL
= perl
$(PERL_VER
).dll
605 PERL_LIB
= $(PERL_INCDIR
)\perl
$(PERL_VER
).lib
608 CFLAGS
= $(CFLAGS
) -DFEAT_PERL
610 # Do we want to load Perl dynamically?
611 !if
"$(DYNAMIC_PERL)" == "yes"
612 CFLAGS
= $(CFLAGS
) -DDYNAMIC_PERL
-DDYNAMIC_PERL_DLL
=\"$(PERL_DLL
)\"
616 PERL_EXE
= $(PERL
)\Bin
$(PERL_ARCH
)\perl
617 PERL_INC
= /I
$(PERL_INCDIR
)
618 PERL_OBJ
= $(OUTDIR
)\if_perl.obj
$(OUTDIR
)\if_perlsfio.obj
619 XSUBPP
= $(PERL
)\lib\ExtUtils\xsubpp
620 XSUBPP_TYPEMAP
= $(PERL
)\lib\ExtUtils
\typemap
625 # Support Ruby interface
632 !ifndef RUBY_VER_LONG
636 !if
$(RUBY_VER
) >= 18
637 !ifndef RUBY_PLATFORM
638 RUBY_PLATFORM
= i386-mswin32
640 !ifndef RUBY_INSTALL_NAME
641 RUBY_INSTALL_NAME
= msvcrt-ruby
$(RUBY_VER
)
644 !ifndef RUBY_PLATFORM
645 RUBY_PLATFORM
= i586-mswin32
647 !ifndef RUBY_INSTALL_NAME
648 RUBY_INSTALL_NAME
= mswin32-ruby
$(RUBY_VER
)
650 !endif # $(RUBY_VER) >= 18
652 !message Ruby requested
(version
$(RUBY_VER
)) - root
dir is
"$(RUBY)"
653 CFLAGS
= $(CFLAGS
) -DFEAT_RUBY
654 RUBY_OBJ
= $(OUTDIR
)\if_ruby.obj
655 RUBY_INC
= /I
"$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
656 RUBY_LIB
= $(RUBY
)\lib\
$(RUBY_INSTALL_NAME
).lib
657 # Do we want to load Ruby dynamically?
658 !if
"$(DYNAMIC_RUBY)" == "yes"
659 !message Ruby DLL will be loaded dynamically
660 CFLAGS
= $(CFLAGS
) -DDYNAMIC_RUBY
-DDYNAMIC_RUBY_VER
=$(RUBY_VER
) \
661 -DDYNAMIC_RUBY_DLL
=\"$(RUBY_INSTALL_NAME
).dll
\"
667 # Support PostScript printing
669 !if
"$(POSTSCRIPT)" == "yes"
670 CFLAGS
= $(CFLAGS
) -DMSWINPS
674 # FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
676 !if
"$(FEATURES)"==""
679 CFLAGS
= $(CFLAGS
) -DFEAT_
$(FEATURES
)
682 # Always generate the .pdb file, so that we get debug symbols that can be used
683 # on a crash (doesn't add overhead to the executable).
685 CFLAGS
= $(CFLAGS
) /Zi
/Fd
$(OUTDIR
)/
686 LINK_PDB
= /PDB
:$(VIM
).pdb
-debug
# -debug:full -debugtype:cv,fixup
689 # End extra feature include
693 conflags
= /nologo
/subsystem
:$(SUBSYSTEM
) /incremental
:no
695 PATHDEF_SRC
= $(OUTDIR
)\pathdef.c
697 !IF
"$(MAP)" == "yes"
698 # "/map" is for debugging
699 conflags
= $(conflags
) /map
700 !ELSEIF
"$(MAP)" == "lines"
701 # "/mapinfo:lines" is for debugging, only works for VC6 and later
702 conflags
= $(conflags
) /map
/mapinfo
:lines
705 LINKARGS1
= $(linkdebug
) $(conflags
) /nodefaultlib
:libc
706 LINKARGS2
= $(CON_LIB
) $(GUI_LIB
) $(LIBC
) $(OLE_LIB
) user32.lib
$(SNIFF_LIB
) \
707 $(MZSCHEME_LIB
) $(PERL_LIB
) $(PYTHON_LIB
) $(RUBY_LIB
) \
708 $(TCL_LIB
) $(NETBEANS_LIB
) $(XPM_LIB
) $(LINK_PDB
)
710 all: $(VIM
).exe vimrun.exe
install.exe uninstal.exe xxd
/xxd.exe \
713 $(VIM
).exe
: $(OUTDIR
) $(OBJ
) $(GUI_OBJ
) $(OLE_OBJ
) $(OLE_IDL
) $(MZSCHEME_OBJ
) \
714 $(PERL_OBJ
) $(PYTHON_OBJ
) $(RUBY_OBJ
) $(TCL_OBJ
) $(SNIFF_OBJ
) \
715 $(CSCOPE_OBJ
) $(NETBEANS_OBJ
) $(XPM_OBJ
) version.c version.h
716 $(CC
) $(CFLAGS
) version.c
717 $(link
) $(LINKARGS1
) -out
:$(VIM
).exe
$(OBJ
) $(GUI_OBJ
) $(OLE_OBJ
) \
718 $(MZSCHEME_OBJ
) $(PERL_OBJ
) $(PYTHON_OBJ
) $(RUBY_OBJ
) \
719 $(TCL_OBJ
) $(SNIFF_OBJ
) $(CSCOPE_OBJ
) $(NETBEANS_OBJ
) \
720 $(XPM_OBJ
) $(OUTDIR
)\version.obj
$(LINKARGS2
)
725 if not exist
$(OUTDIR
)/nul mkdir
$(OUTDIR
)
727 install.exe
: dosinst.c
728 $(CC
) /nologo
-DNDEBUG
-DWIN32 dosinst.c kernel32.lib shell32.lib \
729 ole32.lib advapi32.lib uuid.lib
730 - if exist
install.exe del
install.exe
731 ren dosinst.exe
install.exe
733 uninstal.exe
: uninstal.c
734 $(CC
) /nologo
-DNDEBUG
-DWIN32 uninstal.c shell32.lib advapi32.lib
737 $(CC
) /nologo
-DNDEBUG vimrun.c
739 xxd
/xxd.exe
: xxd
/xxd.c
741 $(MAKE
) /NOLOGO
-f Make_mvc.mak
744 GvimExt
/gvimext.dll
: GvimExt
/gvimext.
cpp GvimExt
/gvimext.rc GvimExt
/gvimext.h
746 $(MAKE
) /NOLOGO
-f Makefile
$(MAKEFLAGS_GVIMEXT
)
751 $(CTAGS
) *.c
*.
cpp *.h if_perl.xs proto\
*.pro
754 - if exist
tags del
tags
757 - if exist
$(OUTDIR
)/nul
$(DEL_TREE
) $(OUTDIR
)
758 - if exist
*.obj del
*.obj
759 - if exist
$(VIM
).exe del
$(VIM
).exe
760 - if exist
$(VIM
).ilk del
$(VIM
).ilk
761 - if exist
$(VIM
).pdb del
$(VIM
).pdb
762 - if exist
$(VIM
).map del
$(VIM
).map
763 - if exist
$(VIM
).ncb del
$(VIM
).ncb
764 - if exist vimrun.exe del vimrun.exe
765 - if exist
install.exe del
install.exe
766 - if exist uninstal.exe del uninstal.exe
767 - if exist if_perl.c del if_perl.c
768 - if exist dimm.h del dimm.h
769 - if exist dimm_i.c del dimm_i.c
770 - if exist dimm.tlb del dimm.tlb
771 - if exist dosinst.exe del dosinst.exe
773 $(MAKE
) /NOLOGO
-f Make_mvc.mak
clean
776 $(MAKE
) /NOLOGO
-f Makefile
clean
779 $(MAKE
) /NOLOGO
-f Makefile
clean
781 - if exist testdir\
*.out del testdir\
*.out
785 $(MAKE
) /NOLOGO
-f Make_dos.mak win32
790 $(MAKE
) /NOLOGO
-f Make_dos.mak
clean
793 ###########################################################################
795 # Create a default rule for transforming .c files to .obj files in $(OUTDIR)
796 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
797 !IF
"$(_NMAKE_VER)" == ""
804 # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
805 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
806 !IF
"$(_NMAKE_VER)" == ""
807 .
cpp{$(OUTDIR
)/}.obj
:
809 .
cpp{$(OUTDIR
)/}.obj
::
813 $(OUTDIR
)/buffer.obj
: $(OUTDIR
) buffer.c
$(INCL
)
815 $(OUTDIR
)/charset.obj
: $(OUTDIR
) charset.c
$(INCL
)
817 $(OUTDIR
)/diff.obj
: $(OUTDIR
) diff.c
$(INCL
)
819 $(OUTDIR
)/digraph.obj
: $(OUTDIR
) digraph.c
$(INCL
)
821 $(OUTDIR
)/edit.obj
: $(OUTDIR
) edit.c
$(INCL
)
823 $(OUTDIR
)/eval.obj
: $(OUTDIR
) eval.c
$(INCL
)
825 $(OUTDIR
)/ex_cmds.obj
: $(OUTDIR
) ex_cmds.c
$(INCL
)
827 $(OUTDIR
)/ex_cmds2.obj
: $(OUTDIR
) ex_cmds2.c
$(INCL
)
829 $(OUTDIR
)/ex_docmd.obj
: $(OUTDIR
) ex_docmd.c
$(INCL
) ex_cmds.h
831 $(OUTDIR
)/ex_eval.obj
: $(OUTDIR
) ex_eval.c
$(INCL
) ex_cmds.h
833 $(OUTDIR
)/ex_getln.obj
: $(OUTDIR
) ex_getln.c
$(INCL
)
835 $(OUTDIR
)/fileio.obj
: $(OUTDIR
) fileio.c
$(INCL
)
837 $(OUTDIR
)/fold.obj
: $(OUTDIR
) fold.c
$(INCL
)
839 $(OUTDIR
)/getchar.obj
: $(OUTDIR
) getchar.c
$(INCL
)
841 $(OUTDIR
)/hardcopy.obj
: $(OUTDIR
) hardcopy.c
$(INCL
)
843 $(OUTDIR
)/hashtab.obj
: $(OUTDIR
) hashtab.c
$(INCL
)
845 $(OUTDIR
)/gui.obj
: $(OUTDIR
) gui.c
$(INCL
) $(GUI_INCL
)
847 $(OUTDIR
)/gui_beval.obj
: $(OUTDIR
) gui_beval.c
$(INCL
) $(GUI_INCL
)
849 $(OUTDIR
)/gui_w32.obj
: $(OUTDIR
) gui_w32.c gui_w48.c
$(INCL
) $(GUI_INCL
)
851 $(OUTDIR
)/if_cscope.obj
: $(OUTDIR
) if_cscope.c
$(INCL
)
853 if_perl.c
: if_perl.xs typemap
854 $(PERL_EXE
) $(XSUBPP
) -prototypes
-typemap
$(XSUBPP_TYPEMAP
) \
855 -typemap typemap if_perl.xs
> if_perl.c
857 $(OUTDIR
)/if_perl.obj
: $(OUTDIR
) if_perl.c
$(INCL
)
858 $(CC
) $(CFLAGS
) $(PERL_INC
) if_perl.c
860 $(OUTDIR
)/if_perlsfio.obj
: $(OUTDIR
) if_perlsfio.c
$(INCL
)
861 $(CC
) $(CFLAGS
) $(PERL_INC
) if_perlsfio.c
863 $(OUTDIR
)/if_mzsch.obj
: $(OUTDIR
) if_mzsch.c
$(INCL
)
864 $(CC
) $(CFLAGS
) if_mzsch.c \
865 -DMZSCHEME_COLLECTS
=\"$(MZSCHEME
:\
=\\)\\collects
\"
867 $(OUTDIR
)/if_python.obj
: $(OUTDIR
) if_python.c
$(INCL
)
868 $(CC
) $(CFLAGS
) $(PYTHON_INC
) if_python.c
870 $(OUTDIR
)/if_ole.obj
: $(OUTDIR
) if_ole.
cpp $(INCL
) if_ole.h
872 $(OUTDIR
)/if_ruby.obj
: $(OUTDIR
) if_ruby.c
$(INCL
)
873 $(CC
) $(CFLAGS
) $(RUBY_INC
) if_ruby.c
875 $(OUTDIR
)/if_sniff.obj
: $(OUTDIR
) if_sniff.c
$(INCL
)
876 $(CC
) $(CFLAGS
) if_sniff.c
878 $(OUTDIR
)/if_tcl.obj
: $(OUTDIR
) if_tcl.c
$(INCL
)
879 $(CC
) $(CFLAGS
) $(TCL_INC
) if_tcl.c
881 $(OUTDIR
)/main.obj
: $(OUTDIR
) main.c
$(INCL
)
883 $(OUTDIR
)/mark.obj
: $(OUTDIR
) mark.c
$(INCL
)
885 $(OUTDIR
)/memfile.obj
: $(OUTDIR
) memfile.c
$(INCL
)
887 $(OUTDIR
)/memline.obj
: $(OUTDIR
) memline.c
$(INCL
)
889 $(OUTDIR
)/menu.obj
: $(OUTDIR
) menu.c
$(INCL
)
891 $(OUTDIR
)/message.obj
: $(OUTDIR
) message.c
$(INCL
)
893 $(OUTDIR
)/misc1.obj
: $(OUTDIR
) misc1.c
$(INCL
)
895 $(OUTDIR
)/misc2.obj
: $(OUTDIR
) misc2.c
$(INCL
)
897 $(OUTDIR
)/move.obj
: $(OUTDIR
) move.c
$(INCL
)
899 $(OUTDIR
)/mbyte.obj
: $(OUTDIR
) mbyte.c
$(INCL
)
901 $(OUTDIR
)/netbeans.obj
: $(OUTDIR
) netbeans.c
$(NBDEBUG_SRC
) $(INCL
)
903 $(OUTDIR
)/normal.obj
: $(OUTDIR
) normal.c
$(INCL
)
905 $(OUTDIR
)/option.obj
: $(OUTDIR
) option.c
$(INCL
)
907 $(OUTDIR
)/ops.obj
: $(OUTDIR
) ops.c
$(INCL
)
909 $(OUTDIR
)/os_mswin.obj
: $(OUTDIR
) os_mswin.c
$(INCL
)
911 $(OUTDIR
)/os_win32.obj
: $(OUTDIR
) os_win32.c
$(INCL
) os_win32.h
913 $(OUTDIR
)/os_w32exe.obj
: $(OUTDIR
) os_w32exe.c
$(INCL
)
915 $(OUTDIR
)/pathdef.obj
: $(OUTDIR
) $(PATHDEF_SRC
) $(INCL
)
916 $(CC
) $(CFLAGS
) $(PATHDEF_SRC
)
918 $(OUTDIR
)/popupmnu.obj
: $(OUTDIR
) popupmnu.c
$(INCL
)
920 $(OUTDIR
)/quickfix.obj
: $(OUTDIR
) quickfix.c
$(INCL
)
922 $(OUTDIR
)/regexp.obj
: $(OUTDIR
) regexp.c
$(INCL
)
924 $(OUTDIR
)/screen.obj
: $(OUTDIR
) screen.c
$(INCL
)
926 $(OUTDIR
)/search.obj
: $(OUTDIR
) search.c
$(INCL
)
928 $(OUTDIR
)/spell.obj
: $(OUTDIR
) spell.c
$(INCL
)
930 $(OUTDIR
)/syntax.obj
: $(OUTDIR
) syntax.c
$(INCL
)
932 $(OUTDIR
)/tag.obj
: $(OUTDIR
) tag.c
$(INCL
)
934 $(OUTDIR
)/term.obj
: $(OUTDIR
) term.c
$(INCL
)
936 $(OUTDIR
)/ui.obj
: $(OUTDIR
) ui.c
$(INCL
)
938 $(OUTDIR
)/undo.obj
: $(OUTDIR
) undo.c
$(INCL
)
940 $(OUTDIR
)/window.obj
: $(OUTDIR
) window.c
$(INCL
)
942 $(OUTDIR
)/xpm_w32.obj
: $(OUTDIR
) xpm_w32.c
943 $(CC
) $(CFLAGS
) $(XPM_INC
) xpm_w32.c
945 $(OUTDIR
)/vim.res
: $(OUTDIR
) vim.rc version.h tools.bmp tearoff.bmp \
946 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
947 $(RC
) /l
0x409 /Fo
$(OUTDIR
)/vim.res
$(RCFLAGS
) vim.rc
949 iid_ole.c if_ole.h vim.tlb
: if_ole.idl
950 midl
/nologo
/error none
/proxy nul
/iid iid_ole.c
/tlb vim.tlb \
951 /header if_ole.h if_ole.idl
953 dimm.h dimm_i.c
: dimm.idl
954 midl
/nologo
/error none
/proxy nul dimm.idl
956 $(OUTDIR
)/dimm_i.obj
: $(OUTDIR
) dimm_i.c
$(INCL
)
958 $(OUTDIR
)/glbl_ime.obj
: $(OUTDIR
) glbl_ime.
cpp dimm.h
$(INCL
)
960 # $CFLAGS may contain backslashes and double quotes, escape them both.
961 E0_CFLAGS
= $(CFLAGS
:\
=\\)
962 E_CFLAGS
= $(E0_CFLAGS
:"=\")
966 @echo creating
$(PATHDEF_SRC
)
967 @echo
/* pathdef.c
*/ > $(PATHDEF_SRC
)
968 @echo
#include "vim.h" >> $(PATHDEF_SRC)
969 @echo char_u
*default_vim_dir
= (char_u
*)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC
)
970 @echo char_u
*default_vimruntime_dir
= (char_u
*)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC
)
971 @echo char_u
*all_cflags = (char_u
*)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC
)
972 @echo char_u
*all_lflags
= (char_u
*)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC
)
973 @echo char_u
*compiled_user
= (char_u
*)"$(USERNAME)"; >> $(PATHDEF_SRC
)
974 @echo char_u
*compiled_sys
= (char_u
*)"$(USERDOMAIN)"; >> $(PATHDEF_SRC
)
977 if not exist auto
/nul mkdir auto
1009 proto
/os_mswin.pro \
1010 proto
/os_win32.pro \
1011 proto
/popupmnu.pro \
1012 proto
/quickfix.pro \
1027 # Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake
1030 $(CC
) $(CFLAGS
) /FAcs
$<
1032 # Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i"
1034 $(CC
) $(CFLAGS
) /P
/C
$<
1037 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: