1# Makefile for Vim on Win32 (Windows NT and Windows 95), using the 2# Microsoft Visual C++ 2.x and MSVC 4.x compilers (or newer). 3# It builds on Windows 95 and all four NT platforms: i386, Alpha, MIPS, and 4# PowerPC. The NT/i386 binary and the Windows 95 binary are identical. 5# 6# This makefile can build the console, GUI, OLE-enable, Perl-enabled and 7# Python-enabled versions of vim for Win32 platforms. 8# 9# When compiling different versions, do "nmake clean" first! 10# 11# The basic command line to build vim is: 12# nmake -f Make_mvc.mak 13# This will build the console version of vim with no additional interfaces. 14# To add interfaces, define any of the following: 15# GUI interface: GUI=yes (default is no) 16# OLE interface: OLE=yes (usually with GUI=yes) 17# Multibyte support: MBYTE=yes 18# IME support: IME=yes (requires GUI=yes) 19# DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default 20# is yes) 21# Global IME support: GIME=yes (requires GUI=yes) 22# Perl interface: 23# PERL=[Path to Perl directory] 24# DYNAMIC_PERL=yes (to load the Perl DLL dynamically) 25# PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc] (default is 56) 26# Python interface: 27# PYTHON=[Path to Python directory] 28# DYNAMIC_PYTHON=yes (to load the Python DLL dynamically) 29# PYTHON_VER=[Python version, eg 15, 20] (default is 22) 30# Ruby interface: 31# RUBY=[Path to Ruby directory] 32# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically) 33# RUBY_VER=[Ruby version, eg 16, 17] (default is 18) 34# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8) 35# You must set RUBY_VER_LONG when change RUBY_VER. 36# Tcl interface: 37# TCL=[Path to Tcl directory] 38# DYNAMIC_TCL=yes (to load the Tcl DLL dynamically) 39# TCL_VER=[Tcl version, e.g. 80, 83] (default is 83) 40# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3) 41# You must set TCL_VER_LONG when you set TCL_VER. 42# Debug version: DEBUG=yes 43# Mapfile: MAP=[no, yes or lines] (default is yes) 44# no: Don't write a mapfile. 45# yes: Write a normal mapfile. 46# lines: Write a mapfile with line numbers (only for VC6 and later) 47# SNiFF+ interface: SNIFF=yes 48# Cscope support: CSCOPE=yes 49# Iconv library support (always dynamically loaded): 50# ICONV=[yes or no] (default is yes) 51# Intl library support (always dynamically loaded): 52# GETTEXT=[yes or no] (default is yes) 53# See http://sourceforge.net/projects/gettext/ 54# PostScript printing: POSTSCRIPT=yes (default is no) 55# Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, or HUGE] (default is BIG) 56# Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400) 57# Processor Version: CPUNR=[i386, i486, i586, i686] (default is i386) 58# Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED) 59# Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes) 60# Netbeans Debugging Support: NBDEBUG=[yes or no] (default is no) 61# XPM Image Support: XPM=[path to XPM directory] 62# 63# You can combine any of these interfaces 64# 65# Example: To build the non-debug, GUI version with Perl interface: 66# nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl 67# 68# To build using Borland C++, use Make_bc3.mak or Make_bc5.mak. 69# 70# DEBUG with Make_mvc.mak and Make_dvc.mak: 71# This makefile gives a fineness of control which is not supported in 72# Visual C++ configuration files. Therefore, debugging requires a bit of 73# extra work. 74# Make_dvc.mak is a Visual C++ project to access that support. 75# To use Make_dvc.mak: 76# 1) Build Vim with Make_mvc.mak. 77# Use a "DEBUG=yes" argument to build Vim with debug support. 78# E.g. the following builds gvimd.exe: 79# nmake -f Make_mvc.mak debug=yes gui=yes 80# 2) Use MS Devstudio and set it up to allow that file to be debugged: 81# i) Pass Make_dvc.mak to the IDE. 82# Use the "open workspace" menu entry to load Make_dvc.mak. 83# Alternatively, from the command line: 84# msdev /nologo Make_dvc.mak 85# Note: Make_dvc.mak is in VC4.0 format. Later VC versions see 86# this and offer to convert it to their own format. Accept that. 87# It creates a file called Make_dvc.dsw which can then be used 88# for further operations. E.g. 89# msdev /nologo Make_dvc.dsw 90# ii) Set the built executable for debugging: 91# a) Alt+F7/Debug takes you to the Debug dialog. 92# b) Fill "Executable for debug session". e.g. gvimd.exe 93# c) Fill "Program arguments". e.g. -R dosinst.c 94# d) Complete the dialog 95# 3) You can now debug the executable you built with Make_mvc.mak 96# 97# Note: Make_dvc.mak builds vimrun.exe, because it must build something 98# to be a valid makefile.. 99 100### See feature.h for a list of optionals. 101# If you want to build some optional features without modifying the source, 102# you can set DEFINES on the command line, e.g., 103# nmake -f makefile.mvc "DEFINES=-DEMACS_TAGS" 104 105# Build on both Windows NT and Windows 95 106 107TARGETOS = BOTH 108 109# Select one of eight object code directories, depends on GUI, OLE and DEBUG. 110# If you change something else, do "make clean" first! 111!if "$(GUI)" == "yes" 112OBJDIR = .\ObjG 113!else 114OBJDIR = .\ObjC 115!endif 116!if "$(OLE)" == "yes" 117OBJDIR = $(OBJDIR)O 118!endif 119!if "$(DEBUG)" == "yes" 120OBJDIR = $(OBJDIR)d 121!endif 122 123# ntwin32.mak requires that CPU be set appropriately 124 125!ifdef PROCESSOR_ARCHITECTURE 126# We're on Windows NT or using VC 6 127CPU = $(PROCESSOR_ARCHITECTURE) 128! if "$(CPU)" == "x86" 129CPU = i386 130! endif 131!else # !PROCESSOR_ARCHITECTURE 132# We're on Windows 95 133CPU = i386 134!endif # !PROCESSOR_ARCHITECTURE 135 136 137# Build a retail version by default 138 139!if "$(DEBUG)" != "yes" 140NODEBUG = 1 141!else 142MAKEFLAGS_GVIMEXT = DEBUG=yes 143!endif 144 145 146# Build a multithreaded version for the Windows 95 dead keys hack 147# Commented out because it doesn't work. 148# MULTITHREADED = 1 149 150 151# Get all sorts of useful, standard macros from the SDK. (Note that 152# MSVC 2.2 does not install <ntwin32.mak> in the \msvc20\include 153# directory, but you can find it in \msvc20\include on the CD-ROM. 154# You may also need <win32.mak> from the same place.) 155 156!include <ntwin32.mak> 157 158 159#>>>>> path of the compiler and linker; name of include and lib directories 160# PATH = c:\msvc20\bin;$(PATH) 161# INCLUDE = c:\msvc20\include 162# LIB = c:\msvc20\lib 163 164!ifndef CTAGS 165CTAGS = ctags 166!endif 167 168!if "$(SNIFF)" == "yes" 169# SNIFF - Include support for SNiFF+. 170SNIFF_INCL = if_sniff.h 171SNIFF_OBJ = $(OBJDIR)/if_sniff.obj 172SNIFF_LIB = shell32.lib 173SNIFF_DEFS = -DFEAT_SNIFF 174# The SNiFF integration needs multithreaded libraries! 175MULTITHREADED = yes 176!endif 177 178!ifndef CSCOPE 179CSCOPE = yes 180!endif 181 182!if "$(CSCOPE)" == "yes" 183# CSCOPE - Include support for Cscope 184CSCOPE_INCL = if_cscope.h 185CSCOPE_OBJ = $(OBJDIR)/if_cscope.obj 186CSCOPE_DEFS = -DFEAT_CSCOPE 187!endif 188 189!ifndef NETBEANS 190NETBEANS = $(GUI) 191!endif 192 193# Only allow NETBEANS and XPM for a GUI build. 194!if "$(GUI)" == "yes" 195!if "$(NETBEANS)" == "yes" 196# NETBEANS - Include support for Netbeans integration 197NETBEANS_PRO = proto/netbeans.pro 198NETBEANS_OBJ = $(OBJDIR)/netbeans.obj $(OBJDIR)/gui_beval.obj 199NETBEANS_DEFS = -DFEAT_NETBEANS_INTG 200 201!if "$(NBDEBUG)" == "yes" 202NBDEBUG_DEFS = -DNBDEBUG 203NBDEBUG_INCL = nbdebug.h 204NBDEBUG_SRC = nbdebug.c 205!endif 206NETBEANS_LIB = WSock32.lib 207!endif 208 209!ifdef XPM 210# XPM - Include support for XPM signs 211# you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself 212XPM_OBJ = $(OBJDIR)/xpm_w32.obj 213XPM_DEFS = -DFEAT_XPM_W32 214XPM_LIB = $(XPM)\lib\libXpm.lib 215XPM_INC = -I $(XPM)\include 216!endif 217!endif 218 219!if defined(USE_MSVCRT) 220CVARS = $(cvarsdll) 221!elseif defined(MULTITHREADED) 222CVARS = $(cvarsmt) 223!else 224CVARS = $(cvars) 225!endif 226 227# need advapi32.lib for GetUserName() 228# need shell32.lib for ExtractIcon() 229# gdi32.lib and comdlg32.lib for printing support 230# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT 231CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib 232!if "$(VC6)" == "yes" 233CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib 234!endif 235 236### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET) 237# When set to 0x0500 ":browse" stops working. 238!ifndef WINVER 239WINVER = 0x0400 240!endif 241 242# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal 243# default, use these lines. 244#VIMRCLOC = somewhere 245#VIMRUNTIMEDIR = somewhere 246 247CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \ 248 $(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) \ 249 $(NBDEBUG_DEFS) $(XPM_DEFS) \ 250 $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) 251 252#>>>>> end of choices 253########################################################################### 254 255!ifdef OS 256OS_TYPE = winnt 257DEL_TREE = rmdir /s /q 258!else 259OS_TYPE = win95 260DEL_TREE = deltree /y 261!endif 262 263INTDIR=$(OBJDIR) 264OUTDIR=$(OBJDIR) 265 266# Convert processor ID to MVC-compatible number 267!if "$(CPUNR)" == "i386" 268CPUARG = /G3 269!elseif "$(CPUNR)" == "i486" 270CPUARG = /G4 271!elseif "$(CPUNR)" == "i586" 272CPUARG = /G5 273!elseif "$(CPUNR)" == "i686" 274CPUARG = /G6 275!else 276CPUARG = 277!endif 278 279!ifdef NODEBUG 280VIM = vim 281!if "$(OPTIMIZE)" == "SPACE" 282OPTFLAG = /O1 283!elseif "$(OPTIMIZE)" == "SPEED" 284OPTFLAG = /O2 285!else # MAXSPEED 286OPTFLAG = /Ox 287!endif 288CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG /Zi $(CPUARG) 289RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG 290PDB = /Fd$(OUTDIR)/ 291LINK_PDB = /PDB:$(OUTDIR)/ 292! ifdef USE_MSVCRT 293CFLAGS = $(CFLAGS) -MD 294LIBC = msvcrt.lib 295! elseif defined(MULTITHREADED) 296LIBC = libcmt.lib 297! else 298LIBC = libc.lib 299! endif 300!else # DEBUG 301VIM = vimd 302# MSVC 4.1 303PDB = /Fd$(OUTDIR)/ 304LINK_PDB = /PDB:$(OUTDIR)/ 305# MSVC 2.2 306# PDB = /Fd$(OUTDIR)/vim.pdb 307# LINK_PDB = /PDB:$(OUTDIR)/vim.pdb 308CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Zi /Od 309RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG 310# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0. 311! if "$(_NMAKE_VER)" == "" 312LIBC = 313! else 314LIBC = /fixed:no 315! endif 316 317! ifndef USE_MSVCRT 318LIBC = $(LIBC) libcd.lib 319! else 320CFLAGS = $(CFLAGS) -MDd 321LIBC = $(LIBC) msvcrtd.lib 322! endif 323!endif # DEBUG 324 325INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \ 326 proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \ 327 $(NBDEBUG_INCL) 328 329OBJ = \ 330 $(OUTDIR)\buffer.obj \ 331 $(OUTDIR)\charset.obj \ 332 $(OUTDIR)\diff.obj \ 333 $(OUTDIR)\digraph.obj \ 334 $(OUTDIR)\edit.obj \ 335 $(OUTDIR)\eval.obj \ 336 $(OUTDIR)\ex_cmds.obj \ 337 $(OUTDIR)\ex_cmds2.obj \ 338 $(OUTDIR)\ex_docmd.obj \ 339 $(OUTDIR)\ex_eval.obj \ 340 $(OUTDIR)\ex_getln.obj \ 341 $(OUTDIR)\fileio.obj \ 342 $(OUTDIR)\fold.obj \ 343 $(OUTDIR)\getchar.obj \ 344 $(OUTDIR)\main.obj \ 345 $(OUTDIR)\mark.obj \ 346 $(OUTDIR)\mbyte.obj \ 347 $(OUTDIR)\memfile.obj \ 348 $(OUTDIR)\memline.obj \ 349 $(OUTDIR)\menu.obj \ 350 $(OUTDIR)\message.obj \ 351 $(OUTDIR)\misc1.obj \ 352 $(OUTDIR)\misc2.obj \ 353 $(OUTDIR)\move.obj \ 354 $(OUTDIR)\normal.obj \ 355 $(OUTDIR)\ops.obj \ 356 $(OUTDIR)\option.obj \ 357 $(OUTDIR)\os_mswin.obj \ 358 $(OUTDIR)\os_win32.obj \ 359 $(OUTDIR)\pathdef.obj \ 360 $(OUTDIR)\quickfix.obj \ 361 $(OUTDIR)\regexp.obj \ 362 $(OUTDIR)\screen.obj \ 363 $(OUTDIR)\search.obj \ 364 $(OUTDIR)\syntax.obj \ 365 $(OUTDIR)\tag.obj \ 366 $(OUTDIR)\term.obj \ 367 $(OUTDIR)\ui.obj \ 368 $(OUTDIR)\undo.obj \ 369 $(OUTDIR)\window.obj \ 370 $(OUTDIR)\vim.res 371 372!if "$(OLE)" == "yes" 373CFLAGS = $(CFLAGS) -DFEAT_OLE 374RCFLAGS = $(RCFLAGS) -DFEAT_OLE 375OLE_OBJ = $(OUTDIR)\if_ole.obj 376OLE_IDL = if_ole.idl 377OLE_LIB = oleaut32.lib 378!endif 379 380!if "$(IME)" == "yes" 381CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME 382!ifndef DYNAMIC_IME 383DYNAMIC_IME = yes 384!endif 385!if "$(DYNAMIC_IME)" == "yes" 386CFLAGS = $(CFLAGS) -DDYNAMIC_IME 387!else 388IME_LIB = imm32.lib 389!endif 390!endif 391 392!if "$(GIME)" == "yes" 393CFLAGS = $(CFLAGS) -DGLOBAL_IME 394OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj 395MBYTE = yes 396!endif 397 398!if "$(MBYTE)" == "yes" 399CFLAGS = $(CFLAGS) -DFEAT_MBYTE 400!endif 401 402!if "$(GUI)" == "yes" 403SUBSYSTEM = windows 404CFLAGS = $(CFLAGS) -DFEAT_GUI_W32 405RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32 406VIM = g$(VIM) 407GUI_INCL = \ 408 gui.h \ 409 regexp.h \ 410 ascii.h \ 411 ex_cmds.h \ 412 farsi.h \ 413 feature.h \ 414 globals.h \ 415 keymap.h \ 416 macros.h \ 417 option.h \ 418 os_dos.h \ 419 os_win32.h 420GUI_OBJ = \ 421 $(OUTDIR)\gui.obj \ 422 $(OUTDIR)\gui_w32.obj \ 423 $(OUTDIR)\os_w32exe.obj 424GUI_LIB = \ 425 oldnames.lib kernel32.lib gdi32.lib $(IME_LIB) \ 426 winspool.lib comctl32.lib advapi32.lib shell32.lib \ 427 /machine:$(CPU) /nodefaultlib 428!else 429SUBSYSTEM = console 430!endif 431 432# iconv.dll library (dynamically loaded) 433!ifndef ICONV 434ICONV = yes 435!endif 436!if "$(ICONV)" == "yes" 437CFLAGS = $(CFLAGS) -DDYNAMIC_ICONV 438!endif 439 440# libintl.dll library 441!ifndef GETTEXT 442GETTEXT = yes 443!endif 444!if "$(GETTEXT)" == "yes" 445CFLAGS = $(CFLAGS) -DDYNAMIC_GETTEXT 446!endif 447 448# TCL interface 449!ifdef TCL 450!ifndef TCL_VER 451TCL_VER = 83 452TCL_VER_LONG = 8.3 453!endif 454!message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)" 455!if "$(DYNAMIC_TCL)" == "yes" 456!message Tcl DLL will be loaded dynamically 457TCL_DLL = tcl$(TCL_VER).dll 458CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\" 459TCL_OBJ = $(OUTDIR)\if_tcl.obj 460TCL_INC = /I "$(TCL)\Include" /I "$(TCL)" 461TCL_LIB = $(TCL)\lib\tclstub$(TCL_VER).lib 462!else 463CFLAGS = $(CFLAGS) -DFEAT_TCL 464TCL_OBJ = $(OUTDIR)\if_tcl.obj 465TCL_INC = /I "$(TCL)\Include" /I "$(TCL)" 466TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib 467!endif 468!endif 469 470# PYTHON interface 471!ifdef PYTHON 472!ifndef PYTHON_VER 473PYTHON_VER = 22 474!endif 475!message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)" 476!if "$(DYNAMIC_PYTHON)" == "yes" 477!message Python DLL will be loaded dynamically 478!endif 479CFLAGS = $(CFLAGS) -DFEAT_PYTHON 480PYTHON_OBJ = $(OUTDIR)\if_python.obj 481PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC" 482!if "$(DYNAMIC_PYTHON)" == "yes" 483CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" 484PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib 485!else 486PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib 487!endif 488!endif 489 490# Perl interface 491!ifdef PERL 492!ifndef PERL_VER 493PERL_VER = 56 494!endif 495!message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)" 496!if "$(DYNAMIC_PERL)" == "yes" 497!if $(PERL_VER) >= 56 498!message Perl DLL will be loaded dynamically 499!else 500!message Dynamic loading is not supported for Perl versions earlier than 5.6.0 501!message Reverting to static loading... 502!undef DYNAMIC_PERL 503!endif 504!endif 505 506# Is Perl installed in architecture-specific directories? 507!if exist($(PERL)\Bin\MSWin32-x86) 508PERL_ARCH = \MSWin32-x86 509!endif 510 511PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core 512 513# Version-dependent stuff 514!if $(PERL_VER) == 55 515PERL_LIB = $(PERL_INCDIR)\perl.lib 516!else 517PERL_DLL = perl$(PERL_VER).dll 518PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib 519!endif 520 521CFLAGS = $(CFLAGS) -DFEAT_PERL 522 523# Do we want to load Perl dynamically? 524!if "$(DYNAMIC_PERL)" == "yes" 525CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\" 526!undef PERL_LIB 527!endif 528 529PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl 530PERL_INC = /I $(PERL_INCDIR) 531PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj 532XSUBPP = $(PERL)\lib\ExtUtils\xsubpp 533XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap 534 535!endif 536 537# 538# Support Ruby interface 539# 540!ifdef RUBY 541# Set default value 542!ifndef RUBY_VER 543RUBY_VER = 18 544!endif 545!ifndef RUBY_VER_LONG 546RUBY_VER_LONG = 1.8 547!endif 548 549!if $(RUBY_VER) >= 18 550!ifndef RUBY_PLATFORM 551RUBY_PLATFORM = i386-mswin32 552!endif 553!ifndef RUBY_INSTALL_NAME 554RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER) 555!endif 556!else 557!ifndef RUBY_PLATFORM 558RUBY_PLATFORM = i586-mswin32 559!endif 560!ifndef RUBY_INSTALL_NAME 561RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) 562!endif 563!endif # $(RUBY_VER) >= 18 564 565!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)" 566CFLAGS = $(CFLAGS) -DFEAT_RUBY 567RUBY_OBJ = $(OUTDIR)\if_ruby.obj 568RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" 569RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib 570# Do we want to load Ruby dynamically? 571!if "$(DYNAMIC_RUBY)" == "yes" 572!message Ruby DLL will be loaded dynamically 573CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" -DDYNAMIC_RUBY_VER=$(RUBY_VER) 574!undef RUBY_LIB 575!endif 576!endif # RUBY 577 578# 579# Support PostScript printing 580# 581!if "$(POSTSCRIPT)" == "yes" 582CFLAGS = $(CFLAGS) -DMSWINPS 583!endif # POSTSCRIPT 584 585# 586# FEATURES: TINY, SMALL, NORMAL, BIG or HUGE 587# 588!if "$(FEATURES)"=="" 589FEATURES = BIG 590!endif 591CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES) 592 593# 594# End extra featuare include 595# 596!message 597 598conflags = /nologo /subsystem:$(SUBSYSTEM) /incremental:no 599 600!IF "$(MAP)" == "yes" 601# "/map" is for debugging 602conflags = $(conflags) /map 603!ELSEIF "$(MAP)" == "lines" 604# "/mapinfo:lines" is for debugging, only works for VC6 and later 605conflags = $(conflags) /map /mapinfo:lines 606!ENDIF 607 608LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc 609LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \ 610 $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) $(TCL_LIB) \ 611 $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB) 612 613all: $(VIM) vimrun.exe install.exe uninstal.exe xxd/xxd.exe GvimExt/gvimext.dll 614 615$(VIM): $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) version.c version.h 616 $(CC) $(CFLAGS) version.c /Fo$(OUTDIR)/version.obj $(PDB) 617 $(link) $(LINKARGS1) -out:$*.exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \ 618 $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \ 619 $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) \ 620 $(OUTDIR)\version.obj $(LINKARGS2) 621 622$(VIM).exe: $(VIM) 623 624$(OUTDIR): 625 if not exist $(OUTDIR)/nul mkdir $(OUTDIR) 626 627install.exe: dosinst.c 628 $(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib ole32.lib advapi32.lib uuid.lib 629 - if exist install.exe del install.exe 630 ren dosinst.exe install.exe 631 632uninstal.exe: uninstal.c 633 $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib 634 635vimrun.exe: vimrun.c 636 $(CC) /nologo -DNDEBUG vimrun.c 637 638xxd/xxd.exe: xxd/xxd.c 639 cd xxd 640 $(MAKE) /NOLOGO -f Make_mvc.mak 641 cd .. 642 643GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h 644 cd GvimExt 645 $(MAKE) /NOLOGO -f Makefile $(MAKEFLAGS_GVIMEXT) 646 cd .. 647 648 649tags: notags 650 $(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro 651 652notags: 653 - if exist tags del tags 654 655clean: 656 - $(DEL_TREE) $(OUTDIR) auto 657 - if exist *.obj del *.obj 658 - if exist $(VIM).exe del $(VIM).exe 659 - if exist $(VIM).ilk del $(VIM).ilk 660 - if exist $(VIM).pdb del $(VIM).pdb 661 - if exist $(VIM).map del $(VIM).map 662 - if exist $(VIM).ncb del $(VIM).ncb 663 - if exist vimrun.exe del vimrun.exe 664 - if exist install.exe del install.exe 665 - if exist uninstal.exe del uninstal.exe 666 - if exist if_perl.c del if_perl.c 667 - if exist dimm.h del dimm.h 668 - if exist dimm_i.c del dimm_i.c 669 - if exist dimm.tlb del dimm.tlb 670 - if exist dosinst.exe del dosinst.exe 671 cd xxd 672 $(MAKE) /NOLOGO -f Make_mvc.mak clean 673 cd .. 674 cd GvimExt 675 $(MAKE) /NOLOGO -f Makefile clean 676 cd .. 677 cd GvimExt 678 $(MAKE) /NOLOGO -f Makefile clean 679 cd .. 680 - if exist testdir\*.out del testdir\*.out 681 682test: 683 cd testdir 684 $(MAKE) /NOLOGO -f Make_dos.mak win32 685 cd .. 686 687########################################################################### 688 689# Create a default rule for transforming .c files to .obj files in $(OUTDIR) 690# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later) 691!IF "$(_NMAKE_VER)" == "" 692.c{$(OUTDIR)/}.obj: 693!ELSE 694.c{$(OUTDIR)/}.obj:: 695!ENDIF 696 $(CC) $(CFLAGS) /Fo$(OUTDIR)/ $(PDB) $< 697 698# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR) 699# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later) 700!IF "$(_NMAKE_VER)" == "" 701.cpp{$(OUTDIR)/}.obj: 702!ELSE 703.cpp{$(OUTDIR)/}.obj:: 704!ENDIF 705 $(CC) $(CFLAGS) /Fo$(OUTDIR)/ $(PDB) $< 706 707$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL) 708 709$(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL) 710 711$(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL) 712 713$(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL) 714 715$(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL) 716 717$(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL) 718 719$(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL) 720 721$(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL) 722 723$(OUTDIR)/ex_docmd.obj: $(OUTDIR) ex_docmd.c $(INCL) ex_cmds.h 724 725$(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h 726 727$(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL) 728 729$(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL) 730 731$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL) 732 733$(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL) 734 735$(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL) 736 737$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL) 738 739$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL) 740 741if_perl.c : if_perl.xs typemap 742 $(PERL_EXE) $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) -typemap typemap if_perl.xs > if_perl.c 743 744$(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL) 745 $(CC) $(CFLAGS) $(PERL_INC) if_perl.c /Fo$(OUTDIR)/if_perl.obj $(PDB) 746 747$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL) 748 $(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c /Fo$(OUTDIR)/if_perlsfio.obj $(PDB) 749 750$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c $(INCL) 751 $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c /Fo$(OUTDIR)/if_python.obj $(PDB) 752 753$(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h 754 755$(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL) 756 $(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c /Fo$(OUTDIR)/if_ruby.obj $(PDB) 757 758$(OUTDIR)/if_sniff.obj: $(OUTDIR) if_sniff.c $(INCL) 759 $(CC) $(CFLAGS) if_sniff.c /Fo$(OUTDIR)/if_sniff.obj $(PDB) 760 761$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL) 762 $(CC) $(CFLAGS) $(TCL_INC) if_tcl.c /Fo$(OUTDIR)/if_tcl.obj $(PDB) 763 764$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL) 765 766$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL) 767 768$(OUTDIR)/memfile.obj: $(OUTDIR) memfile.c $(INCL) 769 770$(OUTDIR)/memline.obj: $(OUTDIR) memline.c $(INCL) 771 772$(OUTDIR)/menu.obj: $(OUTDIR) menu.c $(INCL) 773 774$(OUTDIR)/message.obj: $(OUTDIR) message.c $(INCL) 775 776$(OUTDIR)/misc1.obj: $(OUTDIR) misc1.c $(INCL) 777 778$(OUTDIR)/misc2.obj: $(OUTDIR) misc2.c $(INCL) 779 780$(OUTDIR)/move.obj: $(OUTDIR) move.c $(INCL) 781 782$(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL) 783 784$(OUTDIR)/netbeans.obj: $(OUTDIR) netbeans.c $(NBDEBUG_SRC) $(INCL) 785 786$(OUTDIR)/normal.obj: $(OUTDIR) normal.c $(INCL) 787 788$(OUTDIR)/option.obj: $(OUTDIR) option.c $(INCL) 789 790$(OUTDIR)/ops.obj: $(OUTDIR) ops.c $(INCL) 791 792$(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL) 793 794$(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h 795 796$(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL) 797 798$(OUTDIR)/pathdef.obj: $(OUTDIR) auto/pathdef.c $(INCL) 799 $(CC) $(CFLAGS) auto/pathdef.c /Fo$(OUTDIR)/pathdef.obj $(PDB) 800 801$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL) 802 803$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c $(INCL) 804 805$(OUTDIR)/screen.obj: $(OUTDIR) screen.c $(INCL) 806 807$(OUTDIR)/search.obj: $(OUTDIR) search.c $(INCL) 808 809$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL) 810 811$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL) 812 813$(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL) 814 815$(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL) 816 817$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL) 818 819$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL) 820 821$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c 822 $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c /Fo$(OUTDIR)/xpm_w32.obj $(PDB) 823 824$(OUTDIR)/vim.res: $(OUTDIR) vim.rc version.h tools.bmp tearoff.bmp vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico 825 $(RC) /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc 826 827iid_ole.c if_ole.h vim.tlb: if_ole.idl $(INTDIR) $(OUTDIR) 828 midl /nologo /proxy nul /iid iid_ole.c /tlb vim.tlb /header if_ole.h if_ole.idl 829 830dimm.h dimm_i.c: dimm.idl 831 midl /nologo /proxy nul dimm.idl 832 833$(OUTDIR)/dimm_i.obj: $(OUTDIR) dimm_i.c $(INCL) 834 835$(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL) 836 837auto/pathdef.c: auto 838 @echo creating auto/pathdef.c 839 @echo /* pathdef.c */ > auto\pathdef.c 840 @echo #include "vim.h" >> auto\pathdef.c 841 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> auto\pathdef.c 842 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> auto\pathdef.c 843 @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS)"; >> auto\pathdef.c 844 @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> auto\pathdef.c 845 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> auto\pathdef.c 846 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> auto\pathdef.c 847 848auto: 849 if not exist auto/nul mkdir auto 850 851# End Custom Build 852proto.h: \ 853 proto/buffer.pro \ 854 proto/charset.pro \ 855 proto/diff.pro \ 856 proto/digraph.pro \ 857 proto/edit.pro \ 858 proto/eval.pro \ 859 proto/ex_cmds.pro \ 860 proto/ex_cmds2.pro \ 861 proto/ex_docmd.pro \ 862 proto/ex_eval.pro \ 863 proto/ex_getln.pro \ 864 proto/fileio.pro \ 865 proto/getchar.pro \ 866 proto/main.pro \ 867 proto/mark.pro \ 868 proto/memfile.pro \ 869 proto/memline.pro \ 870 proto/menu.pro \ 871 proto/message.pro \ 872 proto/misc1.pro \ 873 proto/misc2.pro \ 874 proto/move.pro \ 875 proto/mbyte.pro \ 876 proto/normal.pro \ 877 proto/ops.pro \ 878 proto/option.pro \ 879 proto/os_mswin.pro \ 880 proto/os_win32.pro \ 881 proto/quickfix.pro \ 882 proto/regexp.pro \ 883 proto/screen.pro \ 884 proto/search.pro \ 885 proto/syntax.pro \ 886 proto/tag.pro \ 887 proto/term.pro \ 888 proto/ui.pro \ 889 proto/undo.pro \ 890 proto/window.pro \ 891 $(NETBEANS_PRO) 892 893# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: 894