blob: f0b91272f9cfeba4983facf39602d7f5feda5583 [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 Moolenaarfc735152005-03-22 22:54:12 +0000584 $(OBJDIR)\spell.obj \
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200585 $(OBJDIR)\spellfile.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000586 $(OBJDIR)\syntax.obj \
587 $(OBJDIR)\tag.obj \
588 $(OBJDIR)\term.obj \
589 $(OBJDIR)\ui.obj \
590 $(OBJDIR)\undo.obj \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200591 $(OBJDIR)\userfunc.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000592 $(OBJDIR)\version.obj \
593 $(OBJDIR)\window.obj \
594 $(OBJDIR)\pathdef.obj
595
596!if ("$(OLE)"=="yes")
597vimobj = $(vimobj) \
598 $(OBJDIR)\if_ole.obj
599!endif
600
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200601!ifdef LUA
602vimobj = $(vimobj) \
603 $(OBJDIR)\if_lua.obj
604!endif
605
Bram Moolenaar071d4272004-06-13 20:20:40 +0000606!ifdef PERL
607vimobj = $(vimobj) \
608 $(OBJDIR)\if_perl.obj
609!endif
610
611!ifdef PYTHON
612vimobj = $(vimobj) \
613 $(OBJDIR)\if_python.obj
614!endif
615
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200616!ifdef PYTHON3
617vimobj = $(vimobj) \
618 $(OBJDIR)\if_python3.obj
619!endif
620
Bram Moolenaar071d4272004-06-13 20:20:40 +0000621!ifdef RUBY
622vimobj = $(vimobj) \
623 $(OBJDIR)\if_ruby.obj
624!endif
625
626!ifdef TCL
627vimobj = $(vimobj) \
628 $(OBJDIR)\if_tcl.obj
629!endif
630
631!if ("$(CSCOPE)"=="yes")
632vimobj = $(vimobj) \
633 $(OBJDIR)\if_cscope.obj
634!endif
635
636!if ("$(NETBEANS)"=="yes")
637vimobj = $(vimobj) \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000638 $(OBJDIR)\netbeans.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000639!endif
640
Bram Moolenaare0874f82016-01-24 20:36:41 +0100641!if ("$(CHANNEL)"=="yes")
642vimobj = $(vimobj) \
643 $(OBJDIR)\channel.obj
644!endif
645
Bram Moolenaar071d4272004-06-13 20:20:40 +0000646!ifdef XPM
647vimobj = $(vimobj) \
648 $(OBJDIR)\xpm_w32.obj
649!endif
650
651!if ("$(VIMDLL)"=="yes")
652vimdllobj = $(vimobj)
653!if ("$(DEBUG)"=="yes")
654DLLTARGET = vim32d.dll
655!else
656DLLTARGET = vim32.dll
657!endif
658!else
659DLLTARGET = joebob
660!endif
661
662!if ("$(GUI)"=="yes")
663vimobj = $(vimobj) \
664 $(vimwinmain) \
665 $(OBJDIR)\gui.obj \
Bram Moolenaar408fb622005-03-07 23:03:19 +0000666 $(OBJDIR)\gui_beval.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000667 $(OBJDIR)\gui_w32.obj
668!endif
669
Bram Moolenaar071d4272004-06-13 20:20:40 +0000670vimobj = $(vimobj) \
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100671 $(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj
Bram Moolenaar071d4272004-06-13 20:20:40 +0000672# Blab what we are going to do:
673MSG = Compiling $(OSTYPE) $(TARGET) $(OLETARGET), with:
674!if ("$(GUI)"=="yes")
675MSG = $(MSG) GUI
676!endif
677!if ("$(OLE)"=="yes")
678MSG = $(MSG) OLE
679!endif
680!if ("$(USEDLL)"=="yes")
681MSG = $(MSG) USEDLL
682!endif
683!if ("$(VIMDLL)"=="yes")
684MSG = $(MSG) VIMDLL
685!endif
686!if ("$(FASTCALL)"=="yes")
687MSG = $(MSG) FASTCALL
688!endif
689!if ("$(MBYTE)"=="yes")
690MSG = $(MSG) MBYTE
691!endif
692!if ("$(IME)"=="yes")
693MSG = $(MSG) IME
694! if "$(DYNAMIC_IME)" == "yes"
695MSG = $(MSG)(dynamic)
696! endif
697!endif
698!if ("$(GETTEXT)"=="yes")
699MSG = $(MSG) GETTEXT
700!endif
701!if ("$(ICONV)"=="yes")
702MSG = $(MSG) ICONV
703!endif
704!if ("$(DEBUG)"=="yes")
705MSG = $(MSG) DEBUG
706!endif
707!if ("$(CODEGUARD)"=="yes")
708MSG = $(MSG) CODEGUARD
709!endif
710!if ("$(CSCOPE)"=="yes")
711MSG = $(MSG) CSCOPE
712!endif
713!if ("$(NETBEANS)"=="yes")
714MSG = $(MSG) NETBEANS
715!endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100716!if ("$(CHANNEL)"=="yes")
717MSG = $(MSG) CHANNEL
718!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000719!ifdef XPM
720MSG = $(MSG) XPM
721!endif
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200722!ifdef LUA
723MSG = $(MSG) LUA
724! if "$(DYNAMIC_LUA)" == "yes"
725MSG = $(MSG)(dynamic)
726! endif
727!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000728!ifdef PERL
729MSG = $(MSG) PERL
730! if "$(DYNAMIC_PERL)" == "yes"
731MSG = $(MSG)(dynamic)
732! endif
733!endif
734!ifdef PYTHON
735MSG = $(MSG) PYTHON
736! if "$(DYNAMIC_PYTHON)" == "yes"
737MSG = $(MSG)(dynamic)
738! endif
739!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200740!ifdef PYTHON3
741MSG = $(MSG) PYTHON3
742! if "$(DYNAMIC_PYTHON3)" == "yes"
743MSG = $(MSG)(dynamic)
744! endif
745!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000746!ifdef RUBY
747MSG = $(MSG) RUBY
748! if "$(DYNAMIC_RUBY)" == "yes"
749MSG = $(MSG)(dynamic)
750! endif
751!endif
752!ifdef TCL
753MSG = $(MSG) TCL
754! if "$(DYNAMIC_TCL)" == "yes"
755MSG = $(MSG)(dynamic)
756! endif
757!endif
758MSG = $(MSG) cpu=$(CPUARG)
759MSG = $(MSG) Align=$(ALIGNARG)
760
761!message $(MSG)
762
Bram Moolenaar071d4272004-06-13 20:20:40 +0000763!if ("$(VIMDLL)"=="yes")
764TARGETS = $(DLLTARGET)
765!endif
766TARGETS = $(TARGETS) $(TARGET)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000767
768# Targets:
769all: vim vimrun.exe install.exe xxd uninstal.exe GvimExt/gvimext.dll
770
771vim: $(OSTYPE) $(OBJDIR) $(OBJDIR)\bcc.cfg $(TARGETS)
772 @if exist $(OBJDIR)\version.obj del $(OBJDIR)\version.obj
773 @if exist auto\pathdef.c del auto\pathdef.c
774
775$(OSTYPE):
776 -@md $(OSTYPE)
777
778$(OBJDIR):
779 -@md $(OBJDIR)
780
781xxd:
782 @cd xxd
783 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" BCC="$(CC)"
784 @cd ..
785
786GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
787 cd GvimExt
788 $(MAKE) /f Make_bc5.mak USEDLL=$(USEDLL) BOR=$(BOR)
789 cd ..
790
791install.exe: dosinst.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000792 $(CC) $(CCARG) -WC -DWIN32 -einstall dosinst.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000793
794uninstal.exe: uninstal.c $(OBJDIR)\bcc.cfg
Bram Moolenaar071d4272004-06-13 20:20:40 +0000795 $(CC) $(CCARG) -WC -DWIN32 -O2 -euninstal uninstal.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000796
797clean:
798!if "$(OS)" == "Windows_NT"
799 # For Windows NT/2000, doesn't work on Windows 95/98...
800 # $(COMSPEC) needed to ensure rmdir.exe is not run
801 -@$(COMSPEC) /C rmdir /Q /S $(OBJDIR)
802!else
803 # For Windows 95/98, doesn't work on Windows NT/2000...
804 -@deltree /y $(OBJDIR)
805!endif
806 -@del *.res
807 -@del vim32*.dll
808 -@del vim32*.lib
809 -@del *vim*.exe
810 -@del *install*.exe
811 -@del *.csm
812 -@del *.map
813 -@del *.ilc
814 -@del *.ild
815 -@del *.ilf
816 -@del *.ils
817 -@del *.tds
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200818!ifdef LUA
819 -@del lua.lib
820!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000821!ifdef PERL
822 -@del perl.lib
823!endif
824!ifdef PYTHON
825 -@del python.lib
826!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200827!ifdef PYTHON3
828 -@del python3.lib
829!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000830!ifdef RUBY
831 -@del ruby.lib
832!endif
833!ifdef TCL
834 -@del tcl.lib
835!endif
836!ifdef XPM
837 -@del xpm.lib
838!endif
839 cd xxd
840 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
841 cd ..
842 cd GvimExt
843 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
844 cd ..
845
846$(DLLTARGET): $(OBJDIR) $(vimdllobj)
847 $(LINK) @&&|
848 $(LFLAGSDLL) +
849 c0d32.obj +
850 $(vimdllobj)
851 $<,$*
852!if ("$(CODEGUARD)"=="yes")
853 cg32.lib+
854!endif
855# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000856 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000857 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200858!ifdef LUA
859 $(LUA_LIB_FLAG)lua.lib+
860!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000861!ifdef PERL
862 $(PERL_LIB_FLAG)perl.lib+
863!endif
864!ifdef PYTHON
865 $(PYTHON_LIB_FLAG)python.lib+
866!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200867!ifdef PYTHON3
868 $(PYTHON3_LIB_FLAG)python3.lib+
869!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000870!ifdef RUBY
871 $(RUBY_LIB_FLAG)ruby.lib+
872!endif
873!ifdef TCL
874 $(TCL_LIB_FLAG)tcl.lib+
875!endif
876!ifdef XPM
877 xpm.lib+
878!endif
879!if ("$(USEDLL)"=="yes")
880 cw32i.lib
881!else
882 cw32.lib
883!endif
884 vim.def
Bram Moolenaar071d4272004-06-13 20:20:40 +0000885|
886
887!if ("$(VIMDLL)"=="yes")
888$(TARGET): $(OBJDIR) $(DLLTARGET) $(vimmain) $(OBJDIR)\$(RESFILE)
889!else
890$(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
891!endif
892 $(LINK) @&&|
893 $(LFLAGS) +
894 $(STARTUPOBJ) +
895!if ("$(VIMDLL)"=="yes")
896 $(vimmain)
897!else
898 $(vimobj)
899!endif
900 $<,$*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000901!if ("$(CODEGUARD)"=="yes")
902 cg32.lib+
903!endif
904# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905 ole2w32.lib +
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906 import32.lib+
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200907!ifdef LUA
908 $(LUA_LIB_FLAG)lua.lib+
909!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000910!ifdef PERL
911 $(PERL_LIB_FLAG)perl.lib+
912!endif
913!ifdef PYTHON
914 $(PYTHON_LIB_FLAG)python.lib+
915!endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200916!ifdef PYTHON3
917 $(PYTHON3_LIB_FLAG)python3.lib+
918!endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000919!ifdef RUBY
920 $(RUBY_LIB_FLAG)ruby.lib+
921!endif
922!ifdef TCL
923 $(TCL_LIB_FLAG)tcl.lib+
924!endif
925!ifdef XPM
926 xpm.lib+
927!endif
928!if ("$(USEDLL)"=="yes")
929 cw32i.lib
930!else
931 cw32.lib
932!endif
933
934 $(OBJDIR)\$(RESFILE)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000935|
936
937test:
938 cd testdir
939 $(MAKE) /NOLOGO -f Make_dos.mak win32
940 cd ..
941
942$(OBJDIR)\ex_docmd.obj: ex_docmd.c ex_cmds.h
943
944$(OBJDIR)\ex_eval.obj: ex_eval.c ex_cmds.h
945
946$(OBJDIR)\if_ole.obj: if_ole.cpp
947
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200948$(OBJDIR)\if_lua.obj: if_lua.c lua.lib
949 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_lua.c
950
Bram Moolenaar071d4272004-06-13 20:20:40 +0000951$(OBJDIR)\if_perl.obj: if_perl.c perl.lib
952 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_perl.c
953
954if_perl.c: if_perl.xs typemap
955 $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \
956 $(PERL)\lib\ExtUtils\typemap if_perl.xs > $@
957
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200958$(OBJDIR)\if_python.obj: if_python.c if_py_both.h python.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200959 $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
960
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200961$(OBJDIR)\if_python3.obj: if_python3.c if_py_both.h python3.lib
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200962 $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000963
964$(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib
965 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_ruby.c
966
967$(OBJDIR)\if_tcl.obj: if_tcl.c tcl.lib
968 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_tcl.c
969
970$(OBJDIR)\xpm_w32.obj: xpm_w32.c xpm.lib
971 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc xpm_w32.c
972
973$(OBJDIR)\netbeans.obj: netbeans.c $(NBDEBUG_DEP)
974 $(CC) $(CCARG) $(CC1) $(CC2)$@ netbeans.c
975
Bram Moolenaare0874f82016-01-24 20:36:41 +0100976$(OBJDIR)\channel.obj: channel.c
977 $(CC) $(CCARG) $(CC1) $(CC2)$@ channel.c
978
Bram Moolenaar071d4272004-06-13 20:20:40 +0000979$(OBJDIR)\vim.res: vim.rc version.h tools.bmp tearoff.bmp \
980 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
981 $(BRC) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc @&&|
982 $(DEFINES)
983|
984
985$(OBJDIR)\pathdef.obj: auto\pathdef.c
986 $(CC) $(CCARG) $(CC1) $(CC2)$@ auto\pathdef.c
987
988
989# Need to escape both quotes and backslashes in $INTERP_DEFINES
990INTERP_DEFINES_ESC_BKS=$(INTERP_DEFINES:\=\\)
991INTERP_DEFINES_ESC=$(INTERP_DEFINES_ESC_BKS:"=\")
992
993# Note: the silly /*"*/ below are there to trick make into accepting
994# the # character as something other than a comment without messing up
995# the preprocessor directive.
996auto\pathdef.c::
997 -@md auto
998 @echo creating auto/pathdef.c
999 @copy /y &&|
1000/* pathdef.c */
1001/*"*/#include "vim.h"/*"*/
1002
1003char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)";
1004char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)";
1005char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS:\=\\) $(DEFINES) $(MBDEFINES) $(INTERP_DEFINES_ESC) $(OPT) $(EXETYPE) $(CPUARG) $(ALIGNARG) $(DEBUG_FLAG) $(CODEGUARD_FLAG)";
1006char_u *all_lflags = (char_u *)"$(LINK:\=\\) $(LFLAGS:\=\\)";
1007char_u *compiled_user = (char_u *)"$(USERNAME)";
1008char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";
1009| auto\pathdef.c
1010
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001011lua.lib: $(LUA)\lib\lua$(LUA_VER).lib
1012 coff2omf $(LUA)\lib\lua$(LUA_VER).lib $@
1013
Bram Moolenaar071d4272004-06-13 20:20:40 +00001014perl.lib: $(PERL)\lib\CORE\perl$(PERL_VER).lib
1015 coff2omf $(PERL)\lib\CORE\perl$(PERL_VER).lib $@
1016
1017python.lib: $(PYTHON)\libs\python$(PYTHON_VER).lib
1018 coff2omf $(PYTHON)\libs\python$(PYTHON_VER).lib $@
1019
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001020python3.lib: $(PYTHON3)\libs\python$(PYTHON3_VER).lib
1021 coff2omf $(PYTHON3)\libs\python$(PYTHON3_VER).lib $@
1022
Bram Moolenaar071d4272004-06-13 20:20:40 +00001023ruby.lib: $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
1024 coff2omf $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib $@
1025
1026# For some reason, the coff2omf method doesn't work on libXpm.lib, so
1027# we have to manually generate an import library straight from the DLL.
1028xpm.lib: $(XPM)\lib\libXpm.lib
1029 implib -a $@ $(XPM)\bin\libXpm.dll
1030
1031tcl.lib: $(TCL_LIB)
1032!if ("$(DYNAMIC_TCL)" == "yes")
1033 copy $(TCL_LIB) $@
1034!else
1035 coff2omf $(TCL_LIB) $@
1036!endif
1037
1038!if ("$(DYNAMIC_TCL)" == "yes")
1039tclstub$(TCL_VER)-bor.lib:
1040 -@IF NOT EXIST $@ ECHO You must download tclstub$(TCL_VER)-bor.lib separately and\
1041 place it in the src directory in order to compile a dynamic TCL-enabled\
1042 (g)vim with the Borland compiler. You can get the tclstub$(TCL_VER)-bor.lib file\
1043 at http://mywebpage.netscape.com/sharppeople/vim/tclstub$(TCL_VER)-bor.lib
1044!endif
1045
1046# vimrun.exe:
1047vimrun.exe: vimrun.c
1048!if ("$(USEDLL)"=="yes")
1049 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) -D_RTLDLL vimrun.c cw32mti.lib
1050!else
1051 $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) vimrun.c
1052!endif
1053
1054# The dependency on $(OBJDIR) is to have bcc.cfg generated each time.
1055$(OBJDIR)\bcc.cfg: Make_bc5.mak $(OBJDIR)
1056 copy /y &&|
1057 $(CFLAGS)
1058 -L$(LIB)
1059 $(DEFINES)
1060 $(MBDEFINES)
1061 $(INTERP_DEFINES)
1062 $(EXETYPE)
1063 $(DEBUG_FLAG)
1064 $(OPT)
1065 $(CODEGUARD_FLAG)
1066 $(CPUARG)
1067 $(ALIGNARG)
1068| $@
1069
1070# vi:set sts=4 sw=4:
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02001071