Mercurial > vim
comparison src/Make_mvc.mak @ 1569:9fbb40a1228a v7.1.282
updated for version 7.1-282
author | vimboss |
---|---|
date | Sun, 16 Mar 2008 13:54:13 +0000 |
parents | 7e5284f58094 |
children | b9740fb41986 |
comparison
equal
deleted
inserted
replaced
1568:4e581f1b08da | 1569:9fbb40a1228a |
---|---|
1 # Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me) | 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 | 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). | 3 # VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005), |
4 # and VC9 (VS2008). | |
4 # | 5 # |
5 # To build using other Windows compilers, see INSTALLpc.txt | 6 # To build using other Windows compilers, see INSTALLpc.txt |
6 # | 7 # |
7 # This makefile can build the console, GUI, OLE-enable, Perl-enabled and | 8 # This makefile can build the console, GUI, OLE-enable, Perl-enabled and |
8 # Python-enabled versions of vim for Win32 platforms. | 9 # Python-enabled versions of vim for Win32 platforms. |
283 | 284 |
284 # need advapi32.lib for GetUserName() | 285 # need advapi32.lib for GetUserName() |
285 # need shell32.lib for ExtractIcon() | 286 # need shell32.lib for ExtractIcon() |
286 # gdi32.lib and comdlg32.lib for printing support | 287 # gdi32.lib and comdlg32.lib for printing support |
287 # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT | 288 # 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 CON_LIB = oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \ |
290 comdlg32.lib ole32.lib uuid.lib /machine:$(CPU) /nodefaultlib | |
289 !if "$(DELAYLOAD)" == "yes" | 291 !if "$(DELAYLOAD)" == "yes" |
290 CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib | 292 CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib |
291 !endif | 293 !endif |
292 | 294 |
293 ### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET) | 295 ### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET) |
329 !if "$(_NMAKE_VER)" == "162" | 331 !if "$(_NMAKE_VER)" == "162" |
330 MSVCVER = 5.0 | 332 MSVCVER = 5.0 |
331 !endif | 333 !endif |
332 !if "$(_NMAKE_VER)" == "6.00.8168.0" | 334 !if "$(_NMAKE_VER)" == "6.00.8168.0" |
333 MSVCVER = 6.0 | 335 MSVCVER = 6.0 |
336 CPU = ix86 | |
334 !endif | 337 !endif |
335 !if "$(_NMAKE_VER)" == "7.00.9466" | 338 !if "$(_NMAKE_VER)" == "7.00.9466" |
336 MSVCVER = 7.0 | 339 MSVCVER = 7.0 |
337 !endif | 340 !endif |
338 !if "$(_NMAKE_VER)" == "7.10.3077" | 341 !if "$(_NMAKE_VER)" == "7.10.3077" |
341 !if "$(_NMAKE_VER)" == "8.00.50727.42" | 344 !if "$(_NMAKE_VER)" == "8.00.50727.42" |
342 MSVCVER = 8.0 | 345 MSVCVER = 8.0 |
343 !endif | 346 !endif |
344 !if "$(_NMAKE_VER)" == "8.00.50727.762" | 347 !if "$(_NMAKE_VER)" == "8.00.50727.762" |
345 MSVCVER = 8.0 | 348 MSVCVER = 8.0 |
349 !endif | |
350 !if "$(_NMAKE_VER)" == "9.00.20706.01" | |
351 MSVCVER = 9.0 | |
346 !endif | 352 !endif |
347 !endif | 353 !endif |
348 | 354 |
349 # Abort bulding VIM if version of VC is unrecognised. | 355 # Abort bulding VIM if version of VC is unrecognised. |
350 !ifndef MSVCVER | 356 !ifndef MSVCVER |
351 !message *** ERROR | 357 !message *** ERROR |
352 !message Cannot determine Visual C version being used. If you are using the | 358 !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 | 359 !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 | 360 !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 | 361 !message version of Visual C, you can either set MSVCVER or update this makefile |
356 !message to handle the new value for _NMAKE_VER. | 362 !message to handle the new value for _NMAKE_VER, "$(_NMAKE_VER)". |
357 !error Make aborted. | 363 !error Make aborted. |
358 !endif | 364 !endif |
359 | 365 |
360 # Convert processor ID to MVC-compatible number | 366 # Convert processor ID to MVC-compatible number |
361 !if "$(MSVCVER)" != "8.0" | 367 !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") |
362 !if "$(CPUNR)" == "i386" | 368 !if "$(CPUNR)" == "i386" |
363 CPUARG = /G3 | 369 CPUARG = /G3 |
364 !elseif "$(CPUNR)" == "i486" | 370 !elseif "$(CPUNR)" == "i486" |
365 CPUARG = /G4 | 371 CPUARG = /G4 |
366 !elseif "$(CPUNR)" == "i586" | 372 !elseif "$(CPUNR)" == "i586" |
371 CPUARG = /G7 /arch:SSE2 | 377 CPUARG = /G7 /arch:SSE2 |
372 !else | 378 !else |
373 CPUARG = | 379 CPUARG = |
374 !endif | 380 !endif |
375 !else | 381 !else |
376 # VC8 only allows specifying SSE architecture | 382 # VC8/9 only allows specifying SSE architecture |
377 !if "$(CPUNR)" == "pentium4" | 383 !if "$(CPUNR)" == "pentium4" |
378 CPUARG = /arch:SSE2 | 384 CPUARG = /arch:SSE2 |
379 !endif | 385 !endif |
380 !endif | 386 !endif |
381 | 387 |
389 !elseif "$(OPTIMIZE)" == "SPEED" | 395 !elseif "$(OPTIMIZE)" == "SPEED" |
390 OPTFLAG = /O2 | 396 OPTFLAG = /O2 |
391 !else # MAXSPEED | 397 !else # MAXSPEED |
392 OPTFLAG = /Ox | 398 OPTFLAG = /Ox |
393 !endif | 399 !endif |
394 !if "$(MSVCVER)" == "8.0" | 400 !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") |
395 # Use link time code generation if not worried about size | 401 # Use link time code generation if not worried about size |
396 !if "$(OPTIMIZE)" != "SPACE" | 402 !if "$(OPTIMIZE)" != "SPACE" |
397 OPTFLAG = $(OPTFLAG) /GL | 403 OPTFLAG = $(OPTFLAG) /GL |
398 !endif | 404 !endif |
399 !endif | 405 !endif |
402 ! ifdef USE_MSVCRT | 408 ! ifdef USE_MSVCRT |
403 CFLAGS = $(CFLAGS) /MD | 409 CFLAGS = $(CFLAGS) /MD |
404 LIBC = msvcrt.lib | 410 LIBC = msvcrt.lib |
405 ! else | 411 ! else |
406 LIBC = libcmt.lib | 412 LIBC = libcmt.lib |
407 CFLAGS = $(CFLAGS) /MT | 413 CFLAGS = $(CFLAGS) /Zl /MT |
408 ! endif | 414 ! endif |
409 !else # DEBUG | 415 !else # DEBUG |
410 VIM = vimd | 416 VIM = vimd |
411 ! if "$(CPU)" == "i386" | 417 ! if ("$(CPU)" == "i386") || ("$(CPU)" == "ix86") |
412 DEBUGINFO = /ZI | 418 DEBUGINFO = /ZI |
413 ! endif | 419 ! endif |
414 CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od | 420 CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od |
415 RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG | 421 RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG |
416 # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0. | 422 # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0. |
422 ! ifdef USE_MSVCRT | 428 ! ifdef USE_MSVCRT |
423 CFLAGS = $(CFLAGS) /MDd | 429 CFLAGS = $(CFLAGS) /MDd |
424 LIBC = $(LIBC) msvcrtd.lib | 430 LIBC = $(LIBC) msvcrtd.lib |
425 ! else | 431 ! else |
426 LIBC = $(LIBC) libcmtd.lib | 432 LIBC = $(LIBC) libcmtd.lib |
427 CFLAGS = $(CFLAGS) /MTd | 433 CFLAGS = $(CFLAGS) /Zl /MTd |
428 ! endif | 434 ! endif |
429 !endif # DEBUG | 435 !endif # DEBUG |
430 | 436 |
431 INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \ | 437 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) \ | 438 proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \ |
532 $(OUTDIR)\gui.obj \ | 538 $(OUTDIR)\gui.obj \ |
533 $(OUTDIR)\gui_beval.obj \ | 539 $(OUTDIR)\gui_beval.obj \ |
534 $(OUTDIR)\gui_w32.obj \ | 540 $(OUTDIR)\gui_w32.obj \ |
535 $(OUTDIR)\os_w32exe.obj | 541 $(OUTDIR)\os_w32exe.obj |
536 GUI_LIB = \ | 542 GUI_LIB = \ |
537 oldnames.lib kernel32.lib gdi32.lib version.lib $(IME_LIB) \ | 543 gdi32.lib version.lib $(IME_LIB) \ |
538 winspool.lib comctl32.lib advapi32.lib shell32.lib \ | 544 winspool.lib comctl32.lib advapi32.lib shell32.lib \ |
539 /machine:$(CPU) /nodefaultlib | 545 /machine:$(CPU) /nodefaultlib |
540 !else | 546 !else |
541 SUBSYSTEM = console | 547 SUBSYSTEM = console |
542 !endif | 548 !endif |
755 $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \ | 761 $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \ |
756 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB) | 762 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB) |
757 | 763 |
758 # Report link time code generation progress if used. | 764 # Report link time code generation progress if used. |
759 !ifdef NODEBUG | 765 !ifdef NODEBUG |
760 !if "$(MSVCVER)" == "8.0" | 766 !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") |
761 !if "$(OPTIMIZE)" != "SPACE" | 767 !if "$(OPTIMIZE)" != "SPACE" |
762 LINKARGS1 = $(LINKARGS1) /LTCG:STATUS | 768 LINKARGS1 = $(LINKARGS1) /LTCG:STATUS |
763 !endif | 769 !endif |
764 !endif | 770 !endif |
765 !endif | 771 !endif |