blob: cb48ce05a36575cc75c69ecfa2f2eb54b2cc8f30 [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
4# Targets: Dos16 or Win32 (Windows NT and Windows 95) (with/without GUI)
5#
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
10# 6/1997 - added support for 16 bit DOS
11# Note: this has been tested, and works, for BC5. Your mileage may vary.
12# Has been reported NOT to work with BC 4.52. Maybe it can be fixed?
13# 10/1997 - ron - fixed bugs w/ BC 5.02
14# 8/1998 - ron - updated with new targets, fixed some stuff
15# 3/2000 - Bram: Made it work with BC 5.5 free command line compiler,
16# cleaned up variables.
17# 6/2001 - Dan - Added support for compiling Python and TCL
18# 7/2001 - Dan - Added support for compiling Ruby
19#
20# It builds on Windows 95 and NT-Intel, producing the same binary in either
21# case. To build using Microsoft Visual C++, use Make_mvc.mak.
22#
23# This should work with the free Borland command line compiler, version 5.5.
24# You need at least sp1 (service pack 1). With sp2 it compiles faster.
25# Use a command like this:
26# <path>\bin\make /f Make_bc5.mak BOR=<path>
27#
28
29# let the make utility do the hard work:
30.AUTODEPEND
31.CACHEAUTODEPEND
32
33# VARIABLES:
34# name value (default)
35#
36# BOR path to root of Borland C install (c:\bc5)
37# LINK name of the linker ($(BOR)\bin\ilink if OSTYPE is DOS16,
38# $(BOR)\bin\ilink32 otherwise)
39# 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)
64# MBYTE no or yes: set to yes for multi-byte support (yes)
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000065# NOTE: multi-byte support is broken in the Borland libraries,
66# not everything will work properly! Esp. handling multi-byte
67# file names.
Bram Moolenaar071d4272004-06-13 20:20:40 +000068# IME no or yes: set to yes for multi-byte IME support (yes)
69# DYNAMIC_IME no or yes: set to yes to load imm32.dll dynamically (yes)
70# GETTEXT no or yes: set to yes for multi-language support (yes)
71# ICONV no or yes: set to yes for dynamic iconv support (yes)
72# OLE no or yes: set to yes to make OLE gvim (no)
73# OSTYPE DOS16 or WIN32 (WIN32)
74# DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
75# CODEGUARD no or yes: set to yes if you want to use CODEGUARD (no)
76# CPUNR 1 through 6: select -CPU argument to compile with (3)
77# 3 for 386, 4 for 486, 5 for pentium, 6 for pentium pro.
78# USEDLL no or yes: set to yes to use the Runtime library DLL (no)
79# For USEDLL=yes the cc3250.dll is required to run Vim.
80# VIMDLL no or yes: create vim32.dll, and stub (g)vim.exe (no)
81# ALIGN 1, 2 or 4: Alignment to use (4 for Win32, 2 for DOS16)
82# FASTCALL no or yes: set to yes to use register-based function protocol (yes)
83# OPTIMIZE SPACE, SPEED, or MAXSPEED: type of optimization (MAXSPEED)
84# POSTSCRIPT no or yes: set to yes for PostScript printing
85# FEATURES TINY, SMALL, NORMAL, BIG or HUGE
86# (BIG for WIN32, SMALL for DOS16)
87# WINVER 0x0400 or 0x0500: minimum Win32 version to support (0x0400)
88# CSCOPE no or yes: include support for Cscope interface (yes)
Bram Moolenaare0874f82016-01-24 20:36:41 +010089# NETBEANS no or yes: include support for Netbeans interface; also
90# requires CHANNEL (yes if GUI
Bram Moolenaar071d4272004-06-13 20:20:40 +000091# is yes)
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000092# NBDEBUG no or yes: include support for debugging Netbeans interface (no)
Bram Moolenaare0874f82016-01-24 20:36:41 +010093# CHANNEL no or yes: include support for inter process communication (yes
94# if GUI is yes)
Bram Moolenaar071d4272004-06-13 20:20:40 +000095# XPM define to path to XPM dir to get support for loading XPM images.
96
97### BOR: root of the BC installation
98!if ("$(BOR)"=="")
99BOR = c:\bc5
100!endif
101
102### LINK: Name of the linker: tlink or ilink32 (this is below, depends on
103# $(OSTYPE)
104
105### GUI: yes for GUI version, no for console version
106!if ("$(GUI)"=="")
107GUI = yes
108!endif
109
110### MBYTE: yes for multibyte support, no to disable it.
111!if ("$(MBYTE)"=="")
112MBYTE = yes
113!endif
114
115### IME: yes for multibyte support, no to disable it.
116!if ("$(IME)"=="")
117IME = yes
118!endif
119!if ("$(DYNAMIC_IME)"=="")
120DYNAMIC_IME = yes
121!endif
122
123### GETTEXT: yes for multilanguage support, no to disable it.
124!if ("$(GETTEXT)"=="")
125GETTEXT = yes
126!endif
127
128### ICONV: yes to enable dynamic-iconv support, no to disable it
129!if ("$(ICONV)"=="")
130ICONV = yes
131!endif
132
133### CSCOPE: yes to enable Cscope support, no to disable it
134!if ("$(CSCOPE)"=="")
135CSCOPE = yes
136!endif
137
138### NETBEANS: yes to enable NetBeans interface support, no to disable it
139!if ("$(NETBEANS)"=="") && ("$(GUI)"=="yes")
140NETBEANS = yes
141!endif
142
Bram Moolenaare0874f82016-01-24 20:36:41 +0100143### CHANNEL: yes to enable inter process communication, no to disable it
144!if ("$(CHANNEL)"=="") && ("$(GUI)"=="yes")
145CHANNEL = yes
146!endif
147
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200148### LUA: uncomment this line if you want lua support in vim
149# LUA=c:\lua
150
Bram Moolenaar071d4272004-06-13 20:20:40 +0000151### PERL: uncomment this line if you want perl support in vim
152# PERL=c:\perl
153
154### PYTHON: uncomment this line if you want python support in vim
155# PYTHON=c:\python22
156
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200157### PYTHON3: uncomment this line if you want python3 support in vim
158# PYTHON3=c:\python31
159
Bram Moolenaar071d4272004-06-13 20:20:40 +0000160### RUBY: uncomment this line if you want ruby support in vim
161# RUBY=c:\ruby
162
163### TCL: uncomment this line if you want tcl support in vim
164# TCL=c:\tcl
165
166### OLE: no for normal gvim, yes for OLE-capable gvim (only works with GUI)
167#OLE = yes
168
169### OSTYPE: DOS16 for Windows 3.1 version, WIN32 for Windows 95/98/NT/2000
170# version
171!if ("$(OSTYPE)"=="")
172OSTYPE = WIN32
173!endif
174
175### DEBUG: Uncomment to make an executable for debugging
176# DEBUG = yes
177!if ("$(DEBUG)"=="yes")
178DEBUG_FLAG = -v
179!endif
180
181### CODEGUARD: Uncomment to use the CODEGUARD stuff (BC 5.0 or later):
182# CODEGUARD = yes
183!if ("$(CODEGUARD)"=="yes")
184CODEGUARD_FLAG = -vG
185!endif
186
187### CPUNR: set your target processor (3 to 6)
188!if ("$(CPUNR)" == "i386") || ("$(CPUNR)" == "3")
189CPUNR = 3
190!elif ("$(CPUNR)" == "i486") || ("$(CPUNR)" == "4")
191CPUNR = 4
192!elif ("$(CPUNR)" == "i586") || ("$(CPUNR)" == "5")
193CPUNR = 5
194!elif ("$(CPUNR)" == "i686") || ("$(CPUNR)" == "6")
195CPUNR = 6
196!else
197CPUNR = 3
198!endif
199
200### Comment out to use precompiled headers (faster, but uses lots of disk!)
201HEADERS = -H -H=vim.csm -Hc
202
203### USEDLL: no for statically linked version of run-time, yes for DLL runtime
204!if ("$(USEDLL)"=="")
205USEDLL = no
206!endif
207
208### VIMDLL: yes for a DLL version of VIM (NOT RECOMMENDED), no otherwise
209#VIMDLL = yes
210
211### ALIGN: alignment you desire: (1,2 or 4: s/b 4 for Win32, 2 for DOS)
212!if ("$(ALIGN)"=="")
213!if ($(OSTYPE)==DOS16)
214ALIGN = 2
215!else
216ALIGN = 4
217!endif
218!endif
219
220### FASTCALL: yes to use FASTCALL calling convention (RECOMMENDED!), no otherwise
221# Incompatible when calling external functions (like MSVC-compiled DLLs), so
222# don't use FASTCALL when linking with external libs.
223!if ("$(FASTCALL)"=="") && \
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200224 ("$(LUA)"=="") && \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000225 ("$(PYTHON)"=="") && \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200226 ("$(PYTHON3)"=="") && \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000227 ("$(PERL)"=="") && \
228 ("$(TCL)"=="") && \
229 ("$(RUBY)"=="") && \
230 ("$(ICONV)"!="yes") && \
231 ("$(IME)"!="yes") && \
232 ("$(MBYTE)"!="yes") && \
233 ("$(XPM)"=="")
234FASTCALL = yes
235!endif
236
237### OPTIMIZE: SPEED to optimize for speed, SPACE otherwise (SPEED RECOMMENDED)
238!if ("$(OPTIMIZE)"=="")
239OPTIMIZE = MAXSPEED
240!endif
241
242### FEATURES: TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32, SMALL for DOS16)
243!if ("$(FEATURES)"=="")
244! if ($(OSTYPE)==DOS16)
245FEATURES = SMALL
246! else
247FEATURES = BIG
248! endif
249!endif
250
251### POSTSCRIPT: uncomment this line if you want PostScript printing
252#POSTSCRIPT = yes
253
254###
255# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
256# default, use these lines.
257#VIMRCLOC = somewhere
258#VIMRUNTIMEDIR = somewhere
259
260### Set the default $(WINVER) to make it work with Bcc 5.5.
261!ifndef WINVER
262WINVER = 0x0400
263!endif
264
265#
266# Sanity checks for the above options:
267#
268
269!if ($(OSTYPE)==DOS16)
270!if (($(CPUNR)+0)>4)
271!error CPUNR Must be less than or equal to 4 for DOS16
272!endif
273
274!if (($(ALIGN)+0)>2)
275!error ALIGN Must be less than or equal to 2 for DOS16
276!endif
277
278!else # not DOS16
279!if (($(CPUNR)+0)<3)
280!error CPUNR Must be greater or equal to 3 for WIN32
281!endif
282!endif
283
284!if ($(OSTYPE)!=WIN32) && ($(OSTYPE)!=DOS16)
285!error Check the OSTYPE variable again: $(OSTYPE) is not supported!
286!endif
287
288#
289# Optimizations: change as desired (RECOMMENDATION: Don't change!):
290#
291!if ("$(DEBUG)"=="yes")
292OPT = -Od -N
293!else
294!if ("$(OPTIMIZE)"=="SPACE")
295OPT = -O1 -f- -d
296!elif ("$(OPTIMIZE)"=="MAXSPEED")
297OPT = -O2 -f- -d -Ocavi -O
298!else
299OPT = -O2 -f- -d -Oc -O
300!endif
301!if ("$(FASTCALL)"=="yes")
302OPT = $(OPT) -pr
303!endif
304!if ("$(CODEGUARD)"!="yes")
305OPT = $(OPT) -vi-
306!endif
307!endif
308!if ($(OSTYPE)==DOS16)
309!undef GUI
310!undef VIMDLL
311!undef USEDLL
312!endif
313# shouldn't have to change:
314LIB = $(BOR)\lib
315INCLUDE = $(BOR)\include;.;proto
316DEFINES = -DFEAT_$(FEATURES) -DWIN32 -DHAVE_PATHDEF \
317 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
318
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200319!ifdef LUA
320INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_LUA
321INCLUDE = $(LUA)\include;$(INCLUDE)
322! ifndef LUA_VER
323LUA_VER = 51
324! endif
325! if ("$(DYNAMIC_LUA)" == "yes")
326INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
327LUA_LIB_FLAG = /nodefaultlib:
328! endif
329!endif
330
Bram Moolenaar071d4272004-06-13 20:20:40 +0000331!ifdef PERL
332INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PERL
333INCLUDE = $(PERL)\lib\core;$(INCLUDE)
334! ifndef PERL_VER
335PERL_VER = 56
336! endif
337! if ("$(DYNAMIC_PERL)" == "yes")
338! if ($(PERL_VER) > 55)
339INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
340PERL_LIB_FLAG = /nodefaultlib:
341! else
342! message "Cannot dynamically load Perl versions less than 5.6. Loading statically..."
343! endif
344! endif
345!endif
346
347!ifdef PYTHON
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200348!ifdef PYTHON3
349DYNAMIC_PYTHON=yes
350DYNAMIC_PYTHON3=yes
351!endif
352!endif
353
354!ifdef PYTHON
Bram Moolenaar071d4272004-06-13 20:20:40 +0000355INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON
Bram Moolenaar071d4272004-06-13 20:20:40 +0000356!ifndef PYTHON_VER
357PYTHON_VER = 22
358!endif
359!if "$(DYNAMIC_PYTHON)" == "yes"
360INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
361PYTHON_LIB_FLAG = /nodefaultlib:
362!endif
363!endif
364
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200365!ifdef PYTHON3
366INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON3
367!ifndef PYTHON3_VER
368PYTHON3_VER = 31
369!endif
370!if "$(DYNAMIC_PYTHON3)" == "yes"
371INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
372PYTHON3_LIB_FLAG = /nodefaultlib:
373!endif
374!endif
375
376
Bram Moolenaar071d4272004-06-13 20:20:40 +0000377!ifdef RUBY
378!ifndef RUBY_VER
379RUBY_VER = 16
380!endif
381!ifndef RUBY_VER_LONG
382RUBY_VER_LONG = 1.6
383!endif
384
385!if "$(RUBY_VER)" == "16"
386!ifndef RUBY_PLATFORM
387RUBY_PLATFORM = i586-mswin32
388!endif
389!ifndef RUBY_INSTALL_NAME
390RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
391!endif
392!else
393!ifndef RUBY_PLATFORM
394RUBY_PLATFORM = i386-mswin32
395!endif
396!ifndef RUBY_INSTALL_NAME
397RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
398!endif
399!endif
400
401INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_RUBY
402INCLUDE = $(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM);$(INCLUDE)
403
404!if "$(DYNAMIC_RUBY)" == "yes"
405INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
406INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY_VER=$(RUBY_VER)
407RUBY_LIB_FLAG = /nodefaultlib:
408!endif
409!endif
410
411!ifdef TCL
412INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_TCL
413INCLUDE = $(TCL)\include;$(INCLUDE)
414!ifndef TCL_VER
415TCL_VER = 83
416!endif
417TCL_LIB = $(TCL)\lib\tcl$(TCL_VER).lib
418TCL_LIB_FLAG =
419!if "$(DYNAMIC_TCL)" == "yes"
420INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
421TCL_LIB = tclstub$(TCL_VER)-bor.lib
422TCL_LIB_FLAG =
423!endif
424!endif
425#
426# DO NOT change below:
427#
428CPUARG = -$(CPUNR)
429ALIGNARG = -a$(ALIGN)
430#
431!if ("$(DEBUG)"=="yes")
Bram Moolenaar78cf3f02014-01-10 18:16:07 +0100432DEFINES=$(DEFINES) -DDEBUG -D_DEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000433!endif
434#
435!if ("$(OLE)"=="yes")
436DEFINES = $(DEFINES) -DFEAT_OLE
437!endif
438#
439!if ("$(MBYTE)"=="yes")
440MBDEFINES = $(MBDEFINES) -DFEAT_MBYTE
441!endif
442!if ("$(IME)"=="yes")
443MBDEFINES = $(MBDEFINES) -DFEAT_MBYTE_IME
444!if ("$(DYNAMIC_IME)" == "yes")
445MBDEFINES = $(MBDEFINES) -DDYNAMIC_IME
446!endif
447!endif
448!if ("$(ICONV)"=="yes")
449MBDEFINES = $(MBDEFINES) -DDYNAMIC_ICONV
450!endif
451!if ("$(GETTEXT)"=="yes")
452MBDEFINES = $(MBDEFINES) -DDYNAMIC_GETTEXT
453!endif
454
455!if ("$(CSCOPE)"=="yes")
456DEFINES = $(DEFINES) -DFEAT_CSCOPE
457!endif
458
Bram Moolenaar071d4272004-06-13 20:20:40 +0000459!if ("$(GUI)"=="yes")
460DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
461!if ("$(DEBUG)"=="yes")
462TARGET = gvimd.exe
463!else
464TARGET = gvim.exe
465!endif
466!if ("$(VIMDLL)"=="yes")
467EXETYPE=-WD
468DEFINES = $(DEFINES) -DVIMDLL
469!else
470EXETYPE=-W
471!endif
472STARTUPOBJ = c0w32.obj
473LINK2 = -aa
474RESFILE = vim.res
475!else
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000476!undef NETBEANS
Bram Moolenaare0874f82016-01-24 20:36:41 +0100477!undef CHANNEL
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000478!undef XPM
479!undef VIMDLL
Bram Moolenaar071d4272004-06-13 20:20:40 +0000480!if ("$(DEBUG)"=="yes")
481TARGET = vimd.exe
482!else
483# for now, anyway: VIMDLL is only for the GUI version
Bram Moolenaar071d4272004-06-13 20:20:40 +0000484TARGET = vim.exe
485!endif
486!if ($(OSTYPE)==DOS16)
487DEFINES= -DFEAT_$(FEATURES) -DMSDOS
488EXETYPE=-ml
489STARTUPOBJ = c0l.obj
490LINK2 =
491!else
492EXETYPE=-WC
493STARTUPOBJ = c0x32.obj
494LINK2 = -ap -OS -o -P
495!endif
496RESFILE = vim.res
497!endif
498
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000499!if ("$(NETBEANS)"=="yes")
Bram Moolenaare0874f82016-01-24 20:36:41 +0100500!if ("$(CHANNEL)"!="yes")
501# cannot use Netbeans without CHANNEL
502NETBEANS = no
503!else
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000504DEFINES = $(DEFINES) -DFEAT_NETBEANS_INTG
505!if ("$(NBDEBUG)"=="yes")
506DEFINES = $(DEFINES) -DNBDEBUG
507NBDEBUG_DEP = nbdebug.h nbdebug.c
508!endif
509!endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100510!endif
511
512!if ("$(CHANNEL)"=="yes")
513DEFINES = $(DEFINES) -DFEAT_CHANNEL
514!endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000515
516!ifdef XPM
517!if ("$(GUI)"=="yes")
518DEFINES = $(DEFINES) -DFEAT_XPM_W32
519INCLUDE = $(XPM)\include;$(INCLUDE)
520!endif
521!endif
522
Bram Moolenaar071d4272004-06-13 20:20:40 +0000523!if ("$(USEDLL)"=="yes")
524DEFINES = $(DEFINES) -D_RTLDLL
525!endif
526
527!if ("$(DEBUG)"=="yes")
528OBJDIR = $(OSTYPE)\objdbg
529!else
530!if ("$(GUI)"=="yes")
531!if ("$(OLE)"=="yes")
532OBJDIR = $(OSTYPE)\oleobj
533!else
534OBJDIR = $(OSTYPE)\gobj
535!endif
536!else
537OBJDIR = $(OSTYPE)\obj
538!endif
539!endif
540
541!if ("$(POSTSCRIPT)"=="yes")
542DEFINES = $(DEFINES) -DMSWINPS
543!endif
544
545##### BASE COMPILER/TOOLS RULES #####
546MAKE = $(BOR)\bin\make
547CFLAGS = -w-aus -w-par -w-pch -w-ngu -w-csu -I$(INCLUDE)
548!if ($(OSTYPE)==DOS16)
549BRC =
550!if ("$(LINK)"=="")
551LINK = $(BOR)\BIN\TLink
552!endif
553CC = $(BOR)\BIN\Bcc
554LFLAGS = -Tde -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
555LFLAGSDLL =
556CFLAGS = $(CFLAGS) -H- $(HEADERS)
557!else
558BRC = $(BOR)\BIN\brc32
559!if ("$(LINK)"=="")
560LINK = $(BOR)\BIN\ILink32
561!endif
562CC = $(BOR)\BIN\Bcc32
563LFLAGS = -OS -Tpe -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
564LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
565CFLAGS = $(CFLAGS) -d -RT- -k- -Oi $(HEADERS) -f-
566!endif
567
568CC1 = -c
569CC2 = -o
570CCARG = +$(OBJDIR)\bcc.cfg
571
572# implicit rules:
573
574# Without the following, the implicit rule in BUILTINS.MAK is picked up
575# for a rule for .c.obj rather than the local implicit rule
576.SUFFIXES
577.SUFFIXES .c .obj
578.path.c = .
579
580{.}.c{$(OBJDIR)}.obj:
581 $(CC) $(CCARG) $(CC1) -n$(OBJDIR)\ {$< }
582
583.cpp.obj:
584 $(CC) $(CCARG) $(CC1) $(CC2)$@ $*.cpp
585
586!if ($(OSTYPE)==DOS16)
587!else # win32:
588vimmain = \
589 $(OBJDIR)\os_w32exe.obj
590!if ("$(VIMDLL)"=="yes")
591vimwinmain = \
592 $(OBJDIR)\os_w32dll.obj
593!else
594vimwinmain = \
595 $(OBJDIR)\os_w32exe.obj
596!endif
597!endif
598
599vimobj = \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200600 $(OBJDIR)\blowfish.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000601 $(OBJDIR)\buffer.obj \
602 $(OBJDIR)\charset.obj \
Bram Moolenaar07cf3822014-08-10 16:31:50 +0200603 $(OBJDIR)\crypt.obj \
604 $(OBJDIR)\crypt_zip.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000605 $(OBJDIR)\diff.obj \
606 $(OBJDIR)\digraph.obj \
607 $(OBJDIR)\edit.obj \
608 $(OBJDIR)\eval.obj \
609 $(OBJDIR)\ex_cmds.obj \
610 $(OBJDIR)\ex_cmds2.obj \
611 $(OBJDIR)\ex_docmd.obj \
612 $(OBJDIR)\ex_eval.obj \
613 $(OBJDIR)\ex_getln.obj \
614 $(OBJDIR)\fileio.obj \
615 $(OBJDIR)\fold.obj \
616 $(OBJDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000617 $(OBJDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000618 $(OBJDIR)\hashtab.obj \
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100619 $(OBJDIR)\json.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000620 $(OBJDIR)\main.obj \
621 $(OBJDIR)\mark.obj \
622 $(OBJDIR)\memfile.obj \
623 $(OBJDIR)\memline.obj \
624 $(OBJDIR)\menu.obj \
625 $(OBJDIR)\message.obj \
626 $(OBJDIR)\misc1.obj \
627 $(OBJDIR)\misc2.obj \
628 $(OBJDIR)\move.obj \
629 $(OBJDIR)\mbyte.obj \
630 $(OBJDIR)\normal.obj \
631 $(OBJDIR)\ops.obj \
632 $(OBJDIR)\option.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000633 $(OBJDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000634 $(OBJDIR)\quickfix.obj \
635 $(OBJDIR)\regexp.obj \
636 $(OBJDIR)\screen.obj \
637 $(OBJDIR)\search.obj \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200638 $(OBJDIR)\sha256.obj \
Bram Moolenaarfc735152005-03-22 22:54:12 +0000639 $(OBJDIR)\spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000640 $(OBJDIR)\syntax.obj \
641 $(OBJDIR)\tag.obj \
642 $(OBJDIR)\term.obj \
643 $(OBJDIR)\ui.obj \
644 $(OBJDIR)\undo.obj \
645 $(OBJDIR)\version.obj \
646 $(OBJDIR)\window.obj \
647 $(OBJDIR)\pathdef.obj
648
649!if ("$(OLE)"=="yes")
650vimobj = $(vimobj) \
651 $(OBJDIR)\if_ole.obj
652!endif
653
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200654!ifdef LUA
655vimobj = $(vimobj) \
656 $(OBJDIR)\if_lua.obj
657!endif
658
Bram Moolenaar071d4272004-06-13 20:20:40 +0000659!ifdef PERL
660vimobj = $(vimobj) \
661 $(OBJDIR)\if_perl.obj
662!endif
663
664!ifdef PYTHON
665vimobj = $(vimobj) \
666 $(OBJDIR)\if_python.obj
667!endif
668
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200669!ifdef PYTHON3
670vimobj = $(vimobj) \
671 $(OBJDIR)\if_python3.obj
672!endif
673
Bram Moolenaar071d4272004-06-13 20:20:40 +0000674!ifdef RUBY
675vimobj = $(vimobj) \
676 $(OBJDIR)\if_ruby.obj
677!endif
678
679!ifdef TCL
680vimobj = $(vimobj) \
681 $(OBJDIR)\if_tcl.obj
682!endif
683
684!if ("$(CSCOPE)"=="yes")
685vimobj = $(vimobj) \
686 $(OBJDIR)\if_cscope.obj
687!endif
688
689!if ("$(NETBEANS)"=="yes")
690vimobj = $(vimobj) \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000691 $(OBJDIR)\netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000692!endif
693
Bram Moolenaare0874f82016-01-24 20:36:41 +0100694!if ("$(CHANNEL)"=="yes")
695vimobj = $(vimobj) \
696 $(OBJDIR)\channel.obj
697!endif
698
Bram Moolenaar071d4272004-06-13 20:20:40 +0000699!ifdef XPM
700vimobj = $(vimobj) \
701 $(OBJDIR)\xpm_w32.obj
702!endif
703
704!if ("$(VIMDLL)"=="yes")
705vimdllobj = $(vimobj)
706!if ("$(DEBUG)"=="yes")
707DLLTARGET = vim32d.dll
708!else
709DLLTARGET = vim32.dll
710!endif
711!else
712DLLTARGET = joebob
713!endif
714
715!if ("$(GUI)"=="yes")
716vimobj = $(vimobj) \
717 $(vimwinmain) \
718 $(OBJDIR)\gui.obj \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000719 $(OBJDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000720 $(OBJDIR)\gui_w32.obj
721!endif
722
723!if ($(OSTYPE)==WIN32)
724vimobj = $(vimobj) \
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100725 $(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000726!elif ($(OSTYPE)==DOS16)
727vimobj = $(vimobj) \
728 $(OBJDIR)\os_msdos.obj
729!endif
730# Blab what we are going to do:
731MSG = Compiling $(OSTYPE) $(TARGET) $(OLETARGET), with:
732!if ("$(GUI)"=="yes")
733MSG = $(MSG) GUI
734!endif
735!if ("$(OLE)"=="yes")
736MSG = $(MSG) OLE
737!endif
738!if ("$(USEDLL)"=="yes")
739MSG = $(MSG) USEDLL
740!endif
741!if ("$(VIMDLL)"=="yes")
742MSG = $(MSG) VIMDLL
743!endif
744!if ("$(FASTCALL)"=="yes")
745MSG = $(MSG) FASTCALL
746!endif
747!if ("$(MBYTE)"=="yes")
748MSG = $(MSG) MBYTE
749!endif
750!if ("$(IME)"=="yes")
751MSG = $(MSG) IME
752! if "$(DYNAMIC_IME)" == "yes"
753MSG = $(MSG)(dynamic)
754! endif
755!endif
756!if ("$(GETTEXT)"=="yes")
757MSG = $(MSG) GETTEXT
758!endif
759!if ("$(ICONV)"=="yes")
760MSG = $(MSG) ICONV
761!endif
762!if ("$(DEBUG)"=="yes")
763MSG = $(MSG) DEBUG
764!endif
765!if ("$(CODEGUARD)"=="yes")
766MSG = $(MSG) CODEGUARD
767!endif
768!if ("$(CSCOPE)"=="yes")
769MSG = $(MSG) CSCOPE
770!endif
771!if ("$(NETBEANS)"=="yes")
772MSG = $(MSG) NETBEANS
773!endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100774!if ("$(CHANNEL)"=="yes")
775MSG = $(MSG) CHANNEL
776!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000777!ifdef XPM
778MSG = $(MSG) XPM
779!endif
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200780!ifdef LUA
781MSG = $(MSG) LUA
782! if "$(DYNAMIC_LUA)" == "yes"
783MSG = $(MSG)(dynamic)
784! endif
785!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000786!ifdef PERL
787MSG = $(MSG) PERL
788! if "$(DYNAMIC_PERL)" == "yes"
789MSG = $(MSG)(dynamic)
790! endif
791!endif
792!ifdef PYTHON
793MSG = $(MSG) PYTHON
794! if "$(DYNAMIC_PYTHON)" == "yes"
795MSG = $(MSG)(dynamic)
796! endif
797!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200798!ifdef PYTHON3
799MSG = $(MSG) PYTHON3
800! if "$(DYNAMIC_PYTHON3)" == "yes"
801MSG = $(MSG)(dynamic)
802! endif
803!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000804!ifdef RUBY
805MSG = $(MSG) RUBY
806! if "$(DYNAMIC_RUBY)" == "yes"
807MSG = $(MSG)(dynamic)
808! endif
809!endif
810!ifdef TCL
811MSG = $(MSG) TCL
812! if "$(DYNAMIC_TCL)" == "yes"
813MSG = $(MSG)(dynamic)
814! endif
815!endif
816MSG = $(MSG) cpu=$(CPUARG)
817MSG = $(MSG) Align=$(ALIGNARG)
818
819!message $(MSG)
820
821!if ($(OSTYPE)==DOS16)
822TARGETS = $(TARGET)
823!else
824!if ("$(VIMDLL)"=="yes")
825TARGETS = $(DLLTARGET)
826!endif
827TARGETS = $(TARGETS) $(TARGET)
828!endif
829
830# Targets:
831all: vim vimrun.exe install.exe xxd uninstal.exe GvimExt/gvimext.dll
832
833vim: $(OSTYPE) $(OBJDIR) $(OBJDIR)\bcc.cfg $(TARGETS)
834 @if exist $(OBJDIR)\version.obj del $(OBJDIR)\version.obj
835 @if exist auto\pathdef.c del auto\pathdef.c
836
837$(OSTYPE):
838 -@md $(OSTYPE)
839
840$(OBJDIR):
841 -@md $(OBJDIR)
842
843xxd:
844 @cd xxd
845 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" BCC="$(CC)"
846 @cd ..
847
848GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
849 cd GvimExt
850 $(MAKE) /f Make_bc5.mak USEDLL=$(USEDLL) BOR=$(BOR)
851 cd ..
852
853install.exe: dosinst.c $(OBJDIR)\bcc.cfg
854!if ($(OSTYPE)==WIN32)
855 $(CC) $(CCARG) -WC -DWIN32 -einstall dosinst.c
856!else
857 $(CC) $(CCARG) -WC -einstall dosinst.c
858!endif
859
860uninstal.exe: uninstal.c $(OBJDIR)\bcc.cfg
861!if ($(OSTYPE)==WIN32)
862 $(CC) $(CCARG) -WC -DWIN32 -O2 -euninstal uninstal.c
863!else
864 $(CC) $(CCARG) -WC -O2 -euninstal uninstal.c
865!endif
866
867clean:
868!if "$(OS)" == "Windows_NT"
869 # For Windows NT/2000, doesn't work on Windows 95/98...
870 # $(COMSPEC) needed to ensure rmdir.exe is not run
871 -@$(COMSPEC) /C rmdir /Q /S $(OBJDIR)
872!else
873 # For Windows 95/98, doesn't work on Windows NT/2000...
874 -@deltree /y $(OBJDIR)
875!endif
876 -@del *.res
877 -@del vim32*.dll
878 -@del vim32*.lib
879 -@del *vim*.exe
880 -@del *install*.exe
881 -@del *.csm
882 -@del *.map
883 -@del *.ilc
884 -@del *.ild
885 -@del *.ilf
886 -@del *.ils
887 -@del *.tds
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200888!ifdef LUA
889 -@del lua.lib
890!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000891!ifdef PERL
892 -@del perl.lib
893!endif
894!ifdef PYTHON
895 -@del python.lib
896!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200897!ifdef PYTHON3
898 -@del python3.lib
899!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000900!ifdef RUBY
901 -@del ruby.lib
902!endif
903!ifdef TCL
904 -@del tcl.lib
905!endif
906!ifdef XPM
907 -@del xpm.lib
908!endif
909 cd xxd
910 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
911 cd ..
912 cd GvimExt
913 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
914 cd ..
915
916$(DLLTARGET): $(OBJDIR) $(vimdllobj)
917 $(LINK) @&&|
918 $(LFLAGSDLL) +
919 c0d32.obj +
920 $(vimdllobj)
921 $<,$*
922!if ("$(CODEGUARD)"=="yes")
923 cg32.lib+
924!endif
925# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
926!if ("$(OLE)"=="yes" || $(OSTYPE)==WIN32)
927 ole2w32.lib +
928!endif
929!if ($(OSTYPE)==WIN32)
930 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200931!ifdef LUA
932 $(LUA_LIB_FLAG)lua.lib+
933!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000934!ifdef PERL
935 $(PERL_LIB_FLAG)perl.lib+
936!endif
937!ifdef PYTHON
938 $(PYTHON_LIB_FLAG)python.lib+
939!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200940!ifdef PYTHON3
941 $(PYTHON3_LIB_FLAG)python3.lib+
942!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000943!ifdef RUBY
944 $(RUBY_LIB_FLAG)ruby.lib+
945!endif
946!ifdef TCL
947 $(TCL_LIB_FLAG)tcl.lib+
948!endif
949!ifdef XPM
950 xpm.lib+
951!endif
952!if ("$(USEDLL)"=="yes")
953 cw32i.lib
954!else
955 cw32.lib
956!endif
957 vim.def
958!else
959 cl.lib
960!endif
961|
962
963!if ("$(VIMDLL)"=="yes")
964$(TARGET): $(OBJDIR) $(DLLTARGET) $(vimmain) $(OBJDIR)\$(RESFILE)
965!else
966$(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
967!endif
968 $(LINK) @&&|
969 $(LFLAGS) +
970 $(STARTUPOBJ) +
971!if ("$(VIMDLL)"=="yes")
972 $(vimmain)
973!else
974 $(vimobj)
975!endif
976 $<,$*
977!if ($(OSTYPE)==WIN32)
978!if ("$(CODEGUARD)"=="yes")
979 cg32.lib+
980!endif
981# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
982!if ("$(OLE)"=="yes" || $(OSTYPE)==WIN32)
983 ole2w32.lib +
984!endif
985 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200986!ifdef LUA
987 $(LUA_LIB_FLAG)lua.lib+
988!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000989!ifdef PERL
990 $(PERL_LIB_FLAG)perl.lib+
991!endif
992!ifdef PYTHON
993 $(PYTHON_LIB_FLAG)python.lib+
994!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200995!ifdef PYTHON3
996 $(PYTHON3_LIB_FLAG)python3.lib+
997!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000998!ifdef RUBY
999 $(RUBY_LIB_FLAG)ruby.lib+
1000!endif
1001!ifdef TCL
1002 $(TCL_LIB_FLAG)tcl.lib+
1003!endif
1004!ifdef XPM
1005 xpm.lib+
1006!endif
1007!if ("$(USEDLL)"=="yes")
1008 cw32i.lib
1009!else
1010 cw32.lib
1011!endif
1012
1013 $(OBJDIR)\$(RESFILE)
1014!else
1015 emu.lib + cl.lib
1016!endif
1017|
1018
1019test:
1020 cd testdir
1021 $(MAKE) /NOLOGO -f Make_dos.mak win32
1022 cd ..
1023
1024$(OBJDIR)\ex_docmd.obj: ex_docmd.c ex_cmds.h
1025
1026$(OBJDIR)\ex_eval.obj: ex_eval.c ex_cmds.h
1027
1028$(OBJDIR)\if_ole.obj: if_ole.cpp
1029
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001030$(OBJDIR)\if_lua.obj: if_lua.c lua.lib
1031 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_lua.c
1032
Bram Moolenaar071d4272004-06-13 20:20:40 +00001033$(OBJDIR)\if_perl.obj: if_perl.c perl.lib
1034 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_perl.c
1035
1036if_perl.c: if_perl.xs typemap
1037 $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \
1038 $(PERL)\lib\ExtUtils\typemap if_perl.xs > $@
1039
Bram Moolenaardd9a4a42013-06-03 20:12:51 +02001040$(OBJDIR)\if_python.obj: if_python.c if_py_both.h python.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001041 $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
1042
Bram Moolenaardd9a4a42013-06-03 20:12:51 +02001043$(OBJDIR)\if_python3.obj: if_python3.c if_py_both.h python3.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001044 $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c
Bram Moolenaar071d4272004-06-13 20:20:40 +00001045
1046$(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib
1047 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_ruby.c
1048
1049$(OBJDIR)\if_tcl.obj: if_tcl.c tcl.lib
1050 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_tcl.c
1051
1052$(OBJDIR)\xpm_w32.obj: xpm_w32.c xpm.lib
1053 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc xpm_w32.c
1054
1055$(OBJDIR)\netbeans.obj: netbeans.c $(NBDEBUG_DEP)
1056 $(CC) $(CCARG) $(CC1) $(CC2)$@ netbeans.c
1057
Bram Moolenaare0874f82016-01-24 20:36:41 +01001058$(OBJDIR)\channel.obj: channel.c
1059 $(CC) $(CCARG) $(CC1) $(CC2)$@ channel.c
1060
Bram Moolenaar071d4272004-06-13 20:20:40 +00001061$(OBJDIR)\vim.res: vim.rc version.h tools.bmp tearoff.bmp \
1062 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
1063 $(BRC) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc @&&|
1064 $(DEFINES)
1065|
1066
1067$(OBJDIR)\pathdef.obj: auto\pathdef.c
1068 $(CC) $(CCARG) $(CC1) $(CC2)$@ auto\pathdef.c
1069
1070
1071# Need to escape both quotes and backslashes in $INTERP_DEFINES
1072INTERP_DEFINES_ESC_BKS=$(INTERP_DEFINES:\=\\)
1073INTERP_DEFINES_ESC=$(INTERP_DEFINES_ESC_BKS:"=\")
1074
1075# Note: the silly /*"*/ below are there to trick make into accepting
1076# the # character as something other than a comment without messing up
1077# the preprocessor directive.
1078auto\pathdef.c::
1079 -@md auto
1080 @echo creating auto/pathdef.c
1081 @copy /y &&|
1082/* pathdef.c */
1083/*"*/#include "vim.h"/*"*/
1084
1085char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)";
1086char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)";
1087char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS:\=\\) $(DEFINES) $(MBDEFINES) $(INTERP_DEFINES_ESC) $(OPT) $(EXETYPE) $(CPUARG) $(ALIGNARG) $(DEBUG_FLAG) $(CODEGUARD_FLAG)";
1088char_u *all_lflags = (char_u *)"$(LINK:\=\\) $(LFLAGS:\=\\)";
1089char_u *compiled_user = (char_u *)"$(USERNAME)";
1090char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";
1091| auto\pathdef.c
1092
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001093lua.lib: $(LUA)\lib\lua$(LUA_VER).lib
1094 coff2omf $(LUA)\lib\lua$(LUA_VER).lib $@
1095
Bram Moolenaar071d4272004-06-13 20:20:40 +00001096perl.lib: $(PERL)\lib\CORE\perl$(PERL_VER).lib
1097 coff2omf $(PERL)\lib\CORE\perl$(PERL_VER).lib $@
1098
1099python.lib: $(PYTHON)\libs\python$(PYTHON_VER).lib
1100 coff2omf $(PYTHON)\libs\python$(PYTHON_VER).lib $@
1101
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001102python3.lib: $(PYTHON3)\libs\python$(PYTHON3_VER).lib
1103 coff2omf $(PYTHON3)\libs\python$(PYTHON3_VER).lib $@
1104
Bram Moolenaar071d4272004-06-13 20:20:40 +00001105ruby.lib: $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
1106 coff2omf $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib $@
1107
1108# For some reason, the coff2omf method doesn't work on libXpm.lib, so
1109# we have to manually generate an import library straight from the DLL.
1110xpm.lib: $(XPM)\lib\libXpm.lib
1111 implib -a $@ $(XPM)\bin\libXpm.dll
1112
1113tcl.lib: $(TCL_LIB)
1114!if ("$(DYNAMIC_TCL)" == "yes")
1115 copy $(TCL_LIB) $@
1116!else
1117 coff2omf $(TCL_LIB) $@
1118!endif
1119
1120!if ("$(DYNAMIC_TCL)" == "yes")
1121tclstub$(TCL_VER)-bor.lib:
1122 -@IF NOT EXIST $@ ECHO You must download tclstub$(TCL_VER)-bor.lib separately and\
1123 place it in the src directory in order to compile a dynamic TCL-enabled\
1124 (g)vim with the Borland compiler. You can get the tclstub$(TCL_VER)-bor.lib file\
1125 at http://mywebpage.netscape.com/sharppeople/vim/tclstub$(TCL_VER)-bor.lib
1126!endif
1127
1128# vimrun.exe:
1129vimrun.exe: vimrun.c
1130!if ("$(USEDLL)"=="yes")
1131 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) -D_RTLDLL vimrun.c cw32mti.lib
1132!else
1133 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) vimrun.c
1134!endif
1135
1136# The dependency on $(OBJDIR) is to have bcc.cfg generated each time.
1137$(OBJDIR)\bcc.cfg: Make_bc5.mak $(OBJDIR)
1138 copy /y &&|
1139 $(CFLAGS)
1140 -L$(LIB)
1141 $(DEFINES)
1142 $(MBDEFINES)
1143 $(INTERP_DEFINES)
1144 $(EXETYPE)
1145 $(DEBUG_FLAG)
1146 $(OPT)
1147 $(CODEGUARD_FLAG)
1148 $(CPUARG)
1149 $(ALIGNARG)
1150| $@
1151
1152# vi:set sts=4 sw=4:
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001153