blob: 3a11c8f86990dad08a58b3ffc72c3f7d63dded5d [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
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)
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)
Bram Moolenaar071d4272004-06-13 20:20:40 +000073# DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
74# CODEGUARD no or yes: set to yes if you want to use CODEGUARD (no)
75# CPUNR 1 through 6: select -CPU argument to compile with (3)
76# 3 for 386, 4 for 486, 5 for pentium, 6 for pentium pro.
77# USEDLL no or yes: set to yes to use the Runtime library DLL (no)
78# For USEDLL=yes the cc3250.dll is required to run Vim.
79# VIMDLL no or yes: create vim32.dll, and stub (g)vim.exe (no)
Bram Moolenaar48e330a2016-02-23 14:53:34 +010080# ALIGN 1, 2 or 4: Alignment to use (4 for Win32)
Bram Moolenaar071d4272004-06-13 20:20:40 +000081# FASTCALL no or yes: set to yes to use register-based function protocol (yes)
82# OPTIMIZE SPACE, SPEED, or MAXSPEED: type of optimization (MAXSPEED)
83# POSTSCRIPT no or yes: set to yes for PostScript printing
Bram Moolenaar48e330a2016-02-23 14:53:34 +010084# FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
Bram Moolenaar071d4272004-06-13 20:20:40 +000085# WINVER 0x0400 or 0x0500: minimum Win32 version to support (0x0400)
86# CSCOPE no or yes: include support for Cscope interface (yes)
Bram Moolenaare0874f82016-01-24 20:36:41 +010087# NETBEANS no or yes: include support for Netbeans interface; also
88# requires CHANNEL (yes if GUI
Bram Moolenaar071d4272004-06-13 20:20:40 +000089# is yes)
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000090# NBDEBUG no or yes: include support for debugging Netbeans interface (no)
Bram Moolenaare0874f82016-01-24 20:36:41 +010091# CHANNEL no or yes: include support for inter process communication (yes
92# if GUI is yes)
Bram Moolenaar071d4272004-06-13 20:20:40 +000093# XPM define to path to XPM dir to get support for loading XPM images.
94
95### BOR: root of the BC installation
96!if ("$(BOR)"=="")
97BOR = c:\bc5
98!endif
99
Bram Moolenaar48e330a2016-02-23 14:53:34 +0100100### LINK: Name of the linker: ilink32 (this is below)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101
102### GUI: yes for GUI version, no for console version
103!if ("$(GUI)"=="")
104GUI = yes
105!endif
106
107### MBYTE: yes for multibyte support, no to disable it.
108!if ("$(MBYTE)"=="")
109MBYTE = yes
110!endif
111
112### IME: yes for multibyte support, no to disable it.
113!if ("$(IME)"=="")
114IME = yes
115!endif
116!if ("$(DYNAMIC_IME)"=="")
117DYNAMIC_IME = yes
118!endif
119
120### GETTEXT: yes for multilanguage support, no to disable it.
121!if ("$(GETTEXT)"=="")
122GETTEXT = yes
123!endif
124
125### ICONV: yes to enable dynamic-iconv support, no to disable it
126!if ("$(ICONV)"=="")
127ICONV = yes
128!endif
129
130### CSCOPE: yes to enable Cscope support, no to disable it
131!if ("$(CSCOPE)"=="")
132CSCOPE = yes
133!endif
134
135### NETBEANS: yes to enable NetBeans interface support, no to disable it
136!if ("$(NETBEANS)"=="") && ("$(GUI)"=="yes")
137NETBEANS = yes
138!endif
139
Bram Moolenaare0874f82016-01-24 20:36:41 +0100140### CHANNEL: yes to enable inter process communication, no to disable it
141!if ("$(CHANNEL)"=="") && ("$(GUI)"=="yes")
142CHANNEL = yes
143!endif
144
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200145### LUA: uncomment this line if you want lua support in vim
146# LUA=c:\lua
147
Bram Moolenaar071d4272004-06-13 20:20:40 +0000148### PERL: uncomment this line if you want perl support in vim
149# PERL=c:\perl
150
151### PYTHON: uncomment this line if you want python support in vim
152# PYTHON=c:\python22
153
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200154### PYTHON3: uncomment this line if you want python3 support in vim
155# PYTHON3=c:\python31
156
Bram Moolenaar071d4272004-06-13 20:20:40 +0000157### RUBY: uncomment this line if you want ruby support in vim
158# RUBY=c:\ruby
159
160### TCL: uncomment this line if you want tcl support in vim
161# TCL=c:\tcl
162
163### OLE: no for normal gvim, yes for OLE-capable gvim (only works with GUI)
164#OLE = yes
165
Bram Moolenaar071d4272004-06-13 20:20:40 +0000166### DEBUG: Uncomment to make an executable for debugging
167# DEBUG = yes
168!if ("$(DEBUG)"=="yes")
169DEBUG_FLAG = -v
170!endif
171
172### CODEGUARD: Uncomment to use the CODEGUARD stuff (BC 5.0 or later):
173# CODEGUARD = yes
174!if ("$(CODEGUARD)"=="yes")
175CODEGUARD_FLAG = -vG
176!endif
177
178### CPUNR: set your target processor (3 to 6)
179!if ("$(CPUNR)" == "i386") || ("$(CPUNR)" == "3")
180CPUNR = 3
181!elif ("$(CPUNR)" == "i486") || ("$(CPUNR)" == "4")
182CPUNR = 4
183!elif ("$(CPUNR)" == "i586") || ("$(CPUNR)" == "5")
184CPUNR = 5
185!elif ("$(CPUNR)" == "i686") || ("$(CPUNR)" == "6")
186CPUNR = 6
187!else
188CPUNR = 3
189!endif
190
191### Comment out to use precompiled headers (faster, but uses lots of disk!)
192HEADERS = -H -H=vim.csm -Hc
193
194### USEDLL: no for statically linked version of run-time, yes for DLL runtime
195!if ("$(USEDLL)"=="")
196USEDLL = no
197!endif
198
199### VIMDLL: yes for a DLL version of VIM (NOT RECOMMENDED), no otherwise
200#VIMDLL = yes
201
Bram Moolenaar48e330a2016-02-23 14:53:34 +0100202### ALIGN: alignment you desire: (1,2 or 4: s/b 4 for Win32)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000203!if ("$(ALIGN)"=="")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000204ALIGN = 4
205!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000206
207### FASTCALL: yes to use FASTCALL calling convention (RECOMMENDED!), no otherwise
208# Incompatible when calling external functions (like MSVC-compiled DLLs), so
209# don't use FASTCALL when linking with external libs.
210!if ("$(FASTCALL)"=="") && \
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200211 ("$(LUA)"=="") && \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000212 ("$(PYTHON)"=="") && \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200213 ("$(PYTHON3)"=="") && \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000214 ("$(PERL)"=="") && \
215 ("$(TCL)"=="") && \
216 ("$(RUBY)"=="") && \
217 ("$(ICONV)"!="yes") && \
218 ("$(IME)"!="yes") && \
219 ("$(MBYTE)"!="yes") && \
220 ("$(XPM)"=="")
221FASTCALL = yes
222!endif
223
224### OPTIMIZE: SPEED to optimize for speed, SPACE otherwise (SPEED RECOMMENDED)
225!if ("$(OPTIMIZE)"=="")
226OPTIMIZE = MAXSPEED
227!endif
228
Bram Moolenaar48e330a2016-02-23 14:53:34 +0100229### FEATURES: TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000230!if ("$(FEATURES)"=="")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000231FEATURES = BIG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000232!endif
233
234### POSTSCRIPT: uncomment this line if you want PostScript printing
235#POSTSCRIPT = yes
236
237###
238# If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
239# default, use these lines.
240#VIMRCLOC = somewhere
241#VIMRUNTIMEDIR = somewhere
242
243### Set the default $(WINVER) to make it work with Bcc 5.5.
244!ifndef WINVER
245WINVER = 0x0400
246!endif
247
248#
249# Sanity checks for the above options:
250#
251
Bram Moolenaar48e330a2016-02-23 14:53:34 +0100252OSTYPE = WIN32
Bram Moolenaar071d4272004-06-13 20:20:40 +0000253
254#
255# Optimizations: change as desired (RECOMMENDATION: Don't change!):
256#
257!if ("$(DEBUG)"=="yes")
258OPT = -Od -N
259!else
260!if ("$(OPTIMIZE)"=="SPACE")
261OPT = -O1 -f- -d
262!elif ("$(OPTIMIZE)"=="MAXSPEED")
263OPT = -O2 -f- -d -Ocavi -O
264!else
265OPT = -O2 -f- -d -Oc -O
266!endif
267!if ("$(FASTCALL)"=="yes")
268OPT = $(OPT) -pr
269!endif
270!if ("$(CODEGUARD)"!="yes")
271OPT = $(OPT) -vi-
272!endif
273!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000274# shouldn't have to change:
275LIB = $(BOR)\lib
276INCLUDE = $(BOR)\include;.;proto
277DEFINES = -DFEAT_$(FEATURES) -DWIN32 -DHAVE_PATHDEF \
278 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
279
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200280!ifdef LUA
281INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_LUA
282INCLUDE = $(LUA)\include;$(INCLUDE)
283! ifndef LUA_VER
284LUA_VER = 51
285! endif
286! if ("$(DYNAMIC_LUA)" == "yes")
287INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
288LUA_LIB_FLAG = /nodefaultlib:
289! endif
290!endif
291
Bram Moolenaar071d4272004-06-13 20:20:40 +0000292!ifdef PERL
293INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PERL
294INCLUDE = $(PERL)\lib\core;$(INCLUDE)
295! ifndef PERL_VER
296PERL_VER = 56
297! endif
298! if ("$(DYNAMIC_PERL)" == "yes")
299! if ($(PERL_VER) > 55)
300INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
301PERL_LIB_FLAG = /nodefaultlib:
302! else
303! message "Cannot dynamically load Perl versions less than 5.6. Loading statically..."
304! endif
305! endif
306!endif
307
308!ifdef PYTHON
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200309!ifdef PYTHON3
310DYNAMIC_PYTHON=yes
311DYNAMIC_PYTHON3=yes
312!endif
313!endif
314
315!ifdef PYTHON
Bram Moolenaar071d4272004-06-13 20:20:40 +0000316INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON
Bram Moolenaar071d4272004-06-13 20:20:40 +0000317!ifndef PYTHON_VER
318PYTHON_VER = 22
319!endif
320!if "$(DYNAMIC_PYTHON)" == "yes"
321INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
322PYTHON_LIB_FLAG = /nodefaultlib:
323!endif
324!endif
325
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200326!ifdef PYTHON3
327INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON3
328!ifndef PYTHON3_VER
329PYTHON3_VER = 31
330!endif
331!if "$(DYNAMIC_PYTHON3)" == "yes"
332INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
333PYTHON3_LIB_FLAG = /nodefaultlib:
334!endif
335!endif
336
337
Bram Moolenaar071d4272004-06-13 20:20:40 +0000338!ifdef RUBY
339!ifndef RUBY_VER
340RUBY_VER = 16
341!endif
342!ifndef RUBY_VER_LONG
343RUBY_VER_LONG = 1.6
344!endif
345
346!if "$(RUBY_VER)" == "16"
347!ifndef RUBY_PLATFORM
348RUBY_PLATFORM = i586-mswin32
349!endif
350!ifndef RUBY_INSTALL_NAME
351RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
352!endif
353!else
354!ifndef RUBY_PLATFORM
355RUBY_PLATFORM = i386-mswin32
356!endif
357!ifndef RUBY_INSTALL_NAME
358RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
359!endif
360!endif
361
362INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_RUBY
363INCLUDE = $(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM);$(INCLUDE)
364
365!if "$(DYNAMIC_RUBY)" == "yes"
366INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
367INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY_VER=$(RUBY_VER)
368RUBY_LIB_FLAG = /nodefaultlib:
369!endif
370!endif
371
372!ifdef TCL
373INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_TCL
374INCLUDE = $(TCL)\include;$(INCLUDE)
375!ifndef TCL_VER
376TCL_VER = 83
377!endif
378TCL_LIB = $(TCL)\lib\tcl$(TCL_VER).lib
379TCL_LIB_FLAG =
380!if "$(DYNAMIC_TCL)" == "yes"
381INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
382TCL_LIB = tclstub$(TCL_VER)-bor.lib
383TCL_LIB_FLAG =
384!endif
385!endif
386#
387# DO NOT change below:
388#
389CPUARG = -$(CPUNR)
390ALIGNARG = -a$(ALIGN)
391#
392!if ("$(DEBUG)"=="yes")
Bram Moolenaar78cf3f02014-01-10 18:16:07 +0100393DEFINES=$(DEFINES) -DDEBUG -D_DEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000394!endif
395#
396!if ("$(OLE)"=="yes")
397DEFINES = $(DEFINES) -DFEAT_OLE
398!endif
399#
400!if ("$(MBYTE)"=="yes")
401MBDEFINES = $(MBDEFINES) -DFEAT_MBYTE
402!endif
403!if ("$(IME)"=="yes")
404MBDEFINES = $(MBDEFINES) -DFEAT_MBYTE_IME
405!if ("$(DYNAMIC_IME)" == "yes")
406MBDEFINES = $(MBDEFINES) -DDYNAMIC_IME
407!endif
408!endif
409!if ("$(ICONV)"=="yes")
410MBDEFINES = $(MBDEFINES) -DDYNAMIC_ICONV
411!endif
412!if ("$(GETTEXT)"=="yes")
413MBDEFINES = $(MBDEFINES) -DDYNAMIC_GETTEXT
414!endif
415
416!if ("$(CSCOPE)"=="yes")
417DEFINES = $(DEFINES) -DFEAT_CSCOPE
418!endif
419
Bram Moolenaar071d4272004-06-13 20:20:40 +0000420!if ("$(GUI)"=="yes")
421DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
422!if ("$(DEBUG)"=="yes")
423TARGET = gvimd.exe
424!else
425TARGET = gvim.exe
426!endif
427!if ("$(VIMDLL)"=="yes")
428EXETYPE=-WD
429DEFINES = $(DEFINES) -DVIMDLL
430!else
431EXETYPE=-W
432!endif
433STARTUPOBJ = c0w32.obj
434LINK2 = -aa
435RESFILE = vim.res
436!else
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000437!undef NETBEANS
Bram Moolenaare0874f82016-01-24 20:36:41 +0100438!undef CHANNEL
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000439!undef XPM
440!undef VIMDLL
Bram Moolenaar071d4272004-06-13 20:20:40 +0000441!if ("$(DEBUG)"=="yes")
442TARGET = vimd.exe
443!else
444# for now, anyway: VIMDLL is only for the GUI version
Bram Moolenaar071d4272004-06-13 20:20:40 +0000445TARGET = vim.exe
446!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000447EXETYPE=-WC
448STARTUPOBJ = c0x32.obj
449LINK2 = -ap -OS -o -P
Bram Moolenaar071d4272004-06-13 20:20:40 +0000450RESFILE = vim.res
451!endif
452
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000453!if ("$(NETBEANS)"=="yes")
Bram Moolenaare0874f82016-01-24 20:36:41 +0100454!if ("$(CHANNEL)"!="yes")
455# cannot use Netbeans without CHANNEL
456NETBEANS = no
457!else
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000458DEFINES = $(DEFINES) -DFEAT_NETBEANS_INTG
459!if ("$(NBDEBUG)"=="yes")
460DEFINES = $(DEFINES) -DNBDEBUG
461NBDEBUG_DEP = nbdebug.h nbdebug.c
462!endif
463!endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100464!endif
465
466!if ("$(CHANNEL)"=="yes")
Bram Moolenaar509ce2a2016-03-11 22:52:15 +0100467DEFINES = $(DEFINES) -DFEAT_JOB_CHANNEL
Bram Moolenaare0874f82016-01-24 20:36:41 +0100468!endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000469
470!ifdef XPM
471!if ("$(GUI)"=="yes")
472DEFINES = $(DEFINES) -DFEAT_XPM_W32
473INCLUDE = $(XPM)\include;$(INCLUDE)
474!endif
475!endif
476
Bram Moolenaar071d4272004-06-13 20:20:40 +0000477!if ("$(USEDLL)"=="yes")
478DEFINES = $(DEFINES) -D_RTLDLL
479!endif
480
481!if ("$(DEBUG)"=="yes")
482OBJDIR = $(OSTYPE)\objdbg
483!else
484!if ("$(GUI)"=="yes")
485!if ("$(OLE)"=="yes")
486OBJDIR = $(OSTYPE)\oleobj
487!else
488OBJDIR = $(OSTYPE)\gobj
489!endif
490!else
491OBJDIR = $(OSTYPE)\obj
492!endif
493!endif
494
495!if ("$(POSTSCRIPT)"=="yes")
496DEFINES = $(DEFINES) -DMSWINPS
497!endif
498
499##### BASE COMPILER/TOOLS RULES #####
500MAKE = $(BOR)\bin\make
501CFLAGS = -w-aus -w-par -w-pch -w-ngu -w-csu -I$(INCLUDE)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000502BRC = $(BOR)\BIN\brc32
503!if ("$(LINK)"=="")
504LINK = $(BOR)\BIN\ILink32
505!endif
506CC = $(BOR)\BIN\Bcc32
507LFLAGS = -OS -Tpe -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
508LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
509CFLAGS = $(CFLAGS) -d -RT- -k- -Oi $(HEADERS) -f-
Bram Moolenaar071d4272004-06-13 20:20:40 +0000510
511CC1 = -c
512CC2 = -o
513CCARG = +$(OBJDIR)\bcc.cfg
514
515# implicit rules:
516
517# Without the following, the implicit rule in BUILTINS.MAK is picked up
518# for a rule for .c.obj rather than the local implicit rule
519.SUFFIXES
520.SUFFIXES .c .obj
521.path.c = .
522
523{.}.c{$(OBJDIR)}.obj:
524 $(CC) $(CCARG) $(CC1) -n$(OBJDIR)\ {$< }
525
526.cpp.obj:
527 $(CC) $(CCARG) $(CC1) $(CC2)$@ $*.cpp
528
Bram Moolenaar071d4272004-06-13 20:20:40 +0000529vimmain = \
530 $(OBJDIR)\os_w32exe.obj
531!if ("$(VIMDLL)"=="yes")
532vimwinmain = \
533 $(OBJDIR)\os_w32dll.obj
534!else
535vimwinmain = \
536 $(OBJDIR)\os_w32exe.obj
537!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000538
539vimobj = \
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200540 $(OBJDIR)\arabic.obj \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200541 $(OBJDIR)\blowfish.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000542 $(OBJDIR)\buffer.obj \
543 $(OBJDIR)\charset.obj \
Bram Moolenaar07cf3822014-08-10 16:31:50 +0200544 $(OBJDIR)\crypt.obj \
545 $(OBJDIR)\crypt_zip.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000546 $(OBJDIR)\diff.obj \
547 $(OBJDIR)\digraph.obj \
548 $(OBJDIR)\edit.obj \
549 $(OBJDIR)\eval.obj \
550 $(OBJDIR)\ex_cmds.obj \
551 $(OBJDIR)\ex_cmds2.obj \
552 $(OBJDIR)\ex_docmd.obj \
553 $(OBJDIR)\ex_eval.obj \
554 $(OBJDIR)\ex_getln.obj \
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200555 $(OBJDIR)\farsi.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000556 $(OBJDIR)\fileio.obj \
557 $(OBJDIR)\fold.obj \
558 $(OBJDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000559 $(OBJDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000560 $(OBJDIR)\hashtab.obj \
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100561 $(OBJDIR)\json.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000562 $(OBJDIR)\main.obj \
563 $(OBJDIR)\mark.obj \
564 $(OBJDIR)\memfile.obj \
565 $(OBJDIR)\memline.obj \
566 $(OBJDIR)\menu.obj \
567 $(OBJDIR)\message.obj \
568 $(OBJDIR)\misc1.obj \
569 $(OBJDIR)\misc2.obj \
570 $(OBJDIR)\move.obj \
571 $(OBJDIR)\mbyte.obj \
572 $(OBJDIR)\normal.obj \
573 $(OBJDIR)\ops.obj \
574 $(OBJDIR)\option.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000575 $(OBJDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000576 $(OBJDIR)\quickfix.obj \
577 $(OBJDIR)\regexp.obj \
578 $(OBJDIR)\screen.obj \
579 $(OBJDIR)\search.obj \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200580 $(OBJDIR)\sha256.obj \
Bram Moolenaarfc735152005-03-22 22:54:12 +0000581 $(OBJDIR)\spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000582 $(OBJDIR)\syntax.obj \
583 $(OBJDIR)\tag.obj \
584 $(OBJDIR)\term.obj \
585 $(OBJDIR)\ui.obj \
586 $(OBJDIR)\undo.obj \
587 $(OBJDIR)\version.obj \
588 $(OBJDIR)\window.obj \
589 $(OBJDIR)\pathdef.obj
590
591!if ("$(OLE)"=="yes")
592vimobj = $(vimobj) \
593 $(OBJDIR)\if_ole.obj
594!endif
595
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200596!ifdef LUA
597vimobj = $(vimobj) \
598 $(OBJDIR)\if_lua.obj
599!endif
600
Bram Moolenaar071d4272004-06-13 20:20:40 +0000601!ifdef PERL
602vimobj = $(vimobj) \
603 $(OBJDIR)\if_perl.obj
604!endif
605
606!ifdef PYTHON
607vimobj = $(vimobj) \
608 $(OBJDIR)\if_python.obj
609!endif
610
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200611!ifdef PYTHON3
612vimobj = $(vimobj) \
613 $(OBJDIR)\if_python3.obj
614!endif
615
Bram Moolenaar071d4272004-06-13 20:20:40 +0000616!ifdef RUBY
617vimobj = $(vimobj) \
618 $(OBJDIR)\if_ruby.obj
619!endif
620
621!ifdef TCL
622vimobj = $(vimobj) \
623 $(OBJDIR)\if_tcl.obj
624!endif
625
626!if ("$(CSCOPE)"=="yes")
627vimobj = $(vimobj) \
628 $(OBJDIR)\if_cscope.obj
629!endif
630
631!if ("$(NETBEANS)"=="yes")
632vimobj = $(vimobj) \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000633 $(OBJDIR)\netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000634!endif
635
Bram Moolenaare0874f82016-01-24 20:36:41 +0100636!if ("$(CHANNEL)"=="yes")
637vimobj = $(vimobj) \
638 $(OBJDIR)\channel.obj
639!endif
640
Bram Moolenaar071d4272004-06-13 20:20:40 +0000641!ifdef XPM
642vimobj = $(vimobj) \
643 $(OBJDIR)\xpm_w32.obj
644!endif
645
646!if ("$(VIMDLL)"=="yes")
647vimdllobj = $(vimobj)
648!if ("$(DEBUG)"=="yes")
649DLLTARGET = vim32d.dll
650!else
651DLLTARGET = vim32.dll
652!endif
653!else
654DLLTARGET = joebob
655!endif
656
657!if ("$(GUI)"=="yes")
658vimobj = $(vimobj) \
659 $(vimwinmain) \
660 $(OBJDIR)\gui.obj \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000661 $(OBJDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000662 $(OBJDIR)\gui_w32.obj
663!endif
664
Bram Moolenaar071d4272004-06-13 20:20:40 +0000665vimobj = $(vimobj) \
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100666 $(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000667# Blab what we are going to do:
668MSG = Compiling $(OSTYPE) $(TARGET) $(OLETARGET), with:
669!if ("$(GUI)"=="yes")
670MSG = $(MSG) GUI
671!endif
672!if ("$(OLE)"=="yes")
673MSG = $(MSG) OLE
674!endif
675!if ("$(USEDLL)"=="yes")
676MSG = $(MSG) USEDLL
677!endif
678!if ("$(VIMDLL)"=="yes")
679MSG = $(MSG) VIMDLL
680!endif
681!if ("$(FASTCALL)"=="yes")
682MSG = $(MSG) FASTCALL
683!endif
684!if ("$(MBYTE)"=="yes")
685MSG = $(MSG) MBYTE
686!endif
687!if ("$(IME)"=="yes")
688MSG = $(MSG) IME
689! if "$(DYNAMIC_IME)" == "yes"
690MSG = $(MSG)(dynamic)
691! endif
692!endif
693!if ("$(GETTEXT)"=="yes")
694MSG = $(MSG) GETTEXT
695!endif
696!if ("$(ICONV)"=="yes")
697MSG = $(MSG) ICONV
698!endif
699!if ("$(DEBUG)"=="yes")
700MSG = $(MSG) DEBUG
701!endif
702!if ("$(CODEGUARD)"=="yes")
703MSG = $(MSG) CODEGUARD
704!endif
705!if ("$(CSCOPE)"=="yes")
706MSG = $(MSG) CSCOPE
707!endif
708!if ("$(NETBEANS)"=="yes")
709MSG = $(MSG) NETBEANS
710!endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100711!if ("$(CHANNEL)"=="yes")
712MSG = $(MSG) CHANNEL
713!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000714!ifdef XPM
715MSG = $(MSG) XPM
716!endif
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200717!ifdef LUA
718MSG = $(MSG) LUA
719! if "$(DYNAMIC_LUA)" == "yes"
720MSG = $(MSG)(dynamic)
721! endif
722!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000723!ifdef PERL
724MSG = $(MSG) PERL
725! if "$(DYNAMIC_PERL)" == "yes"
726MSG = $(MSG)(dynamic)
727! endif
728!endif
729!ifdef PYTHON
730MSG = $(MSG) PYTHON
731! if "$(DYNAMIC_PYTHON)" == "yes"
732MSG = $(MSG)(dynamic)
733! endif
734!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200735!ifdef PYTHON3
736MSG = $(MSG) PYTHON3
737! if "$(DYNAMIC_PYTHON3)" == "yes"
738MSG = $(MSG)(dynamic)
739! endif
740!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000741!ifdef RUBY
742MSG = $(MSG) RUBY
743! if "$(DYNAMIC_RUBY)" == "yes"
744MSG = $(MSG)(dynamic)
745! endif
746!endif
747!ifdef TCL
748MSG = $(MSG) TCL
749! if "$(DYNAMIC_TCL)" == "yes"
750MSG = $(MSG)(dynamic)
751! endif
752!endif
753MSG = $(MSG) cpu=$(CPUARG)
754MSG = $(MSG) Align=$(ALIGNARG)
755
756!message $(MSG)
757
Bram Moolenaar071d4272004-06-13 20:20:40 +0000758!if ("$(VIMDLL)"=="yes")
759TARGETS = $(DLLTARGET)
760!endif
761TARGETS = $(TARGETS) $(TARGET)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000762
763# Targets:
764all: vim vimrun.exe install.exe xxd uninstal.exe GvimExt/gvimext.dll
765
766vim: $(OSTYPE) $(OBJDIR) $(OBJDIR)\bcc.cfg $(TARGETS)
767 @if exist $(OBJDIR)\version.obj del $(OBJDIR)\version.obj
768 @if exist auto\pathdef.c del auto\pathdef.c
769
770$(OSTYPE):
771 -@md $(OSTYPE)
772
773$(OBJDIR):
774 -@md $(OBJDIR)
775
776xxd:
777 @cd xxd
778 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" BCC="$(CC)"
779 @cd ..
780
781GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
782 cd GvimExt
783 $(MAKE) /f Make_bc5.mak USEDLL=$(USEDLL) BOR=$(BOR)
784 cd ..
785
786install.exe: dosinst.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000787 $(CC) $(CCARG) -WC -DWIN32 -einstall dosinst.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000788
789uninstal.exe: uninstal.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000790 $(CC) $(CCARG) -WC -DWIN32 -O2 -euninstal uninstal.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000791
792clean:
793!if "$(OS)" == "Windows_NT"
794 # For Windows NT/2000, doesn't work on Windows 95/98...
795 # $(COMSPEC) needed to ensure rmdir.exe is not run
796 -@$(COMSPEC) /C rmdir /Q /S $(OBJDIR)
797!else
798 # For Windows 95/98, doesn't work on Windows NT/2000...
799 -@deltree /y $(OBJDIR)
800!endif
801 -@del *.res
802 -@del vim32*.dll
803 -@del vim32*.lib
804 -@del *vim*.exe
805 -@del *install*.exe
806 -@del *.csm
807 -@del *.map
808 -@del *.ilc
809 -@del *.ild
810 -@del *.ilf
811 -@del *.ils
812 -@del *.tds
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200813!ifdef LUA
814 -@del lua.lib
815!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000816!ifdef PERL
817 -@del perl.lib
818!endif
819!ifdef PYTHON
820 -@del python.lib
821!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200822!ifdef PYTHON3
823 -@del python3.lib
824!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000825!ifdef RUBY
826 -@del ruby.lib
827!endif
828!ifdef TCL
829 -@del tcl.lib
830!endif
831!ifdef XPM
832 -@del xpm.lib
833!endif
834 cd xxd
835 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
836 cd ..
837 cd GvimExt
838 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
839 cd ..
840
841$(DLLTARGET): $(OBJDIR) $(vimdllobj)
842 $(LINK) @&&|
843 $(LFLAGSDLL) +
844 c0d32.obj +
845 $(vimdllobj)
846 $<,$*
847!if ("$(CODEGUARD)"=="yes")
848 cg32.lib+
849!endif
850# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000851 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000852 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200853!ifdef LUA
854 $(LUA_LIB_FLAG)lua.lib+
855!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000856!ifdef PERL
857 $(PERL_LIB_FLAG)perl.lib+
858!endif
859!ifdef PYTHON
860 $(PYTHON_LIB_FLAG)python.lib+
861!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200862!ifdef PYTHON3
863 $(PYTHON3_LIB_FLAG)python3.lib+
864!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000865!ifdef RUBY
866 $(RUBY_LIB_FLAG)ruby.lib+
867!endif
868!ifdef TCL
869 $(TCL_LIB_FLAG)tcl.lib+
870!endif
871!ifdef XPM
872 xpm.lib+
873!endif
874!if ("$(USEDLL)"=="yes")
875 cw32i.lib
876!else
877 cw32.lib
878!endif
879 vim.def
Bram Moolenaar071d4272004-06-13 20:20:40 +0000880|
881
882!if ("$(VIMDLL)"=="yes")
883$(TARGET): $(OBJDIR) $(DLLTARGET) $(vimmain) $(OBJDIR)\$(RESFILE)
884!else
885$(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
886!endif
887 $(LINK) @&&|
888 $(LFLAGS) +
889 $(STARTUPOBJ) +
890!if ("$(VIMDLL)"=="yes")
891 $(vimmain)
892!else
893 $(vimobj)
894!endif
895 $<,$*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000896!if ("$(CODEGUARD)"=="yes")
897 cg32.lib+
898!endif
899# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000900 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000901 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200902!ifdef LUA
903 $(LUA_LIB_FLAG)lua.lib+
904!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905!ifdef PERL
906 $(PERL_LIB_FLAG)perl.lib+
907!endif
908!ifdef PYTHON
909 $(PYTHON_LIB_FLAG)python.lib+
910!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200911!ifdef PYTHON3
912 $(PYTHON3_LIB_FLAG)python3.lib+
913!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000914!ifdef RUBY
915 $(RUBY_LIB_FLAG)ruby.lib+
916!endif
917!ifdef TCL
918 $(TCL_LIB_FLAG)tcl.lib+
919!endif
920!ifdef XPM
921 xpm.lib+
922!endif
923!if ("$(USEDLL)"=="yes")
924 cw32i.lib
925!else
926 cw32.lib
927!endif
928
929 $(OBJDIR)\$(RESFILE)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000930|
931
932test:
933 cd testdir
934 $(MAKE) /NOLOGO -f Make_dos.mak win32
935 cd ..
936
937$(OBJDIR)\ex_docmd.obj: ex_docmd.c ex_cmds.h
938
939$(OBJDIR)\ex_eval.obj: ex_eval.c ex_cmds.h
940
941$(OBJDIR)\if_ole.obj: if_ole.cpp
942
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200943$(OBJDIR)\if_lua.obj: if_lua.c lua.lib
944 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_lua.c
945
Bram Moolenaar071d4272004-06-13 20:20:40 +0000946$(OBJDIR)\if_perl.obj: if_perl.c perl.lib
947 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_perl.c
948
949if_perl.c: if_perl.xs typemap
950 $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \
951 $(PERL)\lib\ExtUtils\typemap if_perl.xs > $@
952
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200953$(OBJDIR)\if_python.obj: if_python.c if_py_both.h python.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200954 $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
955
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200956$(OBJDIR)\if_python3.obj: if_python3.c if_py_both.h python3.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200957 $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000958
959$(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib
960 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_ruby.c
961
962$(OBJDIR)\if_tcl.obj: if_tcl.c tcl.lib
963 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_tcl.c
964
965$(OBJDIR)\xpm_w32.obj: xpm_w32.c xpm.lib
966 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc xpm_w32.c
967
968$(OBJDIR)\netbeans.obj: netbeans.c $(NBDEBUG_DEP)
969 $(CC) $(CCARG) $(CC1) $(CC2)$@ netbeans.c
970
Bram Moolenaare0874f82016-01-24 20:36:41 +0100971$(OBJDIR)\channel.obj: channel.c
972 $(CC) $(CCARG) $(CC1) $(CC2)$@ channel.c
973
Bram Moolenaar071d4272004-06-13 20:20:40 +0000974$(OBJDIR)\vim.res: vim.rc version.h tools.bmp tearoff.bmp \
975 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
976 $(BRC) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc @&&|
977 $(DEFINES)
978|
979
980$(OBJDIR)\pathdef.obj: auto\pathdef.c
981 $(CC) $(CCARG) $(CC1) $(CC2)$@ auto\pathdef.c
982
983
984# Need to escape both quotes and backslashes in $INTERP_DEFINES
985INTERP_DEFINES_ESC_BKS=$(INTERP_DEFINES:\=\\)
986INTERP_DEFINES_ESC=$(INTERP_DEFINES_ESC_BKS:"=\")
987
988# Note: the silly /*"*/ below are there to trick make into accepting
989# the # character as something other than a comment without messing up
990# the preprocessor directive.
991auto\pathdef.c::
992 -@md auto
993 @echo creating auto/pathdef.c
994 @copy /y &&|
995/* pathdef.c */
996/*"*/#include "vim.h"/*"*/
997
998char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)";
999char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)";
1000char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS:\=\\) $(DEFINES) $(MBDEFINES) $(INTERP_DEFINES_ESC) $(OPT) $(EXETYPE) $(CPUARG) $(ALIGNARG) $(DEBUG_FLAG) $(CODEGUARD_FLAG)";
1001char_u *all_lflags = (char_u *)"$(LINK:\=\\) $(LFLAGS:\=\\)";
1002char_u *compiled_user = (char_u *)"$(USERNAME)";
1003char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";
1004| auto\pathdef.c
1005
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001006lua.lib: $(LUA)\lib\lua$(LUA_VER).lib
1007 coff2omf $(LUA)\lib\lua$(LUA_VER).lib $@
1008
Bram Moolenaar071d4272004-06-13 20:20:40 +00001009perl.lib: $(PERL)\lib\CORE\perl$(PERL_VER).lib
1010 coff2omf $(PERL)\lib\CORE\perl$(PERL_VER).lib $@
1011
1012python.lib: $(PYTHON)\libs\python$(PYTHON_VER).lib
1013 coff2omf $(PYTHON)\libs\python$(PYTHON_VER).lib $@
1014
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001015python3.lib: $(PYTHON3)\libs\python$(PYTHON3_VER).lib
1016 coff2omf $(PYTHON3)\libs\python$(PYTHON3_VER).lib $@
1017
Bram Moolenaar071d4272004-06-13 20:20:40 +00001018ruby.lib: $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
1019 coff2omf $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib $@
1020
1021# For some reason, the coff2omf method doesn't work on libXpm.lib, so
1022# we have to manually generate an import library straight from the DLL.
1023xpm.lib: $(XPM)\lib\libXpm.lib
1024 implib -a $@ $(XPM)\bin\libXpm.dll
1025
1026tcl.lib: $(TCL_LIB)
1027!if ("$(DYNAMIC_TCL)" == "yes")
1028 copy $(TCL_LIB) $@
1029!else
1030 coff2omf $(TCL_LIB) $@
1031!endif
1032
1033!if ("$(DYNAMIC_TCL)" == "yes")
1034tclstub$(TCL_VER)-bor.lib:
1035 -@IF NOT EXIST $@ ECHO You must download tclstub$(TCL_VER)-bor.lib separately and\
1036 place it in the src directory in order to compile a dynamic TCL-enabled\
1037 (g)vim with the Borland compiler. You can get the tclstub$(TCL_VER)-bor.lib file\
1038 at http://mywebpage.netscape.com/sharppeople/vim/tclstub$(TCL_VER)-bor.lib
1039!endif
1040
1041# vimrun.exe:
1042vimrun.exe: vimrun.c
1043!if ("$(USEDLL)"=="yes")
1044 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) -D_RTLDLL vimrun.c cw32mti.lib
1045!else
1046 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) vimrun.c
1047!endif
1048
1049# The dependency on $(OBJDIR) is to have bcc.cfg generated each time.
1050$(OBJDIR)\bcc.cfg: Make_bc5.mak $(OBJDIR)
1051 copy /y &&|
1052 $(CFLAGS)
1053 -L$(LIB)
1054 $(DEFINES)
1055 $(MBDEFINES)
1056 $(INTERP_DEFINES)
1057 $(EXETYPE)
1058 $(DEBUG_FLAG)
1059 $(OPT)
1060 $(CODEGUARD_FLAG)
1061 $(CPUARG)
1062 $(ALIGNARG)
1063| $@
1064
1065# vi:set sts=4 sw=4:
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001066