Bram Moolenaar | eb3593b | 2006-04-22 22:33:57 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 3 | # VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005), |
Bram Moolenaar | 6f586de | 2012-09-18 22:00:08 +0200 | [diff] [blame] | 4 | # VC9 (VS2008), VC10 (VS2010) and VC11 (VS2012) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 5 | # |
Bram Moolenaar | eb3593b | 2006-04-22 22:33:57 +0000 | [diff] [blame] | 6 | # To build using other Windows compilers, see INSTALLpc.txt |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 7 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 8 | # This makefile can build the console, GUI, OLE-enable, Perl-enabled and |
Bram Moolenaar | da2f99a | 2009-06-16 14:34:38 +0000 | [diff] [blame] | 9 | # Python-enabled versions of Vim for Win32 platforms. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 10 | # |
Bram Moolenaar | da2f99a | 2009-06-16 14:34:38 +0000 | [diff] [blame] | 11 | # The basic command line to build Vim is: |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 12 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 13 | # nmake -f Make_mvc.mak |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 14 | # |
Bram Moolenaar | da2f99a | 2009-06-16 14:34:38 +0000 | [diff] [blame] | 15 | # This will build the console version of Vim with no additional interfaces. |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 16 | # To add features, define any of the following: |
| 17 | # |
Bram Moolenaar | 6f586de | 2012-09-18 22:00:08 +0200 | [diff] [blame] | 18 | # For MSVC 11 you need to specify where the Win32.mak file is, e.g.: |
| 19 | # SDK_INCLUDE_DIR="C:\Program Files\Microsoft SDKs\Windows\v7.1\Include" |
| 20 | # |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 21 | # !!!! After changing features do "nmake clean" first !!!! |
| 22 | # |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 23 | # Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is BIG) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 24 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 25 | # GUI interface: GUI=yes (default is no) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 26 | # |
Bram Moolenaar | b5a7a8b | 2014-08-06 14:52:30 +0200 | [diff] [blame] | 27 | # GUI with DirectWrite(DirectX): DIRECTX=yes |
| 28 | # (default is no, requires GUI=yes) |
| 29 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 30 | # OLE interface: OLE=yes (usually with GUI=yes) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 31 | # |
Bram Moolenaar | a83c3e0 | 2006-03-17 23:10:44 +0000 | [diff] [blame] | 32 | # Multibyte support: MBYTE=yes (default is no) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 33 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 34 | # IME support: IME=yes (requires GUI=yes) |
| 35 | # DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default |
| 36 | # is yes) |
| 37 | # Global IME support: GIME=yes (requires GUI=yes) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 38 | # |
Bram Moolenaar | 0ba0429 | 2010-07-14 23:23:17 +0200 | [diff] [blame] | 39 | # Lua interface: |
| 40 | # LUA=[Path to Lua directory] |
| 41 | # DYNAMIC_LUA=yes (to load the Lua DLL dynamically) |
| 42 | # LUA_VER=[Lua version] (default is 51) |
| 43 | # |
Bram Moolenaar | 65c1b01 | 2005-01-31 19:02:28 +0000 | [diff] [blame] | 44 | # MzScheme interface: |
| 45 | # MZSCHEME=[Path to MzScheme directory] |
| 46 | # DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically) |
| 47 | # MZSCHEME_VER=[version, 205_000, ...] |
Bram Moolenaar | 9e70cf1 | 2009-05-26 20:59:55 +0000 | [diff] [blame] | 48 | # MZSCHEME_DEBUG=no |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 49 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 50 | # Perl interface: |
| 51 | # PERL=[Path to Perl directory] |
| 52 | # DYNAMIC_PERL=yes (to load the Perl DLL dynamically) |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 53 | # PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), |
| 54 | # 510 (5.10.x), etc] |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 55 | # (default is 56) |
| 56 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 57 | # Python interface: |
| 58 | # PYTHON=[Path to Python directory] |
| 59 | # DYNAMIC_PYTHON=yes (to load the Python DLL dynamically) |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 60 | # PYTHON_VER=[Python version, eg 22, 23, ..., 27] (default is 22) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 61 | # |
Bram Moolenaar | bd5e15f | 2010-07-17 21:19:38 +0200 | [diff] [blame] | 62 | # Python3 interface: |
| 63 | # PYTHON3=[Path to Python3 directory] |
| 64 | # DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically) |
| 65 | # PYTHON3_VER=[Python3 version, eg 30, 31] (default is 31) |
| 66 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 67 | # Ruby interface: |
| 68 | # RUBY=[Path to Ruby directory] |
| 69 | # DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically) |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 70 | # RUBY_VER=[Ruby version, eg 18, 19, 20] (default is 18) |
| 71 | # RUBY_VER_LONG=[Ruby version, eg 1.8, 1.9.1, 2.0.0] (default is 1.8) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 72 | # You must set RUBY_VER_LONG when change RUBY_VER. |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 73 | # RUBY_API_VER is derived from RUBY_VER_LONG. |
| 74 | # Note: If you use Ruby 1.9.3, set as follows: |
| 75 | # RUBY_VER=19 |
| 76 | # RUBY_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 77 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 78 | # Tcl interface: |
| 79 | # TCL=[Path to Tcl directory] |
| 80 | # DYNAMIC_TCL=yes (to load the Tcl DLL dynamically) |
| 81 | # TCL_VER=[Tcl version, e.g. 80, 83] (default is 83) |
| 82 | # TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3) |
| 83 | # You must set TCL_VER_LONG when you set TCL_VER. |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 84 | # |
| 85 | # SNiFF+ interface: SNIFF=yes |
| 86 | # |
| 87 | # Cscope support: CSCOPE=yes |
| 88 | # |
| 89 | # Iconv library support (always dynamically loaded): |
| 90 | # ICONV=[yes or no] (default is yes) |
| 91 | # |
| 92 | # Intl library support (always dynamically loaded): |
| 93 | # GETTEXT=[yes or no] (default is yes) |
| 94 | # See http://sourceforge.net/projects/gettext/ |
| 95 | # |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 96 | # PostScript printing: POSTSCRIPT=yes (default is no) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 97 | # |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 98 | # Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 99 | # |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 100 | # XPM Image Support: XPM=[path to XPM directory] |
| 101 | # Default is "xpm", using the files included in the distribution. |
| 102 | # Use "no" to disable this feature. |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 103 | # |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 104 | # Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 105 | # |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 106 | # Processor Version: CPUNR=[i386, i486, i586, i686, pentium4] (default is |
| 107 | # i386) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 108 | # |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 109 | # Version Support: WINVER=[0x0400, 0x0500] (default is 0x0400) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 110 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 111 | # Debug version: DEBUG=yes |
| 112 | # Mapfile: MAP=[no, yes or lines] (default is yes) |
| 113 | # no: Don't write a mapfile. |
| 114 | # yes: Write a normal mapfile. |
| 115 | # lines: Write a mapfile with line numbers (only for VC6 and later) |
Bram Moolenaar | 7887d88 | 2005-07-01 22:33:52 +0000 | [diff] [blame] | 116 | # |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 117 | # Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes |
| 118 | # doesn't work) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 119 | # |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 120 | # Static Code Analysis: ANALYZE=yes (works with VS2012 only) |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 121 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 122 | # You can combine any of these interfaces |
| 123 | # |
| 124 | # Example: To build the non-debug, GUI version with Perl interface: |
| 125 | # nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl |
| 126 | # |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 127 | # DEBUG with Make_mvc.mak and Make_dvc.mak: |
| 128 | # This makefile gives a fineness of control which is not supported in |
| 129 | # Visual C++ configuration files. Therefore, debugging requires a bit of |
| 130 | # extra work. |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 131 | # Make_dvc.mak is a Visual C++ project to access that support. It may be |
| 132 | # badly out of date for the Visual C++ you are using... |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 133 | # To use Make_dvc.mak: |
| 134 | # 1) Build Vim with Make_mvc.mak. |
| 135 | # Use a "DEBUG=yes" argument to build Vim with debug support. |
| 136 | # E.g. the following builds gvimd.exe: |
| 137 | # nmake -f Make_mvc.mak debug=yes gui=yes |
| 138 | # 2) Use MS Devstudio and set it up to allow that file to be debugged: |
| 139 | # i) Pass Make_dvc.mak to the IDE. |
| 140 | # Use the "open workspace" menu entry to load Make_dvc.mak. |
| 141 | # Alternatively, from the command line: |
| 142 | # msdev /nologo Make_dvc.mak |
| 143 | # Note: Make_dvc.mak is in VC4.0 format. Later VC versions see |
| 144 | # this and offer to convert it to their own format. Accept that. |
| 145 | # It creates a file called Make_dvc.dsw which can then be used |
| 146 | # for further operations. E.g. |
| 147 | # msdev /nologo Make_dvc.dsw |
| 148 | # ii) Set the built executable for debugging: |
| 149 | # a) Alt+F7/Debug takes you to the Debug dialog. |
| 150 | # b) Fill "Executable for debug session". e.g. gvimd.exe |
| 151 | # c) Fill "Program arguments". e.g. -R dosinst.c |
| 152 | # d) Complete the dialog |
| 153 | # 3) You can now debug the executable you built with Make_mvc.mak |
| 154 | # |
| 155 | # Note: Make_dvc.mak builds vimrun.exe, because it must build something |
| 156 | # to be a valid makefile.. |
| 157 | |
| 158 | ### See feature.h for a list of optionals. |
| 159 | # If you want to build some optional features without modifying the source, |
| 160 | # you can set DEFINES on the command line, e.g., |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 161 | # nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 162 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 163 | # Build on both Windows NT/XP and Windows 9x |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 164 | |
| 165 | TARGETOS = BOTH |
| 166 | |
Bram Moolenaar | 9ba0eb8 | 2005-06-13 22:28:56 +0000 | [diff] [blame] | 167 | # Select one of eight object code directories, depends on GUI, OLE, DEBUG and |
| 168 | # interfaces. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 169 | # If you change something else, do "make clean" first! |
| 170 | !if "$(GUI)" == "yes" |
| 171 | OBJDIR = .\ObjG |
| 172 | !else |
| 173 | OBJDIR = .\ObjC |
| 174 | !endif |
Bram Moolenaar | b5a7a8b | 2014-08-06 14:52:30 +0200 | [diff] [blame] | 175 | !if "$(DIRECTX)" == "yes" |
| 176 | OBJDIR = $(OBJDIR)X |
| 177 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 178 | !if "$(OLE)" == "yes" |
| 179 | OBJDIR = $(OBJDIR)O |
| 180 | !endif |
Bram Moolenaar | 0ba0429 | 2010-07-14 23:23:17 +0200 | [diff] [blame] | 181 | !ifdef LUA |
| 182 | OBJDIR = $(OBJDIR)U |
| 183 | !endif |
Bram Moolenaar | 9ba0eb8 | 2005-06-13 22:28:56 +0000 | [diff] [blame] | 184 | !ifdef PERL |
| 185 | OBJDIR = $(OBJDIR)L |
| 186 | !endif |
| 187 | !ifdef PYTHON |
| 188 | OBJDIR = $(OBJDIR)Y |
| 189 | !endif |
Bram Moolenaar | bd5e15f | 2010-07-17 21:19:38 +0200 | [diff] [blame] | 190 | !ifdef PYTHON3 |
| 191 | OBJDIR = $(OBJDIR)H |
| 192 | !endif |
Bram Moolenaar | 9ba0eb8 | 2005-06-13 22:28:56 +0000 | [diff] [blame] | 193 | !ifdef TCL |
| 194 | OBJDIR = $(OBJDIR)T |
| 195 | !endif |
| 196 | !ifdef RUBY |
| 197 | OBJDIR = $(OBJDIR)R |
| 198 | !endif |
Bram Moolenaar | 325b7a2 | 2004-07-05 15:58:32 +0000 | [diff] [blame] | 199 | !ifdef MZSCHEME |
| 200 | OBJDIR = $(OBJDIR)Z |
| 201 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 202 | !if "$(DEBUG)" == "yes" |
| 203 | OBJDIR = $(OBJDIR)d |
| 204 | !endif |
| 205 | |
Bram Moolenaar | a93fa7e | 2006-04-17 22:14:47 +0000 | [diff] [blame] | 206 | # Win32.mak requires that CPU be set appropriately. |
| 207 | # To cross-compile for Win64, set CPU=AMD64 or CPU=IA64. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 208 | |
| 209 | !ifdef PROCESSOR_ARCHITECTURE |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 210 | # We're on Windows NT or using VC 6+ |
Bram Moolenaar | eb3593b | 2006-04-22 22:33:57 +0000 | [diff] [blame] | 211 | ! ifdef CPU |
| 212 | ASSEMBLY_ARCHITECTURE=$(CPU) |
Bram Moolenaar | f9393ef | 2006-04-24 19:47:27 +0000 | [diff] [blame] | 213 | # Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7. |
Bram Moolenaar | 6b90351 | 2015-12-11 19:38:44 +0100 | [diff] [blame] | 214 | ! if "$(CPU)" == "I386" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 215 | CPU = i386 |
Bram Moolenaar | a93fa7e | 2006-04-17 22:14:47 +0000 | [diff] [blame] | 216 | ! endif |
Bram Moolenaar | 6b90351 | 2015-12-11 19:38:44 +0100 | [diff] [blame] | 217 | ! else # !CPU |
| 218 | CPU = i386 |
| 219 | ! ifdef PLATFORM |
| 220 | ! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") |
| 221 | CPU = AMD64 |
| 222 | ! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") |
| 223 | ! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. |
| 224 | ! endif |
| 225 | ! endif # !PLATFORM |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 226 | ! endif |
| 227 | !else # !PROCESSOR_ARCHITECTURE |
| 228 | # We're on Windows 95 |
| 229 | CPU = i386 |
| 230 | !endif # !PROCESSOR_ARCHITECTURE |
Bram Moolenaar | 6b90351 | 2015-12-11 19:38:44 +0100 | [diff] [blame] | 231 | ASSEMBLY_ARCHITECTURE=$(CPU) |
Bram Moolenaar | e2db436 | 2012-09-05 17:57:39 +0200 | [diff] [blame] | 232 | OBJDIR = $(OBJDIR)$(CPU) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 233 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 234 | # Build a retail version by default |
| 235 | |
| 236 | !if "$(DEBUG)" != "yes" |
| 237 | NODEBUG = 1 |
| 238 | !else |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 239 | !undef NODEBUG |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 240 | MAKEFLAGS_GVIMEXT = DEBUG=yes |
| 241 | !endif |
| 242 | |
| 243 | |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 244 | # Get all sorts of useful, standard macros from the Platform SDK. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 245 | |
Bram Moolenaar | 6f586de | 2012-09-18 22:00:08 +0200 | [diff] [blame] | 246 | !ifdef SDK_INCLUDE_DIR |
| 247 | !include $(SDK_INCLUDE_DIR)\Win32.mak |
| 248 | !else |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 249 | !include <Win32.mak> |
Bram Moolenaar | 6f586de | 2012-09-18 22:00:08 +0200 | [diff] [blame] | 250 | !endif |
| 251 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 252 | |
Bram Moolenaar | 8cd213c | 2010-06-01 21:57:09 +0200 | [diff] [blame] | 253 | # Flag to turn on Win64 compatibility warnings for VC7.x and VC8. |
Bram Moolenaar | 83d09bb | 2010-06-01 19:58:08 +0200 | [diff] [blame] | 254 | WP64CHECK = /Wp64 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 255 | |
| 256 | #>>>>> path of the compiler and linker; name of include and lib directories |
| 257 | # PATH = c:\msvc20\bin;$(PATH) |
| 258 | # INCLUDE = c:\msvc20\include |
| 259 | # LIB = c:\msvc20\lib |
| 260 | |
| 261 | !ifndef CTAGS |
| 262 | CTAGS = ctags |
| 263 | !endif |
| 264 | |
| 265 | !if "$(SNIFF)" == "yes" |
| 266 | # SNIFF - Include support for SNiFF+. |
| 267 | SNIFF_INCL = if_sniff.h |
| 268 | SNIFF_OBJ = $(OBJDIR)/if_sniff.obj |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 269 | SNIFF_LIB = shell32.lib |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 270 | SNIFF_DEFS = -DFEAT_SNIFF |
| 271 | # The SNiFF integration needs multithreaded libraries! |
| 272 | MULTITHREADED = yes |
| 273 | !endif |
| 274 | |
| 275 | !ifndef CSCOPE |
| 276 | CSCOPE = yes |
| 277 | !endif |
| 278 | |
| 279 | !if "$(CSCOPE)" == "yes" |
| 280 | # CSCOPE - Include support for Cscope |
| 281 | CSCOPE_INCL = if_cscope.h |
| 282 | CSCOPE_OBJ = $(OBJDIR)/if_cscope.obj |
| 283 | CSCOPE_DEFS = -DFEAT_CSCOPE |
| 284 | !endif |
| 285 | |
| 286 | !ifndef NETBEANS |
| 287 | NETBEANS = $(GUI) |
| 288 | !endif |
| 289 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 290 | # Only allow NETBEANS and XPM for a GUI build. |
| 291 | !if "$(GUI)" == "yes" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 292 | !if "$(NETBEANS)" == "yes" |
| 293 | # NETBEANS - Include support for Netbeans integration |
| 294 | NETBEANS_PRO = proto/netbeans.pro |
Bram Moolenaar | 52b4b55 | 2005-03-07 23:00:57 +0000 | [diff] [blame] | 295 | NETBEANS_OBJ = $(OBJDIR)/netbeans.obj |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 296 | NETBEANS_DEFS = -DFEAT_NETBEANS_INTG |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 297 | |
| 298 | !if "$(NBDEBUG)" == "yes" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 299 | NBDEBUG_DEFS = -DNBDEBUG |
| 300 | NBDEBUG_INCL = nbdebug.h |
| 301 | NBDEBUG_SRC = nbdebug.c |
| 302 | !endif |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 303 | NETBEANS_LIB = WSock32.lib |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 304 | !endif |
| 305 | |
Bram Moolenaar | b5a7a8b | 2014-08-06 14:52:30 +0200 | [diff] [blame] | 306 | # DirectWrite(DirectX) |
| 307 | !if "$(DIRECTX)" == "yes" |
| 308 | DIRECTX_DEFS = -DFEAT_DIRECTX -DDYNAMIC_DIRECTX |
| 309 | DIRECTX_INCL = gui_dwrite.h |
| 310 | DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj |
| 311 | !endif |
| 312 | |
Bram Moolenaar | c6c1d8b | 2012-08-29 14:18:33 +0200 | [diff] [blame] | 313 | !ifndef XPM |
| 314 | # XPM is not set, use the included xpm files, depending on the architecture. |
Bram Moolenaar | e2db436 | 2012-09-05 17:57:39 +0200 | [diff] [blame] | 315 | !if "$(CPU)" == "AMD64" |
Bram Moolenaar | c6c1d8b | 2012-08-29 14:18:33 +0200 | [diff] [blame] | 316 | XPM = xpm\x64 |
Bram Moolenaar | e2db436 | 2012-09-05 17:57:39 +0200 | [diff] [blame] | 317 | !elseif "$(CPU)" == "i386" |
Bram Moolenaar | c6c1d8b | 2012-08-29 14:18:33 +0200 | [diff] [blame] | 318 | XPM = xpm\x86 |
Bram Moolenaar | e2db436 | 2012-09-05 17:57:39 +0200 | [diff] [blame] | 319 | !else |
| 320 | XPM = no |
Bram Moolenaar | c6c1d8b | 2012-08-29 14:18:33 +0200 | [diff] [blame] | 321 | !endif |
| 322 | !endif |
| 323 | !if "$(XPM)" != "no" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 324 | # XPM - Include support for XPM signs |
Bram Moolenaar | c6c1d8b | 2012-08-29 14:18:33 +0200 | [diff] [blame] | 325 | # See the xpm directory for more information. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 326 | XPM_OBJ = $(OBJDIR)/xpm_w32.obj |
| 327 | XPM_DEFS = -DFEAT_XPM_W32 |
| 328 | XPM_LIB = $(XPM)\lib\libXpm.lib |
Bram Moolenaar | c6c1d8b | 2012-08-29 14:18:33 +0200 | [diff] [blame] | 329 | XPM_INC = -I $(XPM)\include -I $(XPM)\..\include |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 330 | !endif |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 331 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 332 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 333 | # Set which version of the CRT to use |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 334 | !if defined(USE_MSVCRT) |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 335 | # CVARS = $(cvarsdll) |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 336 | # !elseif defined(MULTITHREADED) |
| 337 | # CVARS = $(cvarsmt) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 338 | !else |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 339 | # CVARS = $(cvars) |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 340 | # CVARS = $(cvarsmt) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 341 | !endif |
| 342 | |
| 343 | # need advapi32.lib for GetUserName() |
| 344 | # need shell32.lib for ExtractIcon() |
| 345 | # gdi32.lib and comdlg32.lib for printing support |
| 346 | # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 347 | CON_LIB = oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \ |
Bram Moolenaar | f300ad2 | 2015-05-04 16:18:42 +0200 | [diff] [blame] | 348 | comdlg32.lib ole32.lib uuid.lib /machine:$(CPU) |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 349 | !if "$(DELAYLOAD)" == "yes" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 350 | CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib |
| 351 | !endif |
| 352 | |
| 353 | ### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET) |
| 354 | # When set to 0x0500 ":browse" stops working. |
| 355 | !ifndef WINVER |
| 356 | WINVER = 0x0400 |
| 357 | !endif |
| 358 | |
| 359 | # If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal |
| 360 | # default, use these lines. |
| 361 | #VIMRCLOC = somewhere |
| 362 | #VIMRUNTIMEDIR = somewhere |
| 363 | |
| 364 | CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \ |
| 365 | $(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) \ |
| 366 | $(NBDEBUG_DEFS) $(XPM_DEFS) \ |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 367 | $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ |
| 368 | /Fo$(OUTDIR)/ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 369 | |
| 370 | #>>>>> end of choices |
| 371 | ########################################################################### |
| 372 | |
| 373 | !ifdef OS |
| 374 | OS_TYPE = winnt |
| 375 | DEL_TREE = rmdir /s /q |
| 376 | !else |
| 377 | OS_TYPE = win95 |
| 378 | DEL_TREE = deltree /y |
| 379 | !endif |
| 380 | |
| 381 | INTDIR=$(OBJDIR) |
| 382 | OUTDIR=$(OBJDIR) |
| 383 | |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 384 | !if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul] |
| 385 | !message *** ERROR |
| 386 | !message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH. |
| 387 | !message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed. |
| 388 | !error Make aborted. |
| 389 | !else |
| 390 | !include msvcver.~ |
| 391 | !if [del msvcver.c msvcver.~] |
Bram Moolenaar | f300ad2 | 2015-05-04 16:18:42 +0200 | [diff] [blame] | 392 | !endif |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 393 | !endif |
| 394 | |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 395 | !if $(MSVCVER) < 1900 |
| 396 | MSVC_MAJOR = ($(MSVCVER) / 100 - 6) |
| 397 | !else |
| 398 | MSVC_MAJOR = ($(MSVCVER) / 100 - 5) |
| 399 | !endif |
| 400 | |
| 401 | !if $(MSVC_MAJOR) == 6 |
| 402 | CPU = ix86 |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 403 | !endif |
| 404 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 405 | # Convert processor ID to MVC-compatible number |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 406 | !if $(MSVC_MAJOR) < 8 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 407 | !if "$(CPUNR)" == "i386" |
| 408 | CPUARG = /G3 |
| 409 | !elseif "$(CPUNR)" == "i486" |
| 410 | CPUARG = /G4 |
| 411 | !elseif "$(CPUNR)" == "i586" |
| 412 | CPUARG = /G5 |
| 413 | !elseif "$(CPUNR)" == "i686" |
| 414 | CPUARG = /G6 |
Bram Moolenaar | cf3630f | 2005-01-08 16:04:29 +0000 | [diff] [blame] | 415 | !elseif "$(CPUNR)" == "pentium4" |
Bram Moolenaar | 3411469 | 2005-01-02 11:28:13 +0000 | [diff] [blame] | 416 | CPUARG = /G7 /arch:SSE2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 417 | !else |
| 418 | CPUARG = |
| 419 | !endif |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 420 | !else |
Bram Moolenaar | 3ed16dc | 2011-06-12 20:31:31 +0200 | [diff] [blame] | 421 | # VC8/9/10 only allows specifying SSE architecture but only for 32bit |
Bram Moolenaar | 6b90351 | 2015-12-11 19:38:44 +0100 | [diff] [blame] | 422 | !if "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "pentium4" |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 423 | CPUARG = /arch:SSE2 |
| 424 | !endif |
| 425 | !endif |
| 426 | |
| 427 | LIBC = |
| 428 | DEBUGINFO = /Zi |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 429 | |
Bram Moolenaar | f300ad2 | 2015-05-04 16:18:42 +0200 | [diff] [blame] | 430 | # Don't use /nodefaultlib on MSVC 14 |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 431 | !if $(MSVC_MAJOR) >= 14 |
Bram Moolenaar | f300ad2 | 2015-05-04 16:18:42 +0200 | [diff] [blame] | 432 | NODEFAULTLIB = |
| 433 | !else |
| 434 | NODEFAULTLIB = /nodefaultlib |
| 435 | !endif |
| 436 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 437 | !ifdef NODEBUG |
| 438 | VIM = vim |
| 439 | !if "$(OPTIMIZE)" == "SPACE" |
| 440 | OPTFLAG = /O1 |
| 441 | !elseif "$(OPTIMIZE)" == "SPEED" |
| 442 | OPTFLAG = /O2 |
| 443 | !else # MAXSPEED |
| 444 | OPTFLAG = /Ox |
| 445 | !endif |
Bram Moolenaar | 83d09bb | 2010-06-01 19:58:08 +0200 | [diff] [blame] | 446 | |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 447 | !if $(MSVC_MAJOR) >= 8 |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 448 | # Use link time code generation if not worried about size |
| 449 | !if "$(OPTIMIZE)" != "SPACE" |
| 450 | OPTFLAG = $(OPTFLAG) /GL |
| 451 | !endif |
| 452 | !endif |
Bram Moolenaar | 83d09bb | 2010-06-01 19:58:08 +0200 | [diff] [blame] | 453 | |
| 454 | # (/Wp64 is deprecated in VC9 and generates an obnoxious warning.) |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 455 | !if ($(MSVC_MAJOR) == 7) || ($(MSVC_MAJOR) == 8) |
Bram Moolenaar | 83d09bb | 2010-06-01 19:58:08 +0200 | [diff] [blame] | 456 | CFLAGS=$(CFLAGS) $(WP64CHECK) |
| 457 | !endif |
| 458 | |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 459 | # Static code analysis generally available starting with VS2012 (VC11) or |
| 460 | # Windows SDK 7.1 (VC10) |
| 461 | !if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10) |
Bram Moolenaar | 884f6e4 | 2013-05-19 21:03:54 +0200 | [diff] [blame] | 462 | CFLAGS=$(CFLAGS) /analyze |
| 463 | !endif |
| 464 | |
Bram Moolenaar | 3411469 | 2005-01-02 11:28:13 +0000 | [diff] [blame] | 465 | CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 466 | RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 467 | ! ifdef USE_MSVCRT |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 468 | CFLAGS = $(CFLAGS) /MD |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 469 | LIBC = msvcrt.lib |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 470 | ! else |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 471 | LIBC = libcmt.lib |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 472 | CFLAGS = $(CFLAGS) /Zl /MT |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 473 | ! endif |
| 474 | !else # DEBUG |
| 475 | VIM = vimd |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 476 | ! if ("$(CPU)" == "i386") || ("$(CPU)" == "ix86") |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 477 | DEBUGINFO = /ZI |
| 478 | ! endif |
Bram Moolenaar | d9d3058 | 2005-05-18 22:10:28 +0000 | [diff] [blame] | 479 | CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 480 | RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG |
| 481 | # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0. |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 482 | ! if $(MSVC_MAJOR) == 4 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 483 | LIBC = |
| 484 | ! else |
| 485 | LIBC = /fixed:no |
| 486 | ! endif |
Bram Moolenaar | 6a9aa37 | 2005-07-20 21:54:57 +0000 | [diff] [blame] | 487 | ! ifdef USE_MSVCRT |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 488 | CFLAGS = $(CFLAGS) /MDd |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 489 | LIBC = $(LIBC) msvcrtd.lib |
Bram Moolenaar | 6a9aa37 | 2005-07-20 21:54:57 +0000 | [diff] [blame] | 490 | ! else |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 491 | LIBC = $(LIBC) libcmtd.lib |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 492 | CFLAGS = $(CFLAGS) /Zl /MTd |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 493 | ! endif |
| 494 | !endif # DEBUG |
| 495 | |
| 496 | INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \ |
| 497 | proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \ |
| 498 | $(NBDEBUG_INCL) |
| 499 | |
| 500 | OBJ = \ |
Bram Moolenaar | 40e6a71 | 2010-05-16 22:32:54 +0200 | [diff] [blame] | 501 | $(OUTDIR)\blowfish.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 502 | $(OUTDIR)\buffer.obj \ |
| 503 | $(OUTDIR)\charset.obj \ |
Bram Moolenaar | 07cf382 | 2014-08-10 16:31:50 +0200 | [diff] [blame] | 504 | $(OUTDIR)\crypt.obj \ |
| 505 | $(OUTDIR)\crypt_zip.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 506 | $(OUTDIR)\diff.obj \ |
| 507 | $(OUTDIR)\digraph.obj \ |
| 508 | $(OUTDIR)\edit.obj \ |
| 509 | $(OUTDIR)\eval.obj \ |
| 510 | $(OUTDIR)\ex_cmds.obj \ |
| 511 | $(OUTDIR)\ex_cmds2.obj \ |
| 512 | $(OUTDIR)\ex_docmd.obj \ |
| 513 | $(OUTDIR)\ex_eval.obj \ |
| 514 | $(OUTDIR)\ex_getln.obj \ |
| 515 | $(OUTDIR)\fileio.obj \ |
| 516 | $(OUTDIR)\fold.obj \ |
| 517 | $(OUTDIR)\getchar.obj \ |
Bram Moolenaar | 58d9823 | 2005-07-23 22:25:46 +0000 | [diff] [blame] | 518 | $(OUTDIR)\hardcopy.obj \ |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 519 | $(OUTDIR)\hashtab.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 520 | $(OUTDIR)\main.obj \ |
| 521 | $(OUTDIR)\mark.obj \ |
| 522 | $(OUTDIR)\mbyte.obj \ |
| 523 | $(OUTDIR)\memfile.obj \ |
| 524 | $(OUTDIR)\memline.obj \ |
| 525 | $(OUTDIR)\menu.obj \ |
| 526 | $(OUTDIR)\message.obj \ |
| 527 | $(OUTDIR)\misc1.obj \ |
| 528 | $(OUTDIR)\misc2.obj \ |
| 529 | $(OUTDIR)\move.obj \ |
| 530 | $(OUTDIR)\normal.obj \ |
| 531 | $(OUTDIR)\ops.obj \ |
| 532 | $(OUTDIR)\option.obj \ |
| 533 | $(OUTDIR)\os_mswin.obj \ |
Bram Moolenaar | 693e40c | 2013-02-26 14:56:42 +0100 | [diff] [blame] | 534 | $(OUTDIR)\winclip.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 535 | $(OUTDIR)\os_win32.obj \ |
| 536 | $(OUTDIR)\pathdef.obj \ |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 537 | $(OUTDIR)\popupmnu.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 538 | $(OUTDIR)\quickfix.obj \ |
| 539 | $(OUTDIR)\regexp.obj \ |
| 540 | $(OUTDIR)\screen.obj \ |
| 541 | $(OUTDIR)\search.obj \ |
Bram Moolenaar | edac185 | 2010-05-18 20:34:20 +0200 | [diff] [blame] | 542 | $(OUTDIR)\sha256.obj \ |
Bram Moolenaar | 2e4096b | 2005-03-20 22:25:45 +0000 | [diff] [blame] | 543 | $(OUTDIR)\spell.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 544 | $(OUTDIR)\syntax.obj \ |
| 545 | $(OUTDIR)\tag.obj \ |
| 546 | $(OUTDIR)\term.obj \ |
| 547 | $(OUTDIR)\ui.obj \ |
| 548 | $(OUTDIR)\undo.obj \ |
| 549 | $(OUTDIR)\window.obj \ |
| 550 | $(OUTDIR)\vim.res |
| 551 | |
| 552 | !if "$(OLE)" == "yes" |
| 553 | CFLAGS = $(CFLAGS) -DFEAT_OLE |
| 554 | RCFLAGS = $(RCFLAGS) -DFEAT_OLE |
| 555 | OLE_OBJ = $(OUTDIR)\if_ole.obj |
| 556 | OLE_IDL = if_ole.idl |
| 557 | OLE_LIB = oleaut32.lib |
| 558 | !endif |
| 559 | |
| 560 | !if "$(IME)" == "yes" |
| 561 | CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME |
| 562 | !ifndef DYNAMIC_IME |
| 563 | DYNAMIC_IME = yes |
| 564 | !endif |
| 565 | !if "$(DYNAMIC_IME)" == "yes" |
| 566 | CFLAGS = $(CFLAGS) -DDYNAMIC_IME |
| 567 | !else |
| 568 | IME_LIB = imm32.lib |
| 569 | !endif |
| 570 | !endif |
| 571 | |
| 572 | !if "$(GIME)" == "yes" |
| 573 | CFLAGS = $(CFLAGS) -DGLOBAL_IME |
| 574 | OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj |
| 575 | MBYTE = yes |
| 576 | !endif |
| 577 | |
| 578 | !if "$(MBYTE)" == "yes" |
| 579 | CFLAGS = $(CFLAGS) -DFEAT_MBYTE |
| 580 | !endif |
| 581 | |
| 582 | !if "$(GUI)" == "yes" |
| 583 | SUBSYSTEM = windows |
| 584 | CFLAGS = $(CFLAGS) -DFEAT_GUI_W32 |
| 585 | RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32 |
| 586 | VIM = g$(VIM) |
| 587 | GUI_INCL = \ |
| 588 | gui.h \ |
| 589 | regexp.h \ |
| 590 | ascii.h \ |
| 591 | ex_cmds.h \ |
| 592 | farsi.h \ |
| 593 | feature.h \ |
| 594 | globals.h \ |
Bram Moolenaar | 52b4b55 | 2005-03-07 23:00:57 +0000 | [diff] [blame] | 595 | gui_beval.h \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 596 | keymap.h \ |
| 597 | macros.h \ |
| 598 | option.h \ |
| 599 | os_dos.h \ |
| 600 | os_win32.h |
| 601 | GUI_OBJ = \ |
| 602 | $(OUTDIR)\gui.obj \ |
Bram Moolenaar | 52b4b55 | 2005-03-07 23:00:57 +0000 | [diff] [blame] | 603 | $(OUTDIR)\gui_beval.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 604 | $(OUTDIR)\gui_w32.obj \ |
| 605 | $(OUTDIR)\os_w32exe.obj |
| 606 | GUI_LIB = \ |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 607 | gdi32.lib version.lib $(IME_LIB) \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 608 | winspool.lib comctl32.lib advapi32.lib shell32.lib \ |
Bram Moolenaar | f300ad2 | 2015-05-04 16:18:42 +0200 | [diff] [blame] | 609 | /machine:$(CPU) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 610 | !else |
| 611 | SUBSYSTEM = console |
| 612 | !endif |
| 613 | |
Bram Moolenaar | ce2f2e0 | 2014-08-22 18:12:57 +0200 | [diff] [blame] | 614 | !if "$(SUBSYSTEM_VER)" != "" |
| 615 | SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) |
| 616 | !endif |
| 617 | |
Bram Moolenaar | b5a7a8b | 2014-08-06 14:52:30 +0200 | [diff] [blame] | 618 | !if "$(GUI)" == "yes" && "$(DIRECTX)" == "yes" |
| 619 | CFLAGS = $(CFLAGS) $(DIRECTX_DEFS) |
| 620 | GUI_INCL = $(GUI_INCL) $(DIRECTX_INCL) |
| 621 | GUI_OBJ = $(GUI_OBJ) $(DIRECTX_OBJ) |
| 622 | !endif |
| 623 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 624 | # iconv.dll library (dynamically loaded) |
| 625 | !ifndef ICONV |
| 626 | ICONV = yes |
| 627 | !endif |
| 628 | !if "$(ICONV)" == "yes" |
| 629 | CFLAGS = $(CFLAGS) -DDYNAMIC_ICONV |
| 630 | !endif |
| 631 | |
| 632 | # libintl.dll library |
| 633 | !ifndef GETTEXT |
| 634 | GETTEXT = yes |
| 635 | !endif |
| 636 | !if "$(GETTEXT)" == "yes" |
| 637 | CFLAGS = $(CFLAGS) -DDYNAMIC_GETTEXT |
| 638 | !endif |
| 639 | |
| 640 | # TCL interface |
| 641 | !ifdef TCL |
| 642 | !ifndef TCL_VER |
| 643 | TCL_VER = 83 |
| 644 | TCL_VER_LONG = 8.3 |
| 645 | !endif |
| 646 | !message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)" |
| 647 | !if "$(DYNAMIC_TCL)" == "yes" |
| 648 | !message Tcl DLL will be loaded dynamically |
| 649 | TCL_DLL = tcl$(TCL_VER).dll |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 650 | CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \ |
| 651 | -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 652 | TCL_OBJ = $(OUTDIR)\if_tcl.obj |
| 653 | TCL_INC = /I "$(TCL)\Include" /I "$(TCL)" |
Bram Moolenaar | 84a4c33 | 2012-02-22 16:01:56 +0100 | [diff] [blame] | 654 | TCL_LIB = "$(TCL)\lib\tclstub$(TCL_VER).lib" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 655 | !else |
| 656 | CFLAGS = $(CFLAGS) -DFEAT_TCL |
| 657 | TCL_OBJ = $(OUTDIR)\if_tcl.obj |
| 658 | TCL_INC = /I "$(TCL)\Include" /I "$(TCL)" |
| 659 | TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib |
| 660 | !endif |
| 661 | !endif |
| 662 | |
Bram Moolenaar | 0ba0429 | 2010-07-14 23:23:17 +0200 | [diff] [blame] | 663 | # Lua interface |
| 664 | !ifdef LUA |
| 665 | !ifndef LUA_VER |
| 666 | LUA_VER = 51 |
| 667 | !endif |
| 668 | !message Lua requested (version $(LUA_VER)) - root dir is "$(LUA)" |
| 669 | !if "$(DYNAMIC_LUA)" == "yes" |
| 670 | !message Lua DLL will be loaded dynamically |
| 671 | !endif |
| 672 | CFLAGS = $(CFLAGS) -DFEAT_LUA |
| 673 | LUA_OBJ = $(OUTDIR)\if_lua.obj |
| 674 | LUA_INC = /I "$(LUA)\include" /I "$(LUA)" |
| 675 | !if "$(DYNAMIC_LUA)" == "yes" |
| 676 | CFLAGS = $(CFLAGS) -DDYNAMIC_LUA \ |
| 677 | -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\" |
| 678 | LUA_LIB = /nodefaultlib:lua$(LUA_VER).lib |
| 679 | !else |
| 680 | LUA_LIB = "$(LUA)\lib\lua$(LUA_VER).lib" |
| 681 | !endif |
| 682 | !endif |
| 683 | |
Bram Moolenaar | bd5e15f | 2010-07-17 21:19:38 +0200 | [diff] [blame] | 684 | !ifdef PYTHON |
| 685 | !ifdef PYTHON3 |
| 686 | DYNAMIC_PYTHON=yes |
| 687 | DYNAMIC_PYTHON3=yes |
| 688 | !endif |
| 689 | !endif |
| 690 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 691 | # PYTHON interface |
| 692 | !ifdef PYTHON |
| 693 | !ifndef PYTHON_VER |
| 694 | PYTHON_VER = 22 |
| 695 | !endif |
| 696 | !message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)" |
| 697 | !if "$(DYNAMIC_PYTHON)" == "yes" |
| 698 | !message Python DLL will be loaded dynamically |
| 699 | !endif |
| 700 | CFLAGS = $(CFLAGS) -DFEAT_PYTHON |
| 701 | PYTHON_OBJ = $(OUTDIR)\if_python.obj |
| 702 | PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC" |
| 703 | !if "$(DYNAMIC_PYTHON)" == "yes" |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 704 | CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \ |
| 705 | -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 706 | PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib |
| 707 | !else |
| 708 | PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib |
| 709 | !endif |
| 710 | !endif |
| 711 | |
Bram Moolenaar | bd5e15f | 2010-07-17 21:19:38 +0200 | [diff] [blame] | 712 | # PYTHON3 interface |
| 713 | !ifdef PYTHON3 |
| 714 | !ifndef PYTHON3_VER |
| 715 | PYTHON3_VER = 31 |
| 716 | !endif |
| 717 | !message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)" |
| 718 | !if "$(DYNAMIC_PYTHON3)" == "yes" |
| 719 | !message Python3 DLL will be loaded dynamically |
| 720 | !endif |
| 721 | CFLAGS = $(CFLAGS) -DFEAT_PYTHON3 |
| 722 | PYTHON3_OBJ = $(OUTDIR)\if_python3.obj |
| 723 | PYTHON3_INC = /I "$(PYTHON3)\Include" /I "$(PYTHON3)\PC" |
| 724 | !if "$(DYNAMIC_PYTHON3)" == "yes" |
| 725 | CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON3 \ |
| 726 | -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\" |
| 727 | PYTHON3_LIB = /nodefaultlib:python$(PYTHON3_VER).lib |
| 728 | !else |
| 729 | PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib |
| 730 | !endif |
| 731 | !endif |
| 732 | |
Bram Moolenaar | 325b7a2 | 2004-07-05 15:58:32 +0000 | [diff] [blame] | 733 | # MzScheme interface |
| 734 | !ifdef MZSCHEME |
| 735 | !message MzScheme requested - root dir is "$(MZSCHEME)" |
| 736 | !ifndef MZSCHEME_VER |
| 737 | MZSCHEME_VER = 205_000 |
| 738 | !endif |
| 739 | CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include |
Bram Moolenaar | 2d0860d | 2010-11-03 21:59:30 +0100 | [diff] [blame] | 740 | !if EXIST("$(MZSCHEME)\collects\scheme\base.ss") \ |
Bram Moolenaar | 5c5c980 | 2015-07-10 16:12:48 +0200 | [diff] [blame] | 741 | || EXIST("$(MZSCHEME)\collects\scheme\base.rkt") \ |
| 742 | || EXIST("$(MZSCHEME)\collects\racket\base.rkt") |
Bram Moolenaar | 2d0860d | 2010-11-03 21:59:30 +0100 | [diff] [blame] | 743 | # for MzScheme >= 4 we need to include byte code for basic Scheme stuff |
Bram Moolenaar | 9e70cf1 | 2009-05-26 20:59:55 +0000 | [diff] [blame] | 744 | MZSCHEME_EXTRA_DEP = mzscheme_base.c |
| 745 | CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE |
| 746 | !endif |
Bram Moolenaar | 2d0860d | 2010-11-03 21:59:30 +0100 | [diff] [blame] | 747 | !if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib") |
| 748 | MZSCHEME_MAIN_LIB=mzsch |
| 749 | !else |
| 750 | MZSCHEME_MAIN_LIB=racket |
| 751 | !endif |
| 752 | !if EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \ |
Bram Moolenaar | 9e70cf1 | 2009-05-26 20:59:55 +0000 | [diff] [blame] | 753 | && !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib") |
| 754 | !message Building with Precise GC |
| 755 | MZSCHEME_PRECISE_GC = yes |
| 756 | CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC |
| 757 | !endif |
Bram Moolenaar | aab21c3 | 2005-01-25 21:46:35 +0000 | [diff] [blame] | 758 | !if "$(DYNAMIC_MZSCHEME)" == "yes" |
Bram Moolenaar | 9e70cf1 | 2009-05-26 20:59:55 +0000 | [diff] [blame] | 759 | !if "$(MZSCHEME_PRECISE_GC)" == "yes" |
| 760 | !error MzScheme with Precise GC cannot be loaded dynamically |
| 761 | !endif |
Bram Moolenaar | aab21c3 | 2005-01-25 21:46:35 +0000 | [diff] [blame] | 762 | !message MzScheme DLLs will be loaded dynamically |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 763 | CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \ |
Bram Moolenaar | 2d0860d | 2010-11-03 21:59:30 +0100 | [diff] [blame] | 764 | -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \ |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 765 | -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\" |
Bram Moolenaar | aab21c3 | 2005-01-25 21:46:35 +0000 | [diff] [blame] | 766 | !else |
Bram Moolenaar | 9e70cf1 | 2009-05-26 20:59:55 +0000 | [diff] [blame] | 767 | !if "$(MZSCHEME_DEBUG)" == "yes" |
| 768 | CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC |
| 769 | !endif |
| 770 | !if "$(MZSCHEME_PRECISE_GC)" == "yes" |
| 771 | # Precise GC does not use separate dll |
Bram Moolenaar | 2d0860d | 2010-11-03 21:59:30 +0100 | [diff] [blame] | 772 | MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib |
Bram Moolenaar | 9e70cf1 | 2009-05-26 20:59:55 +0000 | [diff] [blame] | 773 | !else |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 774 | MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \ |
Bram Moolenaar | 2d0860d | 2010-11-03 21:59:30 +0100 | [diff] [blame] | 775 | $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib |
Bram Moolenaar | 325b7a2 | 2004-07-05 15:58:32 +0000 | [diff] [blame] | 776 | !endif |
Bram Moolenaar | 9e70cf1 | 2009-05-26 20:59:55 +0000 | [diff] [blame] | 777 | !endif |
Bram Moolenaar | aab21c3 | 2005-01-25 21:46:35 +0000 | [diff] [blame] | 778 | MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj |
Bram Moolenaar | bbc98db | 2012-02-12 01:55:55 +0100 | [diff] [blame] | 779 | # increase stack size |
| 780 | MZSCHEME_LIB = $(MZSCHEME_LIB) /STACK:8388608 |
Bram Moolenaar | aab21c3 | 2005-01-25 21:46:35 +0000 | [diff] [blame] | 781 | !endif |
Bram Moolenaar | 325b7a2 | 2004-07-05 15:58:32 +0000 | [diff] [blame] | 782 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 783 | # Perl interface |
| 784 | !ifdef PERL |
| 785 | !ifndef PERL_VER |
| 786 | PERL_VER = 56 |
| 787 | !endif |
| 788 | !message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)" |
| 789 | !if "$(DYNAMIC_PERL)" == "yes" |
| 790 | !if $(PERL_VER) >= 56 |
| 791 | !message Perl DLL will be loaded dynamically |
| 792 | !else |
| 793 | !message Dynamic loading is not supported for Perl versions earlier than 5.6.0 |
| 794 | !message Reverting to static loading... |
| 795 | !undef DYNAMIC_PERL |
| 796 | !endif |
| 797 | !endif |
| 798 | |
| 799 | # Is Perl installed in architecture-specific directories? |
| 800 | !if exist($(PERL)\Bin\MSWin32-x86) |
| 801 | PERL_ARCH = \MSWin32-x86 |
| 802 | !endif |
| 803 | |
| 804 | PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core |
| 805 | |
| 806 | # Version-dependent stuff |
| 807 | !if $(PERL_VER) == 55 |
| 808 | PERL_LIB = $(PERL_INCDIR)\perl.lib |
| 809 | !else |
| 810 | PERL_DLL = perl$(PERL_VER).dll |
Bram Moolenaar | 207fd75 | 2013-12-14 11:50:35 +0100 | [diff] [blame] | 811 | !if exist($(PERL_INCDIR)\perl$(PERL_VER).lib) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 812 | PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib |
Bram Moolenaar | 207fd75 | 2013-12-14 11:50:35 +0100 | [diff] [blame] | 813 | !else |
| 814 | # For ActivePerl 5.18 and later |
| 815 | PERL_LIB = $(PERL_INCDIR)\libperl$(PERL_VER).a |
| 816 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 817 | !endif |
| 818 | |
Bram Moolenaar | 367fbf1 | 2015-06-25 16:13:46 +0200 | [diff] [blame] | 819 | CFLAGS = $(CFLAGS) -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 820 | |
| 821 | # Do we want to load Perl dynamically? |
| 822 | !if "$(DYNAMIC_PERL)" == "yes" |
| 823 | CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\" |
| 824 | !undef PERL_LIB |
| 825 | !endif |
| 826 | |
| 827 | PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl |
| 828 | PERL_INC = /I $(PERL_INCDIR) |
| 829 | PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj |
| 830 | XSUBPP = $(PERL)\lib\ExtUtils\xsubpp |
Bram Moolenaar | 52f8317 | 2011-09-14 19:01:42 +0200 | [diff] [blame] | 831 | !if exist($(XSUBPP)) |
Bram Moolenaar | 612af43 | 2011-09-14 10:49:46 +0200 | [diff] [blame] | 832 | XSUBPP = $(PERL_EXE) $(XSUBPP) |
| 833 | !else |
| 834 | XSUBPP = xsubpp |
| 835 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 836 | XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap |
| 837 | |
| 838 | !endif |
| 839 | |
| 840 | # |
| 841 | # Support Ruby interface |
| 842 | # |
| 843 | !ifdef RUBY |
| 844 | # Set default value |
| 845 | !ifndef RUBY_VER |
| 846 | RUBY_VER = 18 |
| 847 | !endif |
| 848 | !ifndef RUBY_VER_LONG |
| 849 | RUBY_VER_LONG = 1.8 |
| 850 | !endif |
Bram Moolenaar | da3cb83 | 2012-08-02 21:21:47 +0200 | [diff] [blame] | 851 | !ifndef RUBY_API_VER |
| 852 | RUBY_API_VER = $(RUBY_VER_LONG:.=) |
| 853 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 854 | |
| 855 | !if $(RUBY_VER) >= 18 |
| 856 | !ifndef RUBY_PLATFORM |
| 857 | RUBY_PLATFORM = i386-mswin32 |
| 858 | !endif |
| 859 | !ifndef RUBY_INSTALL_NAME |
Bram Moolenaar | da3cb83 | 2012-08-02 21:21:47 +0200 | [diff] [blame] | 860 | RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 861 | !endif |
| 862 | !else |
| 863 | !ifndef RUBY_PLATFORM |
| 864 | RUBY_PLATFORM = i586-mswin32 |
| 865 | !endif |
| 866 | !ifndef RUBY_INSTALL_NAME |
Bram Moolenaar | da3cb83 | 2012-08-02 21:21:47 +0200 | [diff] [blame] | 867 | RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 868 | !endif |
| 869 | !endif # $(RUBY_VER) >= 18 |
| 870 | |
| 871 | !message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)" |
| 872 | CFLAGS = $(CFLAGS) -DFEAT_RUBY |
| 873 | RUBY_OBJ = $(OUTDIR)\if_ruby.obj |
Bram Moolenaar | da3cb83 | 2012-08-02 21:21:47 +0200 | [diff] [blame] | 874 | !if $(RUBY_VER) >= 19 |
| 875 | RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" |
Bram Moolenaar | 69154f2 | 2010-07-18 21:42:34 +0200 | [diff] [blame] | 876 | !else |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 877 | RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" |
Bram Moolenaar | 69154f2 | 2010-07-18 21:42:34 +0200 | [diff] [blame] | 878 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 879 | RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib |
| 880 | # Do we want to load Ruby dynamically? |
| 881 | !if "$(DYNAMIC_RUBY)" == "yes" |
| 882 | !message Ruby DLL will be loaded dynamically |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 883 | CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=$(RUBY_VER) \ |
| 884 | -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 885 | !undef RUBY_LIB |
| 886 | !endif |
| 887 | !endif # RUBY |
| 888 | |
| 889 | # |
| 890 | # Support PostScript printing |
| 891 | # |
| 892 | !if "$(POSTSCRIPT)" == "yes" |
| 893 | CFLAGS = $(CFLAGS) -DMSWINPS |
| 894 | !endif # POSTSCRIPT |
| 895 | |
| 896 | # |
| 897 | # FEATURES: TINY, SMALL, NORMAL, BIG or HUGE |
| 898 | # |
| 899 | !if "$(FEATURES)"=="" |
| 900 | FEATURES = BIG |
| 901 | !endif |
| 902 | CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES) |
| 903 | |
| 904 | # |
Bram Moolenaar | d9d3058 | 2005-05-18 22:10:28 +0000 | [diff] [blame] | 905 | # Always generate the .pdb file, so that we get debug symbols that can be used |
| 906 | # on a crash (doesn't add overhead to the executable). |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 907 | # Generate edit-and-continue debug info when no optimization - allows to |
| 908 | # debug more conveniently (able to look at variables which are in registers) |
Bram Moolenaar | d9d3058 | 2005-05-18 22:10:28 +0000 | [diff] [blame] | 909 | # |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 910 | CFLAGS = $(CFLAGS) /Fd$(OUTDIR)/ $(DEBUGINFO) |
| 911 | LINK_PDB = /PDB:$(VIM).pdb -debug |
Bram Moolenaar | d9d3058 | 2005-05-18 22:10:28 +0000 | [diff] [blame] | 912 | |
| 913 | # |
| 914 | # End extra feature include |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 915 | # |
| 916 | !message |
| 917 | |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 918 | conflags = /nologo /subsystem:$(SUBSYSTEM) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 919 | |
Bram Moolenaar | 8b6144b | 2006-02-08 09:20:24 +0000 | [diff] [blame] | 920 | PATHDEF_SRC = $(OUTDIR)\pathdef.c |
| 921 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 922 | !IF "$(MAP)" == "yes" |
| 923 | # "/map" is for debugging |
| 924 | conflags = $(conflags) /map |
| 925 | !ELSEIF "$(MAP)" == "lines" |
| 926 | # "/mapinfo:lines" is for debugging, only works for VC6 and later |
| 927 | conflags = $(conflags) /map /mapinfo:lines |
| 928 | !ENDIF |
| 929 | |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 930 | LINKARGS1 = $(linkdebug) $(conflags) |
Bram Moolenaar | f300ad2 | 2015-05-04 16:18:42 +0200 | [diff] [blame] | 931 | LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \ |
Bram Moolenaar | bd5e15f | 2010-07-17 21:19:38 +0200 | [diff] [blame] | 932 | $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \ |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 933 | $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 934 | |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 935 | # Report link time code generation progress if used. |
| 936 | !ifdef NODEBUG |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 937 | !if $(MSVC_MAJOR) >= 8 |
Bram Moolenaar | f22129b | 2007-10-03 11:29:44 +0000 | [diff] [blame] | 938 | !if "$(OPTIMIZE)" != "SPACE" |
| 939 | LINKARGS1 = $(LINKARGS1) /LTCG:STATUS |
| 940 | !endif |
| 941 | !endif |
| 942 | !endif |
| 943 | |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 944 | all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \ |
| 945 | GvimExt/gvimext.dll |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 946 | |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 947 | $(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \ |
Bram Moolenaar | bd5e15f | 2010-07-17 21:19:38 +0200 | [diff] [blame] | 948 | $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \ |
Bram Moolenaar | 0ba0429 | 2010-07-14 23:23:17 +0200 | [diff] [blame] | 949 | $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) \ |
| 950 | version.c version.h |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 951 | $(CC) $(CFLAGS) version.c |
Bram Moolenaar | 0dc065e | 2005-07-04 22:49:24 +0000 | [diff] [blame] | 952 | $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \ |
Bram Moolenaar | bd5e15f | 2010-07-17 21:19:38 +0200 | [diff] [blame] | 953 | $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \ |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 954 | $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \ |
| 955 | $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) |
Bram Moolenaar | b777618 | 2014-05-22 16:29:06 +0200 | [diff] [blame] | 956 | if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 957 | |
Bram Moolenaar | 7d1f5db | 2005-07-03 21:39:27 +0000 | [diff] [blame] | 958 | $(VIM): $(VIM).exe |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 959 | |
| 960 | $(OUTDIR): |
Bram Moolenaar | 1cd871b | 2004-12-19 22:46:22 +0000 | [diff] [blame] | 961 | if not exist $(OUTDIR)/nul mkdir $(OUTDIR) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 962 | |
| 963 | install.exe: dosinst.c |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 964 | $(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \ |
Bram Moolenaar | b230bd5 | 2010-05-25 21:02:00 +0200 | [diff] [blame] | 965 | user32.lib ole32.lib advapi32.lib uuid.lib |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 966 | - if exist install.exe del install.exe |
| 967 | ren dosinst.exe install.exe |
| 968 | |
| 969 | uninstal.exe: uninstal.c |
| 970 | $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib |
| 971 | |
| 972 | vimrun.exe: vimrun.c |
| 973 | $(CC) /nologo -DNDEBUG vimrun.c |
| 974 | |
| 975 | xxd/xxd.exe: xxd/xxd.c |
| 976 | cd xxd |
| 977 | $(MAKE) /NOLOGO -f Make_mvc.mak |
| 978 | cd .. |
| 979 | |
| 980 | GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h |
| 981 | cd GvimExt |
| 982 | $(MAKE) /NOLOGO -f Makefile $(MAKEFLAGS_GVIMEXT) |
| 983 | cd .. |
| 984 | |
| 985 | |
| 986 | tags: notags |
| 987 | $(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro |
| 988 | |
| 989 | notags: |
| 990 | - if exist tags del tags |
| 991 | |
| 992 | clean: |
Bram Moolenaar | 0274363 | 2005-07-25 20:42:36 +0000 | [diff] [blame] | 993 | - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 994 | - if exist *.obj del *.obj |
| 995 | - if exist $(VIM).exe del $(VIM).exe |
| 996 | - if exist $(VIM).ilk del $(VIM).ilk |
| 997 | - if exist $(VIM).pdb del $(VIM).pdb |
| 998 | - if exist $(VIM).map del $(VIM).map |
| 999 | - if exist $(VIM).ncb del $(VIM).ncb |
| 1000 | - if exist vimrun.exe del vimrun.exe |
| 1001 | - if exist install.exe del install.exe |
| 1002 | - if exist uninstal.exe del uninstal.exe |
| 1003 | - if exist if_perl.c del if_perl.c |
| 1004 | - if exist dimm.h del dimm.h |
| 1005 | - if exist dimm_i.c del dimm_i.c |
| 1006 | - if exist dimm.tlb del dimm.tlb |
| 1007 | - if exist dosinst.exe del dosinst.exe |
Bram Moolenaar | 2d6db76 | 2009-09-11 10:49:58 +0000 | [diff] [blame] | 1008 | - if exist mzscheme_base.c del mzscheme_base.c |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1009 | cd xxd |
| 1010 | $(MAKE) /NOLOGO -f Make_mvc.mak clean |
| 1011 | cd .. |
| 1012 | cd GvimExt |
| 1013 | $(MAKE) /NOLOGO -f Makefile clean |
| 1014 | cd .. |
| 1015 | cd GvimExt |
| 1016 | $(MAKE) /NOLOGO -f Makefile clean |
| 1017 | cd .. |
| 1018 | - if exist testdir\*.out del testdir\*.out |
| 1019 | |
| 1020 | test: |
| 1021 | cd testdir |
| 1022 | $(MAKE) /NOLOGO -f Make_dos.mak win32 |
| 1023 | cd .. |
| 1024 | |
Bram Moolenaar | 3411469 | 2005-01-02 11:28:13 +0000 | [diff] [blame] | 1025 | testclean: |
| 1026 | cd testdir |
| 1027 | $(MAKE) /NOLOGO -f Make_dos.mak clean |
| 1028 | cd .. |
| 1029 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1030 | ########################################################################### |
| 1031 | |
| 1032 | # Create a default rule for transforming .c files to .obj files in $(OUTDIR) |
| 1033 | # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later) |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 1034 | !IF "$(_NMAKE_VER)" == "" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1035 | .c{$(OUTDIR)/}.obj: |
| 1036 | !ELSE |
| 1037 | .c{$(OUTDIR)/}.obj:: |
| 1038 | !ENDIF |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1039 | $(CC) $(CFLAGS) $< |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1040 | |
| 1041 | # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR) |
| 1042 | # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later) |
Bram Moolenaar | 90f5d0a | 2015-12-03 22:37:21 +0100 | [diff] [blame] | 1043 | !IF "$(_NMAKE_VER)" == "" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1044 | .cpp{$(OUTDIR)/}.obj: |
| 1045 | !ELSE |
| 1046 | .cpp{$(OUTDIR)/}.obj:: |
| 1047 | !ENDIF |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1048 | $(CC) $(CFLAGS) $< |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1049 | |
Bram Moolenaar | 40e6a71 | 2010-05-16 22:32:54 +0200 | [diff] [blame] | 1050 | $(OUTDIR)/blowfish.obj: $(OUTDIR) blowfish.c $(INCL) |
| 1051 | |
Bram Moolenaar | edac185 | 2010-05-18 20:34:20 +0200 | [diff] [blame] | 1052 | $(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL) |
Bram Moolenaar | 40e6a71 | 2010-05-16 22:32:54 +0200 | [diff] [blame] | 1053 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1054 | $(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL) |
| 1055 | |
Bram Moolenaar | 07cf382 | 2014-08-10 16:31:50 +0200 | [diff] [blame] | 1056 | $(OUTDIR)/crypt.obj: $(OUTDIR) crypt.c $(INCL) |
| 1057 | |
| 1058 | $(OUTDIR)/crypt_zip.obj: $(OUTDIR) crypt_zip.c $(INCL) |
| 1059 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1060 | $(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL) |
| 1061 | |
| 1062 | $(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL) |
| 1063 | |
| 1064 | $(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL) |
| 1065 | |
| 1066 | $(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL) |
| 1067 | |
| 1068 | $(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL) |
| 1069 | |
| 1070 | $(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL) |
| 1071 | |
| 1072 | $(OUTDIR)/ex_docmd.obj: $(OUTDIR) ex_docmd.c $(INCL) ex_cmds.h |
| 1073 | |
| 1074 | $(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h |
| 1075 | |
| 1076 | $(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL) |
| 1077 | |
| 1078 | $(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL) |
| 1079 | |
| 1080 | $(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL) |
| 1081 | |
| 1082 | $(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL) |
| 1083 | |
Bram Moolenaar | 58d9823 | 2005-07-23 22:25:46 +0000 | [diff] [blame] | 1084 | $(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL) |
| 1085 | |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 1086 | $(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL) |
Bram Moolenaar | 383f9bc | 2005-01-19 22:18:32 +0000 | [diff] [blame] | 1087 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1088 | $(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL) |
| 1089 | |
Bram Moolenaar | 52b4b55 | 2005-03-07 23:00:57 +0000 | [diff] [blame] | 1090 | $(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL) |
| 1091 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1092 | $(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL) |
| 1093 | |
Bram Moolenaar | b5a7a8b | 2014-08-06 14:52:30 +0200 | [diff] [blame] | 1094 | $(OUTDIR)/gui_dwrite.obj: $(OUTDIR) gui_dwrite.cpp $(INCL) $(GUI_INCL) |
| 1095 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1096 | $(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL) |
| 1097 | |
Bram Moolenaar | 0ba0429 | 2010-07-14 23:23:17 +0200 | [diff] [blame] | 1098 | $(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL) |
| 1099 | $(CC) $(CFLAGS) $(LUA_INC) if_lua.c |
| 1100 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1101 | if_perl.c : if_perl.xs typemap |
Bram Moolenaar | 612af43 | 2011-09-14 10:49:46 +0200 | [diff] [blame] | 1102 | $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \ |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1103 | -typemap typemap if_perl.xs > if_perl.c |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1104 | |
| 1105 | $(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL) |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1106 | $(CC) $(CFLAGS) $(PERL_INC) if_perl.c |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1107 | |
| 1108 | $(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL) |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1109 | $(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1110 | |
Bram Moolenaar | 7567646 | 2013-01-30 14:55:42 +0100 | [diff] [blame] | 1111 | $(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c if_mzsch.h $(INCL) $(MZSCHEME_EXTRA_DEP) |
Bram Moolenaar | 6a9aa37 | 2005-07-20 21:54:57 +0000 | [diff] [blame] | 1112 | $(CC) $(CFLAGS) if_mzsch.c \ |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1113 | -DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\" |
Bram Moolenaar | 9e70cf1 | 2009-05-26 20:59:55 +0000 | [diff] [blame] | 1114 | mzscheme_base.c: |
Bram Moolenaar | 5c5c980 | 2015-07-10 16:12:48 +0200 | [diff] [blame] | 1115 | !IF "$(MZSCHEME_MAIN_LIB)" == "racket" |
| 1116 | $(MZSCHEME)\raco ctool --c-mods mzscheme_base.c ++lib scheme/base |
| 1117 | !ELSE |
Bram Moolenaar | 9e70cf1 | 2009-05-26 20:59:55 +0000 | [diff] [blame] | 1118 | $(MZSCHEME)\mzc --c-mods mzscheme_base.c ++lib scheme/base |
Bram Moolenaar | 5c5c980 | 2015-07-10 16:12:48 +0200 | [diff] [blame] | 1119 | !ENDIF |
Bram Moolenaar | 325b7a2 | 2004-07-05 15:58:32 +0000 | [diff] [blame] | 1120 | |
Bram Moolenaar | dd9a4a4 | 2013-06-03 20:12:51 +0200 | [diff] [blame] | 1121 | $(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c if_py_both.h $(INCL) |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1122 | $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1123 | |
Bram Moolenaar | dd9a4a4 | 2013-06-03 20:12:51 +0200 | [diff] [blame] | 1124 | $(OUTDIR)/if_python3.obj: $(OUTDIR) if_python3.c if_py_both.h $(INCL) |
Bram Moolenaar | bd5e15f | 2010-07-17 21:19:38 +0200 | [diff] [blame] | 1125 | $(CC) $(CFLAGS) $(PYTHON3_INC) if_python3.c |
| 1126 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1127 | $(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h |
| 1128 | |
| 1129 | $(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL) |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1130 | $(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1131 | |
| 1132 | $(OUTDIR)/if_sniff.obj: $(OUTDIR) if_sniff.c $(INCL) |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1133 | $(CC) $(CFLAGS) if_sniff.c |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1134 | |
| 1135 | $(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL) |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1136 | $(CC) $(CFLAGS) $(TCL_INC) if_tcl.c |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1137 | |
| 1138 | $(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL) |
| 1139 | |
| 1140 | $(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL) |
| 1141 | |
| 1142 | $(OUTDIR)/memfile.obj: $(OUTDIR) memfile.c $(INCL) |
| 1143 | |
| 1144 | $(OUTDIR)/memline.obj: $(OUTDIR) memline.c $(INCL) |
| 1145 | |
| 1146 | $(OUTDIR)/menu.obj: $(OUTDIR) menu.c $(INCL) |
| 1147 | |
| 1148 | $(OUTDIR)/message.obj: $(OUTDIR) message.c $(INCL) |
| 1149 | |
| 1150 | $(OUTDIR)/misc1.obj: $(OUTDIR) misc1.c $(INCL) |
| 1151 | |
| 1152 | $(OUTDIR)/misc2.obj: $(OUTDIR) misc2.c $(INCL) |
| 1153 | |
| 1154 | $(OUTDIR)/move.obj: $(OUTDIR) move.c $(INCL) |
| 1155 | |
| 1156 | $(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL) |
| 1157 | |
| 1158 | $(OUTDIR)/netbeans.obj: $(OUTDIR) netbeans.c $(NBDEBUG_SRC) $(INCL) |
| 1159 | |
| 1160 | $(OUTDIR)/normal.obj: $(OUTDIR) normal.c $(INCL) |
| 1161 | |
| 1162 | $(OUTDIR)/option.obj: $(OUTDIR) option.c $(INCL) |
| 1163 | |
| 1164 | $(OUTDIR)/ops.obj: $(OUTDIR) ops.c $(INCL) |
| 1165 | |
| 1166 | $(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL) |
| 1167 | |
Bram Moolenaar | 693e40c | 2013-02-26 14:56:42 +0100 | [diff] [blame] | 1168 | $(OUTDIR)/winclip.obj: $(OUTDIR) winclip.c $(INCL) |
| 1169 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1170 | $(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h |
| 1171 | |
| 1172 | $(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL) |
| 1173 | |
Bram Moolenaar | 8b6144b | 2006-02-08 09:20:24 +0000 | [diff] [blame] | 1174 | $(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL) |
| 1175 | $(CC) $(CFLAGS) $(PATHDEF_SRC) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1176 | |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 1177 | $(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL) |
Bram Moolenaar | bb15b65 | 2005-10-03 21:52:09 +0000 | [diff] [blame] | 1178 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1179 | $(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL) |
| 1180 | |
Bram Moolenaar | fbc0d2e | 2013-05-19 19:40:29 +0200 | [diff] [blame] | 1181 | $(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c regexp_nfa.c $(INCL) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1182 | |
| 1183 | $(OUTDIR)/screen.obj: $(OUTDIR) screen.c $(INCL) |
| 1184 | |
| 1185 | $(OUTDIR)/search.obj: $(OUTDIR) search.c $(INCL) |
| 1186 | |
Bram Moolenaar | edac185 | 2010-05-18 20:34:20 +0200 | [diff] [blame] | 1187 | $(OUTDIR)/sha256.obj: $(OUTDIR) sha256.c $(INCL) |
| 1188 | |
Bram Moolenaar | 2e4096b | 2005-03-20 22:25:45 +0000 | [diff] [blame] | 1189 | $(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL) |
| 1190 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1191 | $(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL) |
| 1192 | |
| 1193 | $(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL) |
| 1194 | |
| 1195 | $(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL) |
| 1196 | |
| 1197 | $(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL) |
| 1198 | |
| 1199 | $(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL) |
| 1200 | |
| 1201 | $(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL) |
| 1202 | |
| 1203 | $(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1204 | $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1205 | |
Bram Moolenaar | cc448b3 | 2010-07-14 16:52:17 +0200 | [diff] [blame] | 1206 | $(OUTDIR)/vim.res: $(OUTDIR) vim.rc gvim.exe.mnf version.h tools.bmp \ |
| 1207 | tearoff.bmp vim.ico vim_error.ico \ |
| 1208 | vim_alert.ico vim_info.ico vim_quest.ico |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1209 | $(RC) /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc |
| 1210 | |
Bram Moolenaar | 7d1f5db | 2005-07-03 21:39:27 +0000 | [diff] [blame] | 1211 | iid_ole.c if_ole.h vim.tlb: if_ole.idl |
Bram Moolenaar | b635633 | 2005-07-18 21:40:44 +0000 | [diff] [blame] | 1212 | midl /nologo /error none /proxy nul /iid iid_ole.c /tlb vim.tlb \ |
| 1213 | /header if_ole.h if_ole.idl |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1214 | |
| 1215 | dimm.h dimm_i.c: dimm.idl |
Bram Moolenaar | 7d1f5db | 2005-07-03 21:39:27 +0000 | [diff] [blame] | 1216 | midl /nologo /error none /proxy nul dimm.idl |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1217 | |
| 1218 | $(OUTDIR)/dimm_i.obj: $(OUTDIR) dimm_i.c $(INCL) |
| 1219 | |
| 1220 | $(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL) |
| 1221 | |
Bram Moolenaar | 89cb5e0 | 2004-07-19 20:55:54 +0000 | [diff] [blame] | 1222 | # $CFLAGS may contain backslashes and double quotes, escape them both. |
| 1223 | E0_CFLAGS = $(CFLAGS:\=\\) |
| 1224 | E_CFLAGS = $(E0_CFLAGS:"=\") |
Bram Moolenaar | 77f66d6 | 2007-02-20 02:16:18 +0000 | [diff] [blame] | 1225 | # ") stop the string |
Bram Moolenaar | c30846f | 2011-02-15 18:06:15 +0100 | [diff] [blame] | 1226 | # $LINKARGS2 may contain backslashes and double quotes, escape them both. |
| 1227 | E0_LINKARGS2 = $(LINKARGS2:\=\\) |
| 1228 | E_LINKARGS2 = $(E0_LINKARGS2:"=\") |
| 1229 | # ") stop the string |
Bram Moolenaar | 89cb5e0 | 2004-07-19 20:55:54 +0000 | [diff] [blame] | 1230 | |
Bram Moolenaar | 8b6144b | 2006-02-08 09:20:24 +0000 | [diff] [blame] | 1231 | $(PATHDEF_SRC): auto |
| 1232 | @echo creating $(PATHDEF_SRC) |
| 1233 | @echo /* pathdef.c */ > $(PATHDEF_SRC) |
| 1234 | @echo #include "vim.h" >> $(PATHDEF_SRC) |
| 1235 | @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC) |
| 1236 | @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC) |
| 1237 | @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC) |
Bram Moolenaar | c30846f | 2011-02-15 18:06:15 +0100 | [diff] [blame] | 1238 | @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(E_LINKARGS2)"; >> $(PATHDEF_SRC) |
Bram Moolenaar | 8b6144b | 2006-02-08 09:20:24 +0000 | [diff] [blame] | 1239 | @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC) |
| 1240 | @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1241 | |
| 1242 | auto: |
| 1243 | if not exist auto/nul mkdir auto |
| 1244 | |
| 1245 | # End Custom Build |
| 1246 | proto.h: \ |
Bram Moolenaar | 40e6a71 | 2010-05-16 22:32:54 +0200 | [diff] [blame] | 1247 | proto/blowfish.pro \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1248 | proto/buffer.pro \ |
| 1249 | proto/charset.pro \ |
Bram Moolenaar | 07cf382 | 2014-08-10 16:31:50 +0200 | [diff] [blame] | 1250 | proto/crypt.pro \ |
| 1251 | proto/crypt_zip.pro \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1252 | proto/diff.pro \ |
| 1253 | proto/digraph.pro \ |
| 1254 | proto/edit.pro \ |
| 1255 | proto/eval.pro \ |
| 1256 | proto/ex_cmds.pro \ |
| 1257 | proto/ex_cmds2.pro \ |
| 1258 | proto/ex_docmd.pro \ |
| 1259 | proto/ex_eval.pro \ |
| 1260 | proto/ex_getln.pro \ |
| 1261 | proto/fileio.pro \ |
| 1262 | proto/getchar.pro \ |
Bram Moolenaar | 58d9823 | 2005-07-23 22:25:46 +0000 | [diff] [blame] | 1263 | proto/hardcopy.pro \ |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 1264 | proto/hashtab.pro \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1265 | proto/main.pro \ |
| 1266 | proto/mark.pro \ |
| 1267 | proto/memfile.pro \ |
| 1268 | proto/memline.pro \ |
| 1269 | proto/menu.pro \ |
| 1270 | proto/message.pro \ |
| 1271 | proto/misc1.pro \ |
| 1272 | proto/misc2.pro \ |
| 1273 | proto/move.pro \ |
| 1274 | proto/mbyte.pro \ |
| 1275 | proto/normal.pro \ |
| 1276 | proto/ops.pro \ |
| 1277 | proto/option.pro \ |
| 1278 | proto/os_mswin.pro \ |
Bram Moolenaar | 693e40c | 2013-02-26 14:56:42 +0100 | [diff] [blame] | 1279 | proto/winclip.pro \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1280 | proto/os_win32.pro \ |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 1281 | proto/popupmnu.pro \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1282 | proto/quickfix.pro \ |
| 1283 | proto/regexp.pro \ |
| 1284 | proto/screen.pro \ |
| 1285 | proto/search.pro \ |
Bram Moolenaar | 40e6a71 | 2010-05-16 22:32:54 +0200 | [diff] [blame] | 1286 | proto/sha256.pro \ |
Bram Moolenaar | 2e4096b | 2005-03-20 22:25:45 +0000 | [diff] [blame] | 1287 | proto/spell.pro \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1288 | proto/syntax.pro \ |
| 1289 | proto/tag.pro \ |
| 1290 | proto/term.pro \ |
| 1291 | proto/ui.pro \ |
| 1292 | proto/undo.pro \ |
| 1293 | proto/window.pro \ |
| 1294 | $(NETBEANS_PRO) |
| 1295 | |
Bram Moolenaar | f193fff | 2006-04-27 00:02:13 +0000 | [diff] [blame] | 1296 | .SUFFIXES: .cod .i |
Bram Moolenaar | 551dbcc | 2006-04-25 22:13:59 +0000 | [diff] [blame] | 1297 | |
| 1298 | # Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake |
| 1299 | # foo.cod" |
| 1300 | .c.cod: |
| 1301 | $(CC) $(CFLAGS) /FAcs $< |
| 1302 | |
| 1303 | # Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i" |
| 1304 | .c.i: |
| 1305 | $(CC) $(CFLAGS) /P /C $< |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 1306 | |
| 1307 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1308 | # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: |