blob: 9760d8f7b25038ab7b38f42398eff72e4e2febcb [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#
2# Makefile for Vim.
3# Compiler: Borland C++ 5.0 and later 32-bit compiler
Bram Moolenaara06ecab2016-07-16 14:47:36 +02004# Targets: Win32 (Windows NT and Windows 95) (with/without GUI)
Bram Moolenaar071d4272004-06-13 20:20:40 +00005#
Bram Moolenaar17b609e2016-01-01 17:56:17 +01006# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
7#
Bram Moolenaar071d4272004-06-13 20:20:40 +00008# Contributed by Ben Singer.
9# Updated 4/1997 by Ron Aaron
Bram Moolenaar48e330a2016-02-23 14:53:34 +010010# 2016: removed support for 16 bit DOS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011# 6/1997 - added support for 16 bit DOS
12# Note: this has been tested, and works, for BC5. Your mileage may vary.
13# Has been reported NOT to work with BC 4.52. Maybe it can be fixed?
14# 10/1997 - ron - fixed bugs w/ BC 5.02
15# 8/1998 - ron - updated with new targets, fixed some stuff
16# 3/2000 - Bram: Made it work with BC 5.5 free command line compiler,
17# cleaned up variables.
18# 6/2001 - Dan - Added support for compiling Python and TCL
19# 7/2001 - Dan - Added support for compiling Ruby
20#
21# It builds on Windows 95 and NT-Intel, producing the same binary in either
22# case. To build using Microsoft Visual C++, use Make_mvc.mak.
23#
24# This should work with the free Borland command line compiler, version 5.5.
25# You need at least sp1 (service pack 1). With sp2 it compiles faster.
26# Use a command like this:
27# <path>\bin\make /f Make_bc5.mak BOR=<path>
28#
29
30# let the make utility do the hard work:
31.AUTODEPEND
32.CACHEAUTODEPEND
33
34# VARIABLES:
35# name value (default)
36#
37# BOR path to root of Borland C install (c:\bc5)
Bram Moolenaar48e330a2016-02-23 14:53:34 +010038# LINK name of the linker ($(BOR)\bin\ilink32)
Bram Moolenaar071d4272004-06-13 20:20:40 +000039# GUI no or yes: set to yes if you want the GUI version (yes)
Bram Moolenaar0ba04292010-07-14 23:23:17 +020040# LUA define to path to Lua dir to get Lua support (not defined)
41# LUA_VER define to version of Lua being used (51)
42# DYNAMIC_LUA no or yes: set to yes to load the Lua DLL dynamically (no)
Bram Moolenaar071d4272004-06-13 20:20:40 +000043# PERL define to path to Perl dir to get Perl support (not defined)
44# PERL_VER define to version of Perl being used (56)
45# DYNAMIC_PERL no or yes: set to yes to load the Perl DLL dynamically (no)
46# PYTHON define to path to Python dir to get PYTHON support (not defined)
47# PYTHON_VER define to version of Python being used (22)
48# DYNAMIC_PYTHON no or yes: use yes to load the Python DLL dynamically (no)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +020049# PYTHON3 define to path to Python3 dir to get PYTHON3 support (not defined)
50# PYTHON3_VER define to version of Python3 being used (31)
51# DYNAMIC_PYTHON3 no or yes: use yes to load the Python3 DLL dynamically (no)
Bram Moolenaar071d4272004-06-13 20:20:40 +000052# TCL define to path to TCL dir to get TCL support (not defined)
53# TCL_VER define to version of TCL being used (83)
54# DYNAMIC_TCL no or yes: use yes to load the TCL DLL dynamically (no)
55# RUBY define to path to Ruby dir to get Ruby support (not defined)
56# NOTE: You may have to remove the defines for uid_t and gid_t
57# from the Ruby config.h header file.
58# RUBY_VER define to version of Ruby being used (16)
59# NOTE: compilation on WinNT/2K/XP requires
60# at least version 1.6.5 of Ruby. Earlier versions
61# of Ruby will cause a compile error on these systems.
Bram Moolenaar910f66f2006-04-05 20:41:53 +000062# RUBY_VER_LONG same, but in format with dot. (1.6)
Bram Moolenaar071d4272004-06-13 20:20:40 +000063# DYNAMIC_RUBY no or yes: use yes to load the Ruby DLL dynamically (no)
Bram Moolenaar071d4272004-06-13 20:20:40 +000064# IME no or yes: set to yes for multi-byte IME support (yes)
65# DYNAMIC_IME no or yes: set to yes to load imm32.dll dynamically (yes)
66# GETTEXT no or yes: set to yes for multi-language support (yes)
67# ICONV no or yes: set to yes for dynamic iconv support (yes)
68# OLE no or yes: set to yes to make OLE gvim (no)
Bram Moolenaar071d4272004-06-13 20:20:40 +000069# DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
70# CODEGUARD no or yes: set to yes if you want to use CODEGUARD (no)
71# CPUNR 1 through 6: select -CPU argument to compile with (3)
72# 3 for 386, 4 for 486, 5 for pentium, 6 for pentium pro.
73# USEDLL no or yes: set to yes to use the Runtime library DLL (no)
74# For USEDLL=yes the cc3250.dll is required to run Vim.
75# VIMDLL no or yes: create vim32.dll, and stub (g)vim.exe (no)
Bram Moolenaar48e330a2016-02-23 14:53:34 +010076# ALIGN 1, 2 or 4: Alignment to use (4 for Win32)
Bram Moolenaar071d4272004-06-13 20:20:40 +000077# FASTCALL no or yes: set to yes to use register-based function protocol (yes)
78# OPTIMIZE SPACE, SPEED, or MAXSPEED: type of optimization (MAXSPEED)
79# POSTSCRIPT no or yes: set to yes for PostScript printing
Bram Moolenaar48e330a2016-02-23 14:53:34 +010080# FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
Bram Moolenaar071d4272004-06-13 20:20:40 +000081# WINVER 0x0400 or 0x0500: minimum Win32 version to support (0x0400)
82# CSCOPE no or yes: include support for Cscope interface (yes)
Bram Moolenaare0874f82016-01-24 20:36:41 +010083# NETBEANS no or yes: include support for Netbeans interface; also
84# requires CHANNEL (yes if GUI
Bram Moolenaar071d4272004-06-13 20:20:40 +000085# is yes)
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000086# NBDEBUG no or yes: include support for debugging Netbeans interface (no)
Bram Moolenaare0874f82016-01-24 20:36:41 +010087# CHANNEL no or yes: include support for inter process communication (yes
88# if GUI is yes)
Bram Moolenaar071d4272004-06-13 20:20:40 +000089# XPM define to path to XPM dir to get support for loading XPM images.
90
91### BOR: root of the BC installation
92!if ("$(BOR)"=="")
93BOR = c:\bc5
94!endif
95
Bram Moolenaar48e330a2016-02-23 14:53:34 +010096### LINK: Name of the linker: ilink32 (this is below)
Bram Moolenaar071d4272004-06-13 20:20:40 +000097
98### GUI: yes for GUI version, no for console version
99!if ("$(GUI)"=="")
100GUI = yes
101!endif
102
Bram Moolenaar071d4272004-06-13 20:20:40 +0000103### IME: yes for multibyte support, no to disable it.
104!if ("$(IME)"=="")
105IME = yes
106!endif
107!if ("$(DYNAMIC_IME)"=="")
108DYNAMIC_IME = yes
109!endif
110
111### GETTEXT: yes for multilanguage support, no to disable it.
112!if ("$(GETTEXT)"=="")
113GETTEXT = yes
114!endif
115
116### ICONV: yes to enable dynamic-iconv support, no to disable it
117!if ("$(ICONV)"=="")
118ICONV = yes
119!endif
120
121### CSCOPE: yes to enable Cscope support, no to disable it
122!if ("$(CSCOPE)"=="")
123CSCOPE = yes
124!endif
125
126### NETBEANS: yes to enable NetBeans interface support, no to disable it
127!if ("$(NETBEANS)"=="") && ("$(GUI)"=="yes")
128NETBEANS = yes
129!endif
130
Bram Moolenaare0874f82016-01-24 20:36:41 +0100131### CHANNEL: yes to enable inter process communication, no to disable it
132!if ("$(CHANNEL)"=="") && ("$(GUI)"=="yes")
133CHANNEL = yes
134!endif
135
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200136### LUA: uncomment this line if you want lua support in vim
137# LUA=c:\lua
138
Bram Moolenaar071d4272004-06-13 20:20:40 +0000139### PERL: uncomment this line if you want perl support in vim
140# PERL=c:\perl
141
142### PYTHON: uncomment this line if you want python support in vim
143# PYTHON=c:\python22
144
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200145### PYTHON3: uncomment this line if you want python3 support in vim
146# PYTHON3=c:\python31
147
Bram Moolenaar071d4272004-06-13 20:20:40 +0000148### RUBY: uncomment this line if you want ruby support in vim
149# RUBY=c:\ruby
150
151### TCL: uncomment this line if you want tcl support in vim
152# TCL=c:\tcl
153
154### OLE: no for normal gvim, yes for OLE-capable gvim (only works with GUI)
155#OLE = yes
156
Bram Moolenaar071d4272004-06-13 20:20:40 +0000157### DEBUG: Uncomment to make an executable for debugging
158# DEBUG = yes
159!if ("$(DEBUG)"=="yes")
160DEBUG_FLAG = -v
161!endif
162
163### CODEGUARD: Uncomment to use the CODEGUARD stuff (BC 5.0 or later):
164# CODEGUARD = yes
165!if ("$(CODEGUARD)"=="yes")
166CODEGUARD_FLAG = -vG
167!endif
168
169### CPUNR: set your target processor (3 to 6)
170!if ("$(CPUNR)" == "i386") || ("$(CPUNR)" == "3")
171CPUNR = 3
172!elif ("$(CPUNR)" == "i486") || ("$(CPUNR)" == "4")
173CPUNR = 4
174!elif ("$(CPUNR)" == "i586") || ("$(CPUNR)" == "5")
175CPUNR = 5
176!elif ("$(CPUNR)" == "i686") || ("$(CPUNR)" == "6")
177CPUNR = 6
178!else
179CPUNR = 3
180!endif
181
182### Comment out to use precompiled headers (faster, but uses lots of disk!)
183HEADERS = -H -H=vim.csm -Hc
184
185### USEDLL: no for statically linked version of run-time, yes for DLL runtime
186!if ("$(USEDLL)"=="")
187USEDLL = no
188!endif
189
190### VIMDLL: yes for a DLL version of VIM (NOT RECOMMENDED), no otherwise
191#VIMDLL = yes
192
Bram Moolenaar48e330a2016-02-23 14:53:34 +0100193### ALIGN: alignment you desire: (1,2 or 4: s/b 4 for Win32)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000194!if ("$(ALIGN)"=="")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000195ALIGN = 4
196!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197
198### FASTCALL: yes to use FASTCALL calling convention (RECOMMENDED!), no otherwise
199# Incompatible when calling external functions (like MSVC-compiled DLLs), so
200# don't use FASTCALL when linking with external libs.
201!if ("$(FASTCALL)"=="") && \
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200202 ("$(LUA)"=="") && \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000203 ("$(PYTHON)"=="") && \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200204 ("$(PYTHON3)"=="") && \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000205 ("$(PERL)"=="") && \
206 ("$(TCL)"=="") && \
207 ("$(RUBY)"=="") && \
208 ("$(ICONV)"!="yes") && \
209 ("$(IME)"!="yes") && \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000210 ("$(XPM)"=="")
211FASTCALL = yes
212!endif
213
214### OPTIMIZE: SPEED to optimize for speed, SPACE otherwise (SPEED RECOMMENDED)
215!if ("$(OPTIMIZE)"=="")
216OPTIMIZE = MAXSPEED
217!endif
218
Bram Moolenaar48e330a2016-02-23 14:53:34 +0100219### FEATURES: TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000220!if ("$(FEATURES)"=="")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000221FEATURES = BIG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000222!endif
223
224### POSTSCRIPT: uncomment this line if you want PostScript printing
225#POSTSCRIPT = yes
226
227###
228# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
229# default, use these lines.
230#VIMRCLOC = somewhere
231#VIMRUNTIMEDIR = somewhere
232
233### Set the default $(WINVER) to make it work with Bcc 5.5.
234!ifndef WINVER
235WINVER = 0x0400
236!endif
237
238#
239# Sanity checks for the above options:
240#
241
Bram Moolenaar48e330a2016-02-23 14:53:34 +0100242OSTYPE = WIN32
Bram Moolenaar071d4272004-06-13 20:20:40 +0000243
244#
245# Optimizations: change as desired (RECOMMENDATION: Don't change!):
246#
247!if ("$(DEBUG)"=="yes")
248OPT = -Od -N
249!else
250!if ("$(OPTIMIZE)"=="SPACE")
251OPT = -O1 -f- -d
252!elif ("$(OPTIMIZE)"=="MAXSPEED")
253OPT = -O2 -f- -d -Ocavi -O
254!else
255OPT = -O2 -f- -d -Oc -O
256!endif
257!if ("$(FASTCALL)"=="yes")
258OPT = $(OPT) -pr
259!endif
260!if ("$(CODEGUARD)"!="yes")
261OPT = $(OPT) -vi-
262!endif
263!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000264# shouldn't have to change:
265LIB = $(BOR)\lib
266INCLUDE = $(BOR)\include;.;proto
267DEFINES = -DFEAT_$(FEATURES) -DWIN32 -DHAVE_PATHDEF \
268 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
269
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200270!ifdef LUA
271INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_LUA
272INCLUDE = $(LUA)\include;$(INCLUDE)
273! ifndef LUA_VER
274LUA_VER = 51
275! endif
276! if ("$(DYNAMIC_LUA)" == "yes")
277INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
278LUA_LIB_FLAG = /nodefaultlib:
279! endif
280!endif
281
Bram Moolenaar071d4272004-06-13 20:20:40 +0000282!ifdef PERL
283INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PERL
284INCLUDE = $(PERL)\lib\core;$(INCLUDE)
285! ifndef PERL_VER
286PERL_VER = 56
287! endif
288! if ("$(DYNAMIC_PERL)" == "yes")
289! if ($(PERL_VER) > 55)
290INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
291PERL_LIB_FLAG = /nodefaultlib:
292! else
293! message "Cannot dynamically load Perl versions less than 5.6. Loading statically..."
294! endif
295! endif
296!endif
297
298!ifdef PYTHON
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200299!ifdef PYTHON3
300DYNAMIC_PYTHON=yes
301DYNAMIC_PYTHON3=yes
302!endif
303!endif
304
305!ifdef PYTHON
Bram Moolenaar071d4272004-06-13 20:20:40 +0000306INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON
Bram Moolenaar071d4272004-06-13 20:20:40 +0000307!ifndef PYTHON_VER
308PYTHON_VER = 22
309!endif
310!if "$(DYNAMIC_PYTHON)" == "yes"
311INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
312PYTHON_LIB_FLAG = /nodefaultlib:
313!endif
314!endif
315
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200316!ifdef PYTHON3
317INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON3
318!ifndef PYTHON3_VER
319PYTHON3_VER = 31
320!endif
321!if "$(DYNAMIC_PYTHON3)" == "yes"
322INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
323PYTHON3_LIB_FLAG = /nodefaultlib:
324!endif
325!endif
326
327
Bram Moolenaar071d4272004-06-13 20:20:40 +0000328!ifdef RUBY
329!ifndef RUBY_VER
330RUBY_VER = 16
331!endif
332!ifndef RUBY_VER_LONG
333RUBY_VER_LONG = 1.6
334!endif
335
336!if "$(RUBY_VER)" == "16"
337!ifndef RUBY_PLATFORM
338RUBY_PLATFORM = i586-mswin32
339!endif
340!ifndef RUBY_INSTALL_NAME
341RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
342!endif
343!else
344!ifndef RUBY_PLATFORM
345RUBY_PLATFORM = i386-mswin32
346!endif
347!ifndef RUBY_INSTALL_NAME
348RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
349!endif
350!endif
351
352INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_RUBY
353INCLUDE = $(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM);$(INCLUDE)
354
355!if "$(DYNAMIC_RUBY)" == "yes"
356INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
357INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY_VER=$(RUBY_VER)
358RUBY_LIB_FLAG = /nodefaultlib:
359!endif
360!endif
361
362!ifdef TCL
363INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_TCL
364INCLUDE = $(TCL)\include;$(INCLUDE)
365!ifndef TCL_VER
366TCL_VER = 83
367!endif
368TCL_LIB = $(TCL)\lib\tcl$(TCL_VER).lib
369TCL_LIB_FLAG =
370!if "$(DYNAMIC_TCL)" == "yes"
371INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
372TCL_LIB = tclstub$(TCL_VER)-bor.lib
373TCL_LIB_FLAG =
374!endif
375!endif
376#
377# DO NOT change below:
378#
379CPUARG = -$(CPUNR)
380ALIGNARG = -a$(ALIGN)
381#
382!if ("$(DEBUG)"=="yes")
Bram Moolenaar78cf3f02014-01-10 18:16:07 +0100383DEFINES=$(DEFINES) -DDEBUG -D_DEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000384!endif
385#
386!if ("$(OLE)"=="yes")
387DEFINES = $(DEFINES) -DFEAT_OLE
388!endif
389#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000390!if ("$(IME)"=="yes")
391MBDEFINES = $(MBDEFINES) -DFEAT_MBYTE_IME
392!if ("$(DYNAMIC_IME)" == "yes")
393MBDEFINES = $(MBDEFINES) -DDYNAMIC_IME
394!endif
395!endif
396!if ("$(ICONV)"=="yes")
397MBDEFINES = $(MBDEFINES) -DDYNAMIC_ICONV
398!endif
399!if ("$(GETTEXT)"=="yes")
400MBDEFINES = $(MBDEFINES) -DDYNAMIC_GETTEXT
401!endif
402
403!if ("$(CSCOPE)"=="yes")
404DEFINES = $(DEFINES) -DFEAT_CSCOPE
405!endif
406
Bram Moolenaar071d4272004-06-13 20:20:40 +0000407!if ("$(GUI)"=="yes")
408DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
409!if ("$(DEBUG)"=="yes")
410TARGET = gvimd.exe
411!else
412TARGET = gvim.exe
413!endif
414!if ("$(VIMDLL)"=="yes")
415EXETYPE=-WD
416DEFINES = $(DEFINES) -DVIMDLL
417!else
418EXETYPE=-W
419!endif
420STARTUPOBJ = c0w32.obj
421LINK2 = -aa
422RESFILE = vim.res
423!else
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000424!undef NETBEANS
Bram Moolenaare0874f82016-01-24 20:36:41 +0100425!undef CHANNEL
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000426!undef XPM
427!undef VIMDLL
Bram Moolenaar071d4272004-06-13 20:20:40 +0000428!if ("$(DEBUG)"=="yes")
429TARGET = vimd.exe
430!else
431# for now, anyway: VIMDLL is only for the GUI version
Bram Moolenaar071d4272004-06-13 20:20:40 +0000432TARGET = vim.exe
433!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000434EXETYPE=-WC
435STARTUPOBJ = c0x32.obj
436LINK2 = -ap -OS -o -P
Bram Moolenaar071d4272004-06-13 20:20:40 +0000437RESFILE = vim.res
438!endif
439
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000440!if ("$(NETBEANS)"=="yes")
Bram Moolenaare0874f82016-01-24 20:36:41 +0100441!if ("$(CHANNEL)"!="yes")
442# cannot use Netbeans without CHANNEL
443NETBEANS = no
444!else
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000445DEFINES = $(DEFINES) -DFEAT_NETBEANS_INTG
446!if ("$(NBDEBUG)"=="yes")
447DEFINES = $(DEFINES) -DNBDEBUG
448NBDEBUG_DEP = nbdebug.h nbdebug.c
449!endif
450!endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100451!endif
452
453!if ("$(CHANNEL)"=="yes")
Bram Moolenaar509ce2a2016-03-11 22:52:15 +0100454DEFINES = $(DEFINES) -DFEAT_JOB_CHANNEL
Bram Moolenaare0874f82016-01-24 20:36:41 +0100455!endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000456
457!ifdef XPM
458!if ("$(GUI)"=="yes")
459DEFINES = $(DEFINES) -DFEAT_XPM_W32
460INCLUDE = $(XPM)\include;$(INCLUDE)
461!endif
462!endif
463
Bram Moolenaar071d4272004-06-13 20:20:40 +0000464!if ("$(USEDLL)"=="yes")
465DEFINES = $(DEFINES) -D_RTLDLL
466!endif
467
468!if ("$(DEBUG)"=="yes")
469OBJDIR = $(OSTYPE)\objdbg
470!else
471!if ("$(GUI)"=="yes")
472!if ("$(OLE)"=="yes")
473OBJDIR = $(OSTYPE)\oleobj
474!else
475OBJDIR = $(OSTYPE)\gobj
476!endif
477!else
478OBJDIR = $(OSTYPE)\obj
479!endif
480!endif
481
482!if ("$(POSTSCRIPT)"=="yes")
483DEFINES = $(DEFINES) -DMSWINPS
484!endif
485
486##### BASE COMPILER/TOOLS RULES #####
487MAKE = $(BOR)\bin\make
488CFLAGS = -w-aus -w-par -w-pch -w-ngu -w-csu -I$(INCLUDE)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000489BRC = $(BOR)\BIN\brc32
490!if ("$(LINK)"=="")
491LINK = $(BOR)\BIN\ILink32
492!endif
493CC = $(BOR)\BIN\Bcc32
494LFLAGS = -OS -Tpe -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
495LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
496CFLAGS = $(CFLAGS) -d -RT- -k- -Oi $(HEADERS) -f-
Bram Moolenaar071d4272004-06-13 20:20:40 +0000497
498CC1 = -c
499CC2 = -o
500CCARG = +$(OBJDIR)\bcc.cfg
501
502# implicit rules:
503
504# Without the following, the implicit rule in BUILTINS.MAK is picked up
505# for a rule for .c.obj rather than the local implicit rule
506.SUFFIXES
507.SUFFIXES .c .obj
508.path.c = .
509
510{.}.c{$(OBJDIR)}.obj:
511 $(CC) $(CCARG) $(CC1) -n$(OBJDIR)\ {$< }
512
513.cpp.obj:
514 $(CC) $(CCARG) $(CC1) $(CC2)$@ $*.cpp
515
Bram Moolenaar071d4272004-06-13 20:20:40 +0000516vimmain = \
517 $(OBJDIR)\os_w32exe.obj
518!if ("$(VIMDLL)"=="yes")
519vimwinmain = \
520 $(OBJDIR)\os_w32dll.obj
521!else
522vimwinmain = \
523 $(OBJDIR)\os_w32exe.obj
524!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000525
526vimobj = \
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200527 $(OBJDIR)\arabic.obj \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200528 $(OBJDIR)\blowfish.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000529 $(OBJDIR)\buffer.obj \
530 $(OBJDIR)\charset.obj \
Bram Moolenaar07cf3822014-08-10 16:31:50 +0200531 $(OBJDIR)\crypt.obj \
532 $(OBJDIR)\crypt_zip.obj \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200533 $(OBJDIR)\dict.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000534 $(OBJDIR)\diff.obj \
535 $(OBJDIR)\digraph.obj \
536 $(OBJDIR)\edit.obj \
537 $(OBJDIR)\eval.obj \
Bram Moolenaar73dad1e2016-07-17 22:13:49 +0200538 $(OBJDIR)\evalfunc.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000539 $(OBJDIR)\ex_cmds.obj \
540 $(OBJDIR)\ex_cmds2.obj \
541 $(OBJDIR)\ex_docmd.obj \
542 $(OBJDIR)\ex_eval.obj \
543 $(OBJDIR)\ex_getln.obj \
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200544 $(OBJDIR)\farsi.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000545 $(OBJDIR)\fileio.obj \
546 $(OBJDIR)\fold.obj \
547 $(OBJDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000548 $(OBJDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000549 $(OBJDIR)\hashtab.obj \
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100550 $(OBJDIR)\json.obj \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200551 $(OBJDIR)\list.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000552 $(OBJDIR)\main.obj \
553 $(OBJDIR)\mark.obj \
554 $(OBJDIR)\memfile.obj \
555 $(OBJDIR)\memline.obj \
556 $(OBJDIR)\menu.obj \
557 $(OBJDIR)\message.obj \
558 $(OBJDIR)\misc1.obj \
559 $(OBJDIR)\misc2.obj \
560 $(OBJDIR)\move.obj \
561 $(OBJDIR)\mbyte.obj \
562 $(OBJDIR)\normal.obj \
563 $(OBJDIR)\ops.obj \
564 $(OBJDIR)\option.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000565 $(OBJDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000566 $(OBJDIR)\quickfix.obj \
567 $(OBJDIR)\regexp.obj \
568 $(OBJDIR)\screen.obj \
569 $(OBJDIR)\search.obj \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200570 $(OBJDIR)\sha256.obj \
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100571 $(OBJDIR)\sign.obj \
Bram Moolenaarfc735152005-03-22 22:54:12 +0000572 $(OBJDIR)\spell.obj \
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200573 $(OBJDIR)\spellfile.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000574 $(OBJDIR)\syntax.obj \
575 $(OBJDIR)\tag.obj \
576 $(OBJDIR)\term.obj \
577 $(OBJDIR)\ui.obj \
578 $(OBJDIR)\undo.obj \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200579 $(OBJDIR)\userfunc.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000580 $(OBJDIR)\version.obj \
581 $(OBJDIR)\window.obj \
582 $(OBJDIR)\pathdef.obj
583
584!if ("$(OLE)"=="yes")
585vimobj = $(vimobj) \
586 $(OBJDIR)\if_ole.obj
587!endif
588
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200589!ifdef LUA
590vimobj = $(vimobj) \
591 $(OBJDIR)\if_lua.obj
592!endif
593
Bram Moolenaar071d4272004-06-13 20:20:40 +0000594!ifdef PERL
595vimobj = $(vimobj) \
596 $(OBJDIR)\if_perl.obj
597!endif
598
599!ifdef PYTHON
600vimobj = $(vimobj) \
601 $(OBJDIR)\if_python.obj
602!endif
603
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200604!ifdef PYTHON3
605vimobj = $(vimobj) \
606 $(OBJDIR)\if_python3.obj
607!endif
608
Bram Moolenaar071d4272004-06-13 20:20:40 +0000609!ifdef RUBY
610vimobj = $(vimobj) \
611 $(OBJDIR)\if_ruby.obj
612!endif
613
614!ifdef TCL
615vimobj = $(vimobj) \
616 $(OBJDIR)\if_tcl.obj
617!endif
618
619!if ("$(CSCOPE)"=="yes")
620vimobj = $(vimobj) \
621 $(OBJDIR)\if_cscope.obj
622!endif
623
624!if ("$(NETBEANS)"=="yes")
625vimobj = $(vimobj) \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000626 $(OBJDIR)\netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000627!endif
628
Bram Moolenaare0874f82016-01-24 20:36:41 +0100629!if ("$(CHANNEL)"=="yes")
630vimobj = $(vimobj) \
631 $(OBJDIR)\channel.obj
632!endif
633
Bram Moolenaar071d4272004-06-13 20:20:40 +0000634!ifdef XPM
635vimobj = $(vimobj) \
636 $(OBJDIR)\xpm_w32.obj
637!endif
638
639!if ("$(VIMDLL)"=="yes")
640vimdllobj = $(vimobj)
641!if ("$(DEBUG)"=="yes")
642DLLTARGET = vim32d.dll
643!else
644DLLTARGET = vim32.dll
645!endif
646!else
647DLLTARGET = joebob
648!endif
649
650!if ("$(GUI)"=="yes")
651vimobj = $(vimobj) \
652 $(vimwinmain) \
653 $(OBJDIR)\gui.obj \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000654 $(OBJDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000655 $(OBJDIR)\gui_w32.obj
656!endif
657
Bram Moolenaar071d4272004-06-13 20:20:40 +0000658vimobj = $(vimobj) \
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100659 $(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000660# Blab what we are going to do:
661MSG = Compiling $(OSTYPE) $(TARGET) $(OLETARGET), with:
662!if ("$(GUI)"=="yes")
663MSG = $(MSG) GUI
664!endif
665!if ("$(OLE)"=="yes")
666MSG = $(MSG) OLE
667!endif
668!if ("$(USEDLL)"=="yes")
669MSG = $(MSG) USEDLL
670!endif
671!if ("$(VIMDLL)"=="yes")
672MSG = $(MSG) VIMDLL
673!endif
674!if ("$(FASTCALL)"=="yes")
675MSG = $(MSG) FASTCALL
676!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000677!if ("$(IME)"=="yes")
678MSG = $(MSG) IME
679! if "$(DYNAMIC_IME)" == "yes"
680MSG = $(MSG)(dynamic)
681! endif
682!endif
683!if ("$(GETTEXT)"=="yes")
684MSG = $(MSG) GETTEXT
685!endif
686!if ("$(ICONV)"=="yes")
687MSG = $(MSG) ICONV
688!endif
689!if ("$(DEBUG)"=="yes")
690MSG = $(MSG) DEBUG
691!endif
692!if ("$(CODEGUARD)"=="yes")
693MSG = $(MSG) CODEGUARD
694!endif
695!if ("$(CSCOPE)"=="yes")
696MSG = $(MSG) CSCOPE
697!endif
698!if ("$(NETBEANS)"=="yes")
699MSG = $(MSG) NETBEANS
700!endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100701!if ("$(CHANNEL)"=="yes")
702MSG = $(MSG) CHANNEL
703!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000704!ifdef XPM
705MSG = $(MSG) XPM
706!endif
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200707!ifdef LUA
708MSG = $(MSG) LUA
709! if "$(DYNAMIC_LUA)" == "yes"
710MSG = $(MSG)(dynamic)
711! endif
712!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000713!ifdef PERL
714MSG = $(MSG) PERL
715! if "$(DYNAMIC_PERL)" == "yes"
716MSG = $(MSG)(dynamic)
717! endif
718!endif
719!ifdef PYTHON
720MSG = $(MSG) PYTHON
721! if "$(DYNAMIC_PYTHON)" == "yes"
722MSG = $(MSG)(dynamic)
723! endif
724!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200725!ifdef PYTHON3
726MSG = $(MSG) PYTHON3
727! if "$(DYNAMIC_PYTHON3)" == "yes"
728MSG = $(MSG)(dynamic)
729! endif
730!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000731!ifdef RUBY
732MSG = $(MSG) RUBY
733! if "$(DYNAMIC_RUBY)" == "yes"
734MSG = $(MSG)(dynamic)
735! endif
736!endif
737!ifdef TCL
738MSG = $(MSG) TCL
739! if "$(DYNAMIC_TCL)" == "yes"
740MSG = $(MSG)(dynamic)
741! endif
742!endif
743MSG = $(MSG) cpu=$(CPUARG)
744MSG = $(MSG) Align=$(ALIGNARG)
745
746!message $(MSG)
747
Bram Moolenaar071d4272004-06-13 20:20:40 +0000748!if ("$(VIMDLL)"=="yes")
749TARGETS = $(DLLTARGET)
750!endif
751TARGETS = $(TARGETS) $(TARGET)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000752
753# Targets:
754all: vim vimrun.exe install.exe xxd uninstal.exe GvimExt/gvimext.dll
755
756vim: $(OSTYPE) $(OBJDIR) $(OBJDIR)\bcc.cfg $(TARGETS)
757 @if exist $(OBJDIR)\version.obj del $(OBJDIR)\version.obj
758 @if exist auto\pathdef.c del auto\pathdef.c
759
760$(OSTYPE):
761 -@md $(OSTYPE)
762
763$(OBJDIR):
764 -@md $(OBJDIR)
765
766xxd:
767 @cd xxd
768 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" BCC="$(CC)"
769 @cd ..
770
771GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
772 cd GvimExt
773 $(MAKE) /f Make_bc5.mak USEDLL=$(USEDLL) BOR=$(BOR)
774 cd ..
775
776install.exe: dosinst.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000777 $(CC) $(CCARG) -WC -DWIN32 -einstall dosinst.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000778
779uninstal.exe: uninstal.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000780 $(CC) $(CCARG) -WC -DWIN32 -O2 -euninstal uninstal.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000781
782clean:
783!if "$(OS)" == "Windows_NT"
784 # For Windows NT/2000, doesn't work on Windows 95/98...
785 # $(COMSPEC) needed to ensure rmdir.exe is not run
786 -@$(COMSPEC) /C rmdir /Q /S $(OBJDIR)
787!else
788 # For Windows 95/98, doesn't work on Windows NT/2000...
789 -@deltree /y $(OBJDIR)
790!endif
791 -@del *.res
792 -@del vim32*.dll
793 -@del vim32*.lib
794 -@del *vim*.exe
795 -@del *install*.exe
796 -@del *.csm
797 -@del *.map
798 -@del *.ilc
799 -@del *.ild
800 -@del *.ilf
801 -@del *.ils
802 -@del *.tds
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200803!ifdef LUA
804 -@del lua.lib
805!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000806!ifdef PERL
807 -@del perl.lib
Bram Moolenaara16bc542018-10-14 16:25:10 +0200808 -@del if_perl.c
809 -@del auto\if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000810!endif
811!ifdef PYTHON
812 -@del python.lib
813!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200814!ifdef PYTHON3
815 -@del python3.lib
816!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000817!ifdef RUBY
818 -@del ruby.lib
819!endif
820!ifdef TCL
821 -@del tcl.lib
822!endif
823!ifdef XPM
824 -@del xpm.lib
825!endif
826 cd xxd
827 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
828 cd ..
829 cd GvimExt
830 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
831 cd ..
832
833$(DLLTARGET): $(OBJDIR) $(vimdllobj)
834 $(LINK) @&&|
835 $(LFLAGSDLL) +
836 c0d32.obj +
837 $(vimdllobj)
838 $<,$*
839!if ("$(CODEGUARD)"=="yes")
840 cg32.lib+
841!endif
842# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000843 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000844 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200845!ifdef LUA
846 $(LUA_LIB_FLAG)lua.lib+
847!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000848!ifdef PERL
849 $(PERL_LIB_FLAG)perl.lib+
850!endif
851!ifdef PYTHON
852 $(PYTHON_LIB_FLAG)python.lib+
853!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200854!ifdef PYTHON3
855 $(PYTHON3_LIB_FLAG)python3.lib+
856!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000857!ifdef RUBY
858 $(RUBY_LIB_FLAG)ruby.lib+
859!endif
860!ifdef TCL
861 $(TCL_LIB_FLAG)tcl.lib+
862!endif
863!ifdef XPM
864 xpm.lib+
865!endif
866!if ("$(USEDLL)"=="yes")
867 cw32i.lib
868!else
869 cw32.lib
870!endif
871 vim.def
Bram Moolenaar071d4272004-06-13 20:20:40 +0000872|
873
874!if ("$(VIMDLL)"=="yes")
875$(TARGET): $(OBJDIR) $(DLLTARGET) $(vimmain) $(OBJDIR)\$(RESFILE)
876!else
877$(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
878!endif
879 $(LINK) @&&|
880 $(LFLAGS) +
881 $(STARTUPOBJ) +
882!if ("$(VIMDLL)"=="yes")
883 $(vimmain)
884!else
885 $(vimobj)
886!endif
887 $<,$*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000888!if ("$(CODEGUARD)"=="yes")
889 cg32.lib+
890!endif
891# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000892 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000893 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200894!ifdef LUA
895 $(LUA_LIB_FLAG)lua.lib+
896!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000897!ifdef PERL
898 $(PERL_LIB_FLAG)perl.lib+
899!endif
900!ifdef PYTHON
901 $(PYTHON_LIB_FLAG)python.lib+
902!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200903!ifdef PYTHON3
904 $(PYTHON3_LIB_FLAG)python3.lib+
905!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906!ifdef RUBY
907 $(RUBY_LIB_FLAG)ruby.lib+
908!endif
909!ifdef TCL
910 $(TCL_LIB_FLAG)tcl.lib+
911!endif
912!ifdef XPM
913 xpm.lib+
914!endif
915!if ("$(USEDLL)"=="yes")
916 cw32i.lib
917!else
918 cw32.lib
919!endif
920
921 $(OBJDIR)\$(RESFILE)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000922|
923
924test:
925 cd testdir
926 $(MAKE) /NOLOGO -f Make_dos.mak win32
927 cd ..
928
929$(OBJDIR)\ex_docmd.obj: ex_docmd.c ex_cmds.h
930
931$(OBJDIR)\ex_eval.obj: ex_eval.c ex_cmds.h
932
933$(OBJDIR)\if_ole.obj: if_ole.cpp
934
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200935$(OBJDIR)\if_lua.obj: if_lua.c lua.lib
936 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_lua.c
937
Bram Moolenaara16bc542018-10-14 16:25:10 +0200938$(OBJDIR)\if_perl.obj: auto/if_perl.c perl.lib
939 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc auto/if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000940
Bram Moolenaara16bc542018-10-14 16:25:10 +0200941auto/if_perl.c: if_perl.xs typemap
Bram Moolenaar071d4272004-06-13 20:20:40 +0000942 $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \
Bram Moolenaara16bc542018-10-14 16:25:10 +0200943 $(PERL)\lib\ExtUtils\typemap if_perl.xs -output $@
Bram Moolenaar071d4272004-06-13 20:20:40 +0000944
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200945$(OBJDIR)\if_python.obj: if_python.c if_py_both.h python.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200946 $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
947
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200948$(OBJDIR)\if_python3.obj: if_python3.c if_py_both.h python3.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200949 $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000950
951$(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib
952 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_ruby.c
953
954$(OBJDIR)\if_tcl.obj: if_tcl.c tcl.lib
955 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_tcl.c
956
957$(OBJDIR)\xpm_w32.obj: xpm_w32.c xpm.lib
958 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc xpm_w32.c
959
960$(OBJDIR)\netbeans.obj: netbeans.c $(NBDEBUG_DEP)
961 $(CC) $(CCARG) $(CC1) $(CC2)$@ netbeans.c
962
Bram Moolenaare0874f82016-01-24 20:36:41 +0100963$(OBJDIR)\channel.obj: channel.c
964 $(CC) $(CCARG) $(CC1) $(CC2)$@ channel.c
965
Bram Moolenaar071d4272004-06-13 20:20:40 +0000966$(OBJDIR)\vim.res: vim.rc version.h tools.bmp tearoff.bmp \
967 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
968 $(BRC) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc @&&|
969 $(DEFINES)
970|
971
972$(OBJDIR)\pathdef.obj: auto\pathdef.c
973 $(CC) $(CCARG) $(CC1) $(CC2)$@ auto\pathdef.c
974
975
976# Need to escape both quotes and backslashes in $INTERP_DEFINES
977INTERP_DEFINES_ESC_BKS=$(INTERP_DEFINES:\=\\)
978INTERP_DEFINES_ESC=$(INTERP_DEFINES_ESC_BKS:"=\")
979
980# Note: the silly /*"*/ below are there to trick make into accepting
981# the # character as something other than a comment without messing up
982# the preprocessor directive.
983auto\pathdef.c::
984 -@md auto
985 @echo creating auto/pathdef.c
986 @copy /y &&|
987/* pathdef.c */
988/*"*/#include "vim.h"/*"*/
989
990char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)";
991char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)";
992char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS:\=\\) $(DEFINES) $(MBDEFINES) $(INTERP_DEFINES_ESC) $(OPT) $(EXETYPE) $(CPUARG) $(ALIGNARG) $(DEBUG_FLAG) $(CODEGUARD_FLAG)";
993char_u *all_lflags = (char_u *)"$(LINK:\=\\) $(LFLAGS:\=\\)";
994char_u *compiled_user = (char_u *)"$(USERNAME)";
995char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";
996| auto\pathdef.c
997
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200998lua.lib: $(LUA)\lib\lua$(LUA_VER).lib
999 coff2omf $(LUA)\lib\lua$(LUA_VER).lib $@
1000
Bram Moolenaar071d4272004-06-13 20:20:40 +00001001perl.lib: $(PERL)\lib\CORE\perl$(PERL_VER).lib
1002 coff2omf $(PERL)\lib\CORE\perl$(PERL_VER).lib $@
1003
1004python.lib: $(PYTHON)\libs\python$(PYTHON_VER).lib
1005 coff2omf $(PYTHON)\libs\python$(PYTHON_VER).lib $@
1006
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001007python3.lib: $(PYTHON3)\libs\python$(PYTHON3_VER).lib
1008 coff2omf $(PYTHON3)\libs\python$(PYTHON3_VER).lib $@
1009
Bram Moolenaar071d4272004-06-13 20:20:40 +00001010ruby.lib: $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
1011 coff2omf $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib $@
1012
1013# For some reason, the coff2omf method doesn't work on libXpm.lib, so
1014# we have to manually generate an import library straight from the DLL.
1015xpm.lib: $(XPM)\lib\libXpm.lib
1016 implib -a $@ $(XPM)\bin\libXpm.dll
1017
1018tcl.lib: $(TCL_LIB)
1019!if ("$(DYNAMIC_TCL)" == "yes")
1020 copy $(TCL_LIB) $@
1021!else
1022 coff2omf $(TCL_LIB) $@
1023!endif
1024
1025!if ("$(DYNAMIC_TCL)" == "yes")
1026tclstub$(TCL_VER)-bor.lib:
1027 -@IF NOT EXIST $@ ECHO You must download tclstub$(TCL_VER)-bor.lib separately and\
1028 place it in the src directory in order to compile a dynamic TCL-enabled\
1029 (g)vim with the Borland compiler. You can get the tclstub$(TCL_VER)-bor.lib file\
1030 at http://mywebpage.netscape.com/sharppeople/vim/tclstub$(TCL_VER)-bor.lib
1031!endif
1032
1033# vimrun.exe:
1034vimrun.exe: vimrun.c
1035!if ("$(USEDLL)"=="yes")
1036 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) -D_RTLDLL vimrun.c cw32mti.lib
1037!else
1038 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) vimrun.c
1039!endif
1040
1041# The dependency on $(OBJDIR) is to have bcc.cfg generated each time.
1042$(OBJDIR)\bcc.cfg: Make_bc5.mak $(OBJDIR)
1043 copy /y &&|
1044 $(CFLAGS)
1045 -L$(LIB)
1046 $(DEFINES)
1047 $(MBDEFINES)
1048 $(INTERP_DEFINES)
1049 $(EXETYPE)
1050 $(DEBUG_FLAG)
1051 $(OPT)
1052 $(CODEGUARD_FLAG)
1053 $(CPUARG)
1054 $(ALIGNARG)
1055| $@
1056
1057# vi:set sts=4 sw=4:
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001058