blob: d0d31d4eb94ecade06b3475b981aab5edb7f0541 [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 Moolenaar3e460fd2019-01-26 16:21:07 +0100528 $(OBJDIR)\autocmd.obj \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200529 $(OBJDIR)\blowfish.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000530 $(OBJDIR)\buffer.obj \
531 $(OBJDIR)\charset.obj \
Bram Moolenaar07cf3822014-08-10 16:31:50 +0200532 $(OBJDIR)\crypt.obj \
533 $(OBJDIR)\crypt_zip.obj \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200534 $(OBJDIR)\dict.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000535 $(OBJDIR)\diff.obj \
536 $(OBJDIR)\digraph.obj \
537 $(OBJDIR)\edit.obj \
538 $(OBJDIR)\eval.obj \
Bram Moolenaar73dad1e2016-07-17 22:13:49 +0200539 $(OBJDIR)\evalfunc.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000540 $(OBJDIR)\ex_cmds.obj \
541 $(OBJDIR)\ex_cmds2.obj \
542 $(OBJDIR)\ex_docmd.obj \
543 $(OBJDIR)\ex_eval.obj \
544 $(OBJDIR)\ex_getln.obj \
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200545 $(OBJDIR)\farsi.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000546 $(OBJDIR)\fileio.obj \
547 $(OBJDIR)\fold.obj \
548 $(OBJDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000549 $(OBJDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000550 $(OBJDIR)\hashtab.obj \
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100551 $(OBJDIR)\json.obj \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200552 $(OBJDIR)\list.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000553 $(OBJDIR)\main.obj \
554 $(OBJDIR)\mark.obj \
555 $(OBJDIR)\memfile.obj \
556 $(OBJDIR)\memline.obj \
557 $(OBJDIR)\menu.obj \
558 $(OBJDIR)\message.obj \
559 $(OBJDIR)\misc1.obj \
560 $(OBJDIR)\misc2.obj \
561 $(OBJDIR)\move.obj \
562 $(OBJDIR)\mbyte.obj \
563 $(OBJDIR)\normal.obj \
564 $(OBJDIR)\ops.obj \
565 $(OBJDIR)\option.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000566 $(OBJDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000567 $(OBJDIR)\quickfix.obj \
568 $(OBJDIR)\regexp.obj \
569 $(OBJDIR)\screen.obj \
570 $(OBJDIR)\search.obj \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200571 $(OBJDIR)\sha256.obj \
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100572 $(OBJDIR)\sign.obj \
Bram Moolenaarfc735152005-03-22 22:54:12 +0000573 $(OBJDIR)\spell.obj \
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200574 $(OBJDIR)\spellfile.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000575 $(OBJDIR)\syntax.obj \
576 $(OBJDIR)\tag.obj \
577 $(OBJDIR)\term.obj \
578 $(OBJDIR)\ui.obj \
579 $(OBJDIR)\undo.obj \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200580 $(OBJDIR)\userfunc.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000581 $(OBJDIR)\version.obj \
582 $(OBJDIR)\window.obj \
583 $(OBJDIR)\pathdef.obj
584
585!if ("$(OLE)"=="yes")
586vimobj = $(vimobj) \
587 $(OBJDIR)\if_ole.obj
588!endif
589
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200590!ifdef LUA
591vimobj = $(vimobj) \
592 $(OBJDIR)\if_lua.obj
593!endif
594
Bram Moolenaar071d4272004-06-13 20:20:40 +0000595!ifdef PERL
596vimobj = $(vimobj) \
597 $(OBJDIR)\if_perl.obj
598!endif
599
600!ifdef PYTHON
601vimobj = $(vimobj) \
602 $(OBJDIR)\if_python.obj
603!endif
604
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200605!ifdef PYTHON3
606vimobj = $(vimobj) \
607 $(OBJDIR)\if_python3.obj
608!endif
609
Bram Moolenaar071d4272004-06-13 20:20:40 +0000610!ifdef RUBY
611vimobj = $(vimobj) \
612 $(OBJDIR)\if_ruby.obj
613!endif
614
615!ifdef TCL
616vimobj = $(vimobj) \
617 $(OBJDIR)\if_tcl.obj
618!endif
619
620!if ("$(CSCOPE)"=="yes")
621vimobj = $(vimobj) \
622 $(OBJDIR)\if_cscope.obj
623!endif
624
625!if ("$(NETBEANS)"=="yes")
626vimobj = $(vimobj) \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000627 $(OBJDIR)\netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000628!endif
629
Bram Moolenaare0874f82016-01-24 20:36:41 +0100630!if ("$(CHANNEL)"=="yes")
631vimobj = $(vimobj) \
632 $(OBJDIR)\channel.obj
633!endif
634
Bram Moolenaar071d4272004-06-13 20:20:40 +0000635!ifdef XPM
636vimobj = $(vimobj) \
637 $(OBJDIR)\xpm_w32.obj
638!endif
639
640!if ("$(VIMDLL)"=="yes")
641vimdllobj = $(vimobj)
642!if ("$(DEBUG)"=="yes")
643DLLTARGET = vim32d.dll
644!else
645DLLTARGET = vim32.dll
646!endif
647!else
648DLLTARGET = joebob
649!endif
650
651!if ("$(GUI)"=="yes")
652vimobj = $(vimobj) \
653 $(vimwinmain) \
654 $(OBJDIR)\gui.obj \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000655 $(OBJDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000656 $(OBJDIR)\gui_w32.obj
657!endif
658
Bram Moolenaar071d4272004-06-13 20:20:40 +0000659vimobj = $(vimobj) \
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100660 $(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000661# Blab what we are going to do:
662MSG = Compiling $(OSTYPE) $(TARGET) $(OLETARGET), with:
663!if ("$(GUI)"=="yes")
664MSG = $(MSG) GUI
665!endif
666!if ("$(OLE)"=="yes")
667MSG = $(MSG) OLE
668!endif
669!if ("$(USEDLL)"=="yes")
670MSG = $(MSG) USEDLL
671!endif
672!if ("$(VIMDLL)"=="yes")
673MSG = $(MSG) VIMDLL
674!endif
675!if ("$(FASTCALL)"=="yes")
676MSG = $(MSG) FASTCALL
677!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000678!if ("$(IME)"=="yes")
679MSG = $(MSG) IME
680! if "$(DYNAMIC_IME)" == "yes"
681MSG = $(MSG)(dynamic)
682! endif
683!endif
684!if ("$(GETTEXT)"=="yes")
685MSG = $(MSG) GETTEXT
686!endif
687!if ("$(ICONV)"=="yes")
688MSG = $(MSG) ICONV
689!endif
690!if ("$(DEBUG)"=="yes")
691MSG = $(MSG) DEBUG
692!endif
693!if ("$(CODEGUARD)"=="yes")
694MSG = $(MSG) CODEGUARD
695!endif
696!if ("$(CSCOPE)"=="yes")
697MSG = $(MSG) CSCOPE
698!endif
699!if ("$(NETBEANS)"=="yes")
700MSG = $(MSG) NETBEANS
701!endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100702!if ("$(CHANNEL)"=="yes")
703MSG = $(MSG) CHANNEL
704!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000705!ifdef XPM
706MSG = $(MSG) XPM
707!endif
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200708!ifdef LUA
709MSG = $(MSG) LUA
710! if "$(DYNAMIC_LUA)" == "yes"
711MSG = $(MSG)(dynamic)
712! endif
713!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000714!ifdef PERL
715MSG = $(MSG) PERL
716! if "$(DYNAMIC_PERL)" == "yes"
717MSG = $(MSG)(dynamic)
718! endif
719!endif
720!ifdef PYTHON
721MSG = $(MSG) PYTHON
722! if "$(DYNAMIC_PYTHON)" == "yes"
723MSG = $(MSG)(dynamic)
724! endif
725!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200726!ifdef PYTHON3
727MSG = $(MSG) PYTHON3
728! if "$(DYNAMIC_PYTHON3)" == "yes"
729MSG = $(MSG)(dynamic)
730! endif
731!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000732!ifdef RUBY
733MSG = $(MSG) RUBY
734! if "$(DYNAMIC_RUBY)" == "yes"
735MSG = $(MSG)(dynamic)
736! endif
737!endif
738!ifdef TCL
739MSG = $(MSG) TCL
740! if "$(DYNAMIC_TCL)" == "yes"
741MSG = $(MSG)(dynamic)
742! endif
743!endif
744MSG = $(MSG) cpu=$(CPUARG)
745MSG = $(MSG) Align=$(ALIGNARG)
746
747!message $(MSG)
748
Bram Moolenaar071d4272004-06-13 20:20:40 +0000749!if ("$(VIMDLL)"=="yes")
750TARGETS = $(DLLTARGET)
751!endif
752TARGETS = $(TARGETS) $(TARGET)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000753
754# Targets:
755all: vim vimrun.exe install.exe xxd uninstal.exe GvimExt/gvimext.dll
756
757vim: $(OSTYPE) $(OBJDIR) $(OBJDIR)\bcc.cfg $(TARGETS)
758 @if exist $(OBJDIR)\version.obj del $(OBJDIR)\version.obj
759 @if exist auto\pathdef.c del auto\pathdef.c
760
761$(OSTYPE):
762 -@md $(OSTYPE)
763
764$(OBJDIR):
765 -@md $(OBJDIR)
766
767xxd:
768 @cd xxd
769 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" BCC="$(CC)"
770 @cd ..
771
772GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
773 cd GvimExt
774 $(MAKE) /f Make_bc5.mak USEDLL=$(USEDLL) BOR=$(BOR)
775 cd ..
776
777install.exe: dosinst.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000778 $(CC) $(CCARG) -WC -DWIN32 -einstall dosinst.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000779
780uninstal.exe: uninstal.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000781 $(CC) $(CCARG) -WC -DWIN32 -O2 -euninstal uninstal.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000782
783clean:
784!if "$(OS)" == "Windows_NT"
785 # For Windows NT/2000, doesn't work on Windows 95/98...
786 # $(COMSPEC) needed to ensure rmdir.exe is not run
787 -@$(COMSPEC) /C rmdir /Q /S $(OBJDIR)
788!else
789 # For Windows 95/98, doesn't work on Windows NT/2000...
790 -@deltree /y $(OBJDIR)
791!endif
792 -@del *.res
793 -@del vim32*.dll
794 -@del vim32*.lib
795 -@del *vim*.exe
796 -@del *install*.exe
797 -@del *.csm
798 -@del *.map
799 -@del *.ilc
800 -@del *.ild
801 -@del *.ilf
802 -@del *.ils
803 -@del *.tds
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200804!ifdef LUA
805 -@del lua.lib
806!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000807!ifdef PERL
808 -@del perl.lib
Bram Moolenaara16bc542018-10-14 16:25:10 +0200809 -@del if_perl.c
810 -@del auto\if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000811!endif
812!ifdef PYTHON
813 -@del python.lib
814!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200815!ifdef PYTHON3
816 -@del python3.lib
817!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000818!ifdef RUBY
819 -@del ruby.lib
820!endif
821!ifdef TCL
822 -@del tcl.lib
823!endif
824!ifdef XPM
825 -@del xpm.lib
826!endif
827 cd xxd
828 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
829 cd ..
830 cd GvimExt
831 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
832 cd ..
833
834$(DLLTARGET): $(OBJDIR) $(vimdllobj)
835 $(LINK) @&&|
836 $(LFLAGSDLL) +
837 c0d32.obj +
838 $(vimdllobj)
839 $<,$*
840!if ("$(CODEGUARD)"=="yes")
841 cg32.lib+
842!endif
843# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000844 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000845 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200846!ifdef LUA
847 $(LUA_LIB_FLAG)lua.lib+
848!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000849!ifdef PERL
850 $(PERL_LIB_FLAG)perl.lib+
851!endif
852!ifdef PYTHON
853 $(PYTHON_LIB_FLAG)python.lib+
854!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200855!ifdef PYTHON3
856 $(PYTHON3_LIB_FLAG)python3.lib+
857!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000858!ifdef RUBY
859 $(RUBY_LIB_FLAG)ruby.lib+
860!endif
861!ifdef TCL
862 $(TCL_LIB_FLAG)tcl.lib+
863!endif
864!ifdef XPM
865 xpm.lib+
866!endif
867!if ("$(USEDLL)"=="yes")
868 cw32i.lib
869!else
870 cw32.lib
871!endif
872 vim.def
Bram Moolenaar071d4272004-06-13 20:20:40 +0000873|
874
875!if ("$(VIMDLL)"=="yes")
876$(TARGET): $(OBJDIR) $(DLLTARGET) $(vimmain) $(OBJDIR)\$(RESFILE)
877!else
878$(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
879!endif
880 $(LINK) @&&|
881 $(LFLAGS) +
882 $(STARTUPOBJ) +
883!if ("$(VIMDLL)"=="yes")
884 $(vimmain)
885!else
886 $(vimobj)
887!endif
888 $<,$*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000889!if ("$(CODEGUARD)"=="yes")
890 cg32.lib+
891!endif
892# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000893 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000894 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200895!ifdef LUA
896 $(LUA_LIB_FLAG)lua.lib+
897!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000898!ifdef PERL
899 $(PERL_LIB_FLAG)perl.lib+
900!endif
901!ifdef PYTHON
902 $(PYTHON_LIB_FLAG)python.lib+
903!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200904!ifdef PYTHON3
905 $(PYTHON3_LIB_FLAG)python3.lib+
906!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000907!ifdef RUBY
908 $(RUBY_LIB_FLAG)ruby.lib+
909!endif
910!ifdef TCL
911 $(TCL_LIB_FLAG)tcl.lib+
912!endif
913!ifdef XPM
914 xpm.lib+
915!endif
916!if ("$(USEDLL)"=="yes")
917 cw32i.lib
918!else
919 cw32.lib
920!endif
921
922 $(OBJDIR)\$(RESFILE)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000923|
924
925test:
926 cd testdir
927 $(MAKE) /NOLOGO -f Make_dos.mak win32
928 cd ..
929
930$(OBJDIR)\ex_docmd.obj: ex_docmd.c ex_cmds.h
931
932$(OBJDIR)\ex_eval.obj: ex_eval.c ex_cmds.h
933
934$(OBJDIR)\if_ole.obj: if_ole.cpp
935
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200936$(OBJDIR)\if_lua.obj: if_lua.c lua.lib
937 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_lua.c
938
Bram Moolenaara16bc542018-10-14 16:25:10 +0200939$(OBJDIR)\if_perl.obj: auto/if_perl.c perl.lib
940 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc auto/if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000941
Bram Moolenaara16bc542018-10-14 16:25:10 +0200942auto/if_perl.c: if_perl.xs typemap
Bram Moolenaar071d4272004-06-13 20:20:40 +0000943 $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \
Bram Moolenaara16bc542018-10-14 16:25:10 +0200944 $(PERL)\lib\ExtUtils\typemap if_perl.xs -output $@
Bram Moolenaar071d4272004-06-13 20:20:40 +0000945
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200946$(OBJDIR)\if_python.obj: if_python.c if_py_both.h python.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200947 $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
948
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200949$(OBJDIR)\if_python3.obj: if_python3.c if_py_both.h python3.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200950 $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000951
952$(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib
953 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_ruby.c
954
955$(OBJDIR)\if_tcl.obj: if_tcl.c tcl.lib
956 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_tcl.c
957
958$(OBJDIR)\xpm_w32.obj: xpm_w32.c xpm.lib
959 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc xpm_w32.c
960
961$(OBJDIR)\netbeans.obj: netbeans.c $(NBDEBUG_DEP)
962 $(CC) $(CCARG) $(CC1) $(CC2)$@ netbeans.c
963
Bram Moolenaare0874f82016-01-24 20:36:41 +0100964$(OBJDIR)\channel.obj: channel.c
965 $(CC) $(CCARG) $(CC1) $(CC2)$@ channel.c
966
Bram Moolenaar071d4272004-06-13 20:20:40 +0000967$(OBJDIR)\vim.res: vim.rc version.h tools.bmp tearoff.bmp \
968 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
969 $(BRC) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc @&&|
970 $(DEFINES)
971|
972
973$(OBJDIR)\pathdef.obj: auto\pathdef.c
974 $(CC) $(CCARG) $(CC1) $(CC2)$@ auto\pathdef.c
975
976
977# Need to escape both quotes and backslashes in $INTERP_DEFINES
978INTERP_DEFINES_ESC_BKS=$(INTERP_DEFINES:\=\\)
979INTERP_DEFINES_ESC=$(INTERP_DEFINES_ESC_BKS:"=\")
980
981# Note: the silly /*"*/ below are there to trick make into accepting
982# the # character as something other than a comment without messing up
983# the preprocessor directive.
984auto\pathdef.c::
985 -@md auto
986 @echo creating auto/pathdef.c
987 @copy /y &&|
988/* pathdef.c */
989/*"*/#include "vim.h"/*"*/
990
991char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)";
992char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)";
993char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS:\=\\) $(DEFINES) $(MBDEFINES) $(INTERP_DEFINES_ESC) $(OPT) $(EXETYPE) $(CPUARG) $(ALIGNARG) $(DEBUG_FLAG) $(CODEGUARD_FLAG)";
994char_u *all_lflags = (char_u *)"$(LINK:\=\\) $(LFLAGS:\=\\)";
995char_u *compiled_user = (char_u *)"$(USERNAME)";
996char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";
997| auto\pathdef.c
998
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200999lua.lib: $(LUA)\lib\lua$(LUA_VER).lib
1000 coff2omf $(LUA)\lib\lua$(LUA_VER).lib $@
1001
Bram Moolenaar071d4272004-06-13 20:20:40 +00001002perl.lib: $(PERL)\lib\CORE\perl$(PERL_VER).lib
1003 coff2omf $(PERL)\lib\CORE\perl$(PERL_VER).lib $@
1004
1005python.lib: $(PYTHON)\libs\python$(PYTHON_VER).lib
1006 coff2omf $(PYTHON)\libs\python$(PYTHON_VER).lib $@
1007
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001008python3.lib: $(PYTHON3)\libs\python$(PYTHON3_VER).lib
1009 coff2omf $(PYTHON3)\libs\python$(PYTHON3_VER).lib $@
1010
Bram Moolenaar071d4272004-06-13 20:20:40 +00001011ruby.lib: $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
1012 coff2omf $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib $@
1013
1014# For some reason, the coff2omf method doesn't work on libXpm.lib, so
1015# we have to manually generate an import library straight from the DLL.
1016xpm.lib: $(XPM)\lib\libXpm.lib
1017 implib -a $@ $(XPM)\bin\libXpm.dll
1018
1019tcl.lib: $(TCL_LIB)
1020!if ("$(DYNAMIC_TCL)" == "yes")
1021 copy $(TCL_LIB) $@
1022!else
1023 coff2omf $(TCL_LIB) $@
1024!endif
1025
1026!if ("$(DYNAMIC_TCL)" == "yes")
1027tclstub$(TCL_VER)-bor.lib:
1028 -@IF NOT EXIST $@ ECHO You must download tclstub$(TCL_VER)-bor.lib separately and\
1029 place it in the src directory in order to compile a dynamic TCL-enabled\
1030 (g)vim with the Borland compiler. You can get the tclstub$(TCL_VER)-bor.lib file\
1031 at http://mywebpage.netscape.com/sharppeople/vim/tclstub$(TCL_VER)-bor.lib
1032!endif
1033
1034# vimrun.exe:
1035vimrun.exe: vimrun.c
1036!if ("$(USEDLL)"=="yes")
1037 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) -D_RTLDLL vimrun.c cw32mti.lib
1038!else
1039 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) vimrun.c
1040!endif
1041
1042# The dependency on $(OBJDIR) is to have bcc.cfg generated each time.
1043$(OBJDIR)\bcc.cfg: Make_bc5.mak $(OBJDIR)
1044 copy /y &&|
1045 $(CFLAGS)
1046 -L$(LIB)
1047 $(DEFINES)
1048 $(MBDEFINES)
1049 $(INTERP_DEFINES)
1050 $(EXETYPE)
1051 $(DEBUG_FLAG)
1052 $(OPT)
1053 $(CODEGUARD_FLAG)
1054 $(CPUARG)
1055 $(ALIGNARG)
1056| $@
1057
1058# vi:set sts=4 sw=4:
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001059