blob: a5ee13bd29ab2e13397bc5e18d38f614abb2499e [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)
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 Moolenaar6583c442016-07-17 18:41:47 +0200546 $(OBJDIR)\dict.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000547 $(OBJDIR)\diff.obj \
548 $(OBJDIR)\digraph.obj \
549 $(OBJDIR)\edit.obj \
550 $(OBJDIR)\eval.obj \
Bram Moolenaar73dad1e2016-07-17 22:13:49 +0200551 $(OBJDIR)\evalfunc.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000552 $(OBJDIR)\ex_cmds.obj \
553 $(OBJDIR)\ex_cmds2.obj \
554 $(OBJDIR)\ex_docmd.obj \
555 $(OBJDIR)\ex_eval.obj \
556 $(OBJDIR)\ex_getln.obj \
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200557 $(OBJDIR)\farsi.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000558 $(OBJDIR)\fileio.obj \
559 $(OBJDIR)\fold.obj \
560 $(OBJDIR)\getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000561 $(OBJDIR)\hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000562 $(OBJDIR)\hashtab.obj \
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100563 $(OBJDIR)\json.obj \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200564 $(OBJDIR)\list.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000565 $(OBJDIR)\main.obj \
566 $(OBJDIR)\mark.obj \
567 $(OBJDIR)\memfile.obj \
568 $(OBJDIR)\memline.obj \
569 $(OBJDIR)\menu.obj \
570 $(OBJDIR)\message.obj \
571 $(OBJDIR)\misc1.obj \
572 $(OBJDIR)\misc2.obj \
573 $(OBJDIR)\move.obj \
574 $(OBJDIR)\mbyte.obj \
575 $(OBJDIR)\normal.obj \
576 $(OBJDIR)\ops.obj \
577 $(OBJDIR)\option.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000578 $(OBJDIR)\popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000579 $(OBJDIR)\quickfix.obj \
580 $(OBJDIR)\regexp.obj \
581 $(OBJDIR)\screen.obj \
582 $(OBJDIR)\search.obj \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200583 $(OBJDIR)\sha256.obj \
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100584 $(OBJDIR)\sign.obj \
Bram Moolenaarfc735152005-03-22 22:54:12 +0000585 $(OBJDIR)\spell.obj \
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200586 $(OBJDIR)\spellfile.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000587 $(OBJDIR)\syntax.obj \
588 $(OBJDIR)\tag.obj \
589 $(OBJDIR)\term.obj \
590 $(OBJDIR)\ui.obj \
591 $(OBJDIR)\undo.obj \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200592 $(OBJDIR)\userfunc.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000593 $(OBJDIR)\version.obj \
594 $(OBJDIR)\window.obj \
595 $(OBJDIR)\pathdef.obj
596
597!if ("$(OLE)"=="yes")
598vimobj = $(vimobj) \
599 $(OBJDIR)\if_ole.obj
600!endif
601
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200602!ifdef LUA
603vimobj = $(vimobj) \
604 $(OBJDIR)\if_lua.obj
605!endif
606
Bram Moolenaar071d4272004-06-13 20:20:40 +0000607!ifdef PERL
608vimobj = $(vimobj) \
609 $(OBJDIR)\if_perl.obj
610!endif
611
612!ifdef PYTHON
613vimobj = $(vimobj) \
614 $(OBJDIR)\if_python.obj
615!endif
616
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200617!ifdef PYTHON3
618vimobj = $(vimobj) \
619 $(OBJDIR)\if_python3.obj
620!endif
621
Bram Moolenaar071d4272004-06-13 20:20:40 +0000622!ifdef RUBY
623vimobj = $(vimobj) \
624 $(OBJDIR)\if_ruby.obj
625!endif
626
627!ifdef TCL
628vimobj = $(vimobj) \
629 $(OBJDIR)\if_tcl.obj
630!endif
631
632!if ("$(CSCOPE)"=="yes")
633vimobj = $(vimobj) \
634 $(OBJDIR)\if_cscope.obj
635!endif
636
637!if ("$(NETBEANS)"=="yes")
638vimobj = $(vimobj) \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000639 $(OBJDIR)\netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000640!endif
641
Bram Moolenaare0874f82016-01-24 20:36:41 +0100642!if ("$(CHANNEL)"=="yes")
643vimobj = $(vimobj) \
644 $(OBJDIR)\channel.obj
645!endif
646
Bram Moolenaar071d4272004-06-13 20:20:40 +0000647!ifdef XPM
648vimobj = $(vimobj) \
649 $(OBJDIR)\xpm_w32.obj
650!endif
651
652!if ("$(VIMDLL)"=="yes")
653vimdllobj = $(vimobj)
654!if ("$(DEBUG)"=="yes")
655DLLTARGET = vim32d.dll
656!else
657DLLTARGET = vim32.dll
658!endif
659!else
660DLLTARGET = joebob
661!endif
662
663!if ("$(GUI)"=="yes")
664vimobj = $(vimobj) \
665 $(vimwinmain) \
666 $(OBJDIR)\gui.obj \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000667 $(OBJDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000668 $(OBJDIR)\gui_w32.obj
669!endif
670
Bram Moolenaar071d4272004-06-13 20:20:40 +0000671vimobj = $(vimobj) \
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100672 $(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000673# Blab what we are going to do:
674MSG = Compiling $(OSTYPE) $(TARGET) $(OLETARGET), with:
675!if ("$(GUI)"=="yes")
676MSG = $(MSG) GUI
677!endif
678!if ("$(OLE)"=="yes")
679MSG = $(MSG) OLE
680!endif
681!if ("$(USEDLL)"=="yes")
682MSG = $(MSG) USEDLL
683!endif
684!if ("$(VIMDLL)"=="yes")
685MSG = $(MSG) VIMDLL
686!endif
687!if ("$(FASTCALL)"=="yes")
688MSG = $(MSG) FASTCALL
689!endif
690!if ("$(MBYTE)"=="yes")
691MSG = $(MSG) MBYTE
692!endif
693!if ("$(IME)"=="yes")
694MSG = $(MSG) IME
695! if "$(DYNAMIC_IME)" == "yes"
696MSG = $(MSG)(dynamic)
697! endif
698!endif
699!if ("$(GETTEXT)"=="yes")
700MSG = $(MSG) GETTEXT
701!endif
702!if ("$(ICONV)"=="yes")
703MSG = $(MSG) ICONV
704!endif
705!if ("$(DEBUG)"=="yes")
706MSG = $(MSG) DEBUG
707!endif
708!if ("$(CODEGUARD)"=="yes")
709MSG = $(MSG) CODEGUARD
710!endif
711!if ("$(CSCOPE)"=="yes")
712MSG = $(MSG) CSCOPE
713!endif
714!if ("$(NETBEANS)"=="yes")
715MSG = $(MSG) NETBEANS
716!endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100717!if ("$(CHANNEL)"=="yes")
718MSG = $(MSG) CHANNEL
719!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000720!ifdef XPM
721MSG = $(MSG) XPM
722!endif
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200723!ifdef LUA
724MSG = $(MSG) LUA
725! if "$(DYNAMIC_LUA)" == "yes"
726MSG = $(MSG)(dynamic)
727! endif
728!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000729!ifdef PERL
730MSG = $(MSG) PERL
731! if "$(DYNAMIC_PERL)" == "yes"
732MSG = $(MSG)(dynamic)
733! endif
734!endif
735!ifdef PYTHON
736MSG = $(MSG) PYTHON
737! if "$(DYNAMIC_PYTHON)" == "yes"
738MSG = $(MSG)(dynamic)
739! endif
740!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200741!ifdef PYTHON3
742MSG = $(MSG) PYTHON3
743! if "$(DYNAMIC_PYTHON3)" == "yes"
744MSG = $(MSG)(dynamic)
745! endif
746!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000747!ifdef RUBY
748MSG = $(MSG) RUBY
749! if "$(DYNAMIC_RUBY)" == "yes"
750MSG = $(MSG)(dynamic)
751! endif
752!endif
753!ifdef TCL
754MSG = $(MSG) TCL
755! if "$(DYNAMIC_TCL)" == "yes"
756MSG = $(MSG)(dynamic)
757! endif
758!endif
759MSG = $(MSG) cpu=$(CPUARG)
760MSG = $(MSG) Align=$(ALIGNARG)
761
762!message $(MSG)
763
Bram Moolenaar071d4272004-06-13 20:20:40 +0000764!if ("$(VIMDLL)"=="yes")
765TARGETS = $(DLLTARGET)
766!endif
767TARGETS = $(TARGETS) $(TARGET)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000768
769# Targets:
770all: vim vimrun.exe install.exe xxd uninstal.exe GvimExt/gvimext.dll
771
772vim: $(OSTYPE) $(OBJDIR) $(OBJDIR)\bcc.cfg $(TARGETS)
773 @if exist $(OBJDIR)\version.obj del $(OBJDIR)\version.obj
774 @if exist auto\pathdef.c del auto\pathdef.c
775
776$(OSTYPE):
777 -@md $(OSTYPE)
778
779$(OBJDIR):
780 -@md $(OBJDIR)
781
782xxd:
783 @cd xxd
784 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" BCC="$(CC)"
785 @cd ..
786
787GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
788 cd GvimExt
789 $(MAKE) /f Make_bc5.mak USEDLL=$(USEDLL) BOR=$(BOR)
790 cd ..
791
792install.exe: dosinst.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000793 $(CC) $(CCARG) -WC -DWIN32 -einstall dosinst.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000794
795uninstal.exe: uninstal.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000796 $(CC) $(CCARG) -WC -DWIN32 -O2 -euninstal uninstal.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000797
798clean:
799!if "$(OS)" == "Windows_NT"
800 # For Windows NT/2000, doesn't work on Windows 95/98...
801 # $(COMSPEC) needed to ensure rmdir.exe is not run
802 -@$(COMSPEC) /C rmdir /Q /S $(OBJDIR)
803!else
804 # For Windows 95/98, doesn't work on Windows NT/2000...
805 -@deltree /y $(OBJDIR)
806!endif
807 -@del *.res
808 -@del vim32*.dll
809 -@del vim32*.lib
810 -@del *vim*.exe
811 -@del *install*.exe
812 -@del *.csm
813 -@del *.map
814 -@del *.ilc
815 -@del *.ild
816 -@del *.ilf
817 -@del *.ils
818 -@del *.tds
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200819!ifdef LUA
820 -@del lua.lib
821!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000822!ifdef PERL
823 -@del perl.lib
Bram Moolenaara16bc542018-10-14 16:25:10 +0200824 -@del if_perl.c
825 -@del auto\if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000826!endif
827!ifdef PYTHON
828 -@del python.lib
829!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200830!ifdef PYTHON3
831 -@del python3.lib
832!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000833!ifdef RUBY
834 -@del ruby.lib
835!endif
836!ifdef TCL
837 -@del tcl.lib
838!endif
839!ifdef XPM
840 -@del xpm.lib
841!endif
842 cd xxd
843 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
844 cd ..
845 cd GvimExt
846 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
847 cd ..
848
849$(DLLTARGET): $(OBJDIR) $(vimdllobj)
850 $(LINK) @&&|
851 $(LFLAGSDLL) +
852 c0d32.obj +
853 $(vimdllobj)
854 $<,$*
855!if ("$(CODEGUARD)"=="yes")
856 cg32.lib+
857!endif
858# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000859 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000860 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200861!ifdef LUA
862 $(LUA_LIB_FLAG)lua.lib+
863!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000864!ifdef PERL
865 $(PERL_LIB_FLAG)perl.lib+
866!endif
867!ifdef PYTHON
868 $(PYTHON_LIB_FLAG)python.lib+
869!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200870!ifdef PYTHON3
871 $(PYTHON3_LIB_FLAG)python3.lib+
872!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000873!ifdef RUBY
874 $(RUBY_LIB_FLAG)ruby.lib+
875!endif
876!ifdef TCL
877 $(TCL_LIB_FLAG)tcl.lib+
878!endif
879!ifdef XPM
880 xpm.lib+
881!endif
882!if ("$(USEDLL)"=="yes")
883 cw32i.lib
884!else
885 cw32.lib
886!endif
887 vim.def
Bram Moolenaar071d4272004-06-13 20:20:40 +0000888|
889
890!if ("$(VIMDLL)"=="yes")
891$(TARGET): $(OBJDIR) $(DLLTARGET) $(vimmain) $(OBJDIR)\$(RESFILE)
892!else
893$(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
894!endif
895 $(LINK) @&&|
896 $(LFLAGS) +
897 $(STARTUPOBJ) +
898!if ("$(VIMDLL)"=="yes")
899 $(vimmain)
900!else
901 $(vimobj)
902!endif
903 $<,$*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000904!if ("$(CODEGUARD)"=="yes")
905 cg32.lib+
906!endif
907# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000908 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000909 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200910!ifdef LUA
911 $(LUA_LIB_FLAG)lua.lib+
912!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000913!ifdef PERL
914 $(PERL_LIB_FLAG)perl.lib+
915!endif
916!ifdef PYTHON
917 $(PYTHON_LIB_FLAG)python.lib+
918!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200919!ifdef PYTHON3
920 $(PYTHON3_LIB_FLAG)python3.lib+
921!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000922!ifdef RUBY
923 $(RUBY_LIB_FLAG)ruby.lib+
924!endif
925!ifdef TCL
926 $(TCL_LIB_FLAG)tcl.lib+
927!endif
928!ifdef XPM
929 xpm.lib+
930!endif
931!if ("$(USEDLL)"=="yes")
932 cw32i.lib
933!else
934 cw32.lib
935!endif
936
937 $(OBJDIR)\$(RESFILE)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000938|
939
940test:
941 cd testdir
942 $(MAKE) /NOLOGO -f Make_dos.mak win32
943 cd ..
944
945$(OBJDIR)\ex_docmd.obj: ex_docmd.c ex_cmds.h
946
947$(OBJDIR)\ex_eval.obj: ex_eval.c ex_cmds.h
948
949$(OBJDIR)\if_ole.obj: if_ole.cpp
950
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200951$(OBJDIR)\if_lua.obj: if_lua.c lua.lib
952 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_lua.c
953
Bram Moolenaara16bc542018-10-14 16:25:10 +0200954$(OBJDIR)\if_perl.obj: auto/if_perl.c perl.lib
955 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc auto/if_perl.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000956
Bram Moolenaara16bc542018-10-14 16:25:10 +0200957auto/if_perl.c: if_perl.xs typemap
Bram Moolenaar071d4272004-06-13 20:20:40 +0000958 $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \
Bram Moolenaara16bc542018-10-14 16:25:10 +0200959 $(PERL)\lib\ExtUtils\typemap if_perl.xs -output $@
Bram Moolenaar071d4272004-06-13 20:20:40 +0000960
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200961$(OBJDIR)\if_python.obj: if_python.c if_py_both.h python.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200962 $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
963
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200964$(OBJDIR)\if_python3.obj: if_python3.c if_py_both.h python3.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200965 $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000966
967$(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib
968 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_ruby.c
969
970$(OBJDIR)\if_tcl.obj: if_tcl.c tcl.lib
971 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_tcl.c
972
973$(OBJDIR)\xpm_w32.obj: xpm_w32.c xpm.lib
974 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc xpm_w32.c
975
976$(OBJDIR)\netbeans.obj: netbeans.c $(NBDEBUG_DEP)
977 $(CC) $(CCARG) $(CC1) $(CC2)$@ netbeans.c
978
Bram Moolenaare0874f82016-01-24 20:36:41 +0100979$(OBJDIR)\channel.obj: channel.c
980 $(CC) $(CCARG) $(CC1) $(CC2)$@ channel.c
981
Bram Moolenaar071d4272004-06-13 20:20:40 +0000982$(OBJDIR)\vim.res: vim.rc version.h tools.bmp tearoff.bmp \
983 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
984 $(BRC) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc @&&|
985 $(DEFINES)
986|
987
988$(OBJDIR)\pathdef.obj: auto\pathdef.c
989 $(CC) $(CCARG) $(CC1) $(CC2)$@ auto\pathdef.c
990
991
992# Need to escape both quotes and backslashes in $INTERP_DEFINES
993INTERP_DEFINES_ESC_BKS=$(INTERP_DEFINES:\=\\)
994INTERP_DEFINES_ESC=$(INTERP_DEFINES_ESC_BKS:"=\")
995
996# Note: the silly /*"*/ below are there to trick make into accepting
997# the # character as something other than a comment without messing up
998# the preprocessor directive.
999auto\pathdef.c::
1000 -@md auto
1001 @echo creating auto/pathdef.c
1002 @copy /y &&|
1003/* pathdef.c */
1004/*"*/#include "vim.h"/*"*/
1005
1006char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)";
1007char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)";
1008char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS:\=\\) $(DEFINES) $(MBDEFINES) $(INTERP_DEFINES_ESC) $(OPT) $(EXETYPE) $(CPUARG) $(ALIGNARG) $(DEBUG_FLAG) $(CODEGUARD_FLAG)";
1009char_u *all_lflags = (char_u *)"$(LINK:\=\\) $(LFLAGS:\=\\)";
1010char_u *compiled_user = (char_u *)"$(USERNAME)";
1011char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";
1012| auto\pathdef.c
1013
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001014lua.lib: $(LUA)\lib\lua$(LUA_VER).lib
1015 coff2omf $(LUA)\lib\lua$(LUA_VER).lib $@
1016
Bram Moolenaar071d4272004-06-13 20:20:40 +00001017perl.lib: $(PERL)\lib\CORE\perl$(PERL_VER).lib
1018 coff2omf $(PERL)\lib\CORE\perl$(PERL_VER).lib $@
1019
1020python.lib: $(PYTHON)\libs\python$(PYTHON_VER).lib
1021 coff2omf $(PYTHON)\libs\python$(PYTHON_VER).lib $@
1022
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001023python3.lib: $(PYTHON3)\libs\python$(PYTHON3_VER).lib
1024 coff2omf $(PYTHON3)\libs\python$(PYTHON3_VER).lib $@
1025
Bram Moolenaar071d4272004-06-13 20:20:40 +00001026ruby.lib: $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
1027 coff2omf $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib $@
1028
1029# For some reason, the coff2omf method doesn't work on libXpm.lib, so
1030# we have to manually generate an import library straight from the DLL.
1031xpm.lib: $(XPM)\lib\libXpm.lib
1032 implib -a $@ $(XPM)\bin\libXpm.dll
1033
1034tcl.lib: $(TCL_LIB)
1035!if ("$(DYNAMIC_TCL)" == "yes")
1036 copy $(TCL_LIB) $@
1037!else
1038 coff2omf $(TCL_LIB) $@
1039!endif
1040
1041!if ("$(DYNAMIC_TCL)" == "yes")
1042tclstub$(TCL_VER)-bor.lib:
1043 -@IF NOT EXIST $@ ECHO You must download tclstub$(TCL_VER)-bor.lib separately and\
1044 place it in the src directory in order to compile a dynamic TCL-enabled\
1045 (g)vim with the Borland compiler. You can get the tclstub$(TCL_VER)-bor.lib file\
1046 at http://mywebpage.netscape.com/sharppeople/vim/tclstub$(TCL_VER)-bor.lib
1047!endif
1048
1049# vimrun.exe:
1050vimrun.exe: vimrun.c
1051!if ("$(USEDLL)"=="yes")
1052 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) -D_RTLDLL vimrun.c cw32mti.lib
1053!else
1054 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) vimrun.c
1055!endif
1056
1057# The dependency on $(OBJDIR) is to have bcc.cfg generated each time.
1058$(OBJDIR)\bcc.cfg: Make_bc5.mak $(OBJDIR)
1059 copy /y &&|
1060 $(CFLAGS)
1061 -L$(LIB)
1062 $(DEFINES)
1063 $(MBDEFINES)
1064 $(INTERP_DEFINES)
1065 $(EXETYPE)
1066 $(DEBUG_FLAG)
1067 $(OPT)
1068 $(CODEGUARD_FLAG)
1069 $(CPUARG)
1070 $(ALIGNARG)
1071| $@
1072
1073# vi:set sts=4 sw=4:
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001074