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