blob: dea9e1011a74643af8031761a683cb5d47929289 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001# Makefile for Borland C++ 3.1 or 4.0 to compile a 16 bit version of Vim.
2#
3# There are compilation options at the end of this file.
4#
5# Command line variables:
6# BOR path to root of Borland C (E:\BORLANDC)
7# DEBUG set to "yes" for debugging (no)
8# SPAWNO path to the spawno library directory, empty if you do not have
9# it; use 8.3 filenames! (C:\CC\SPAWN)
10
11.AUTODEPEND
12
13!ifndef BOR
14BOR = E:\BORLANDC
15!endif
16
17!if ("$(DEBUG)" == "yes")
18DEBUG_FLAG = -v
19!else
20DEBUG_FLAG =
21!endif
22
23CC = $(BOR)\bin\bcc.exe +VIM.CFG
24TLINK = $(BOR)\bin\tlink.exe
25
26!ifndef SPAWNO
27SPAWNO = C:\CC\SPAWN
28!endif
29
30!if ("$(SPAWNO)" == "")
31LIBPATH = $(BOR)\LIB
32INCLUDEPATH = $(BOR)\INCLUDE
33SPAWND =
34SPAWNL =
35!else
36LIBPATH = $(BOR)\LIB;$(SPAWNO)
37INCLUDEPATH = $(BOR)\INCLUDE;$(SPAWNO)
38SPAWND = ;SPAWNO
39SPAWNL = spawnl.lib
40!endif
41
42
43# *Implicit Rules*
44#
45# use -v for debugging
46#
47.c.obj:
48 $(CC) -c $(DEBUG_FLAG) {$< }
49
50# *List Macros*
51
52
53EXE_dependencies = \
Bram Moolenaaredac1852010-05-18 20:34:20 +020054 blowfish.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +000055 buffer.obj \
56 charset.obj \
Bram Moolenaar07cf3822014-08-10 16:31:50 +020057 crypt.obj \
58 crypt_zip.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +000059 diff.obj \
60 digraph.obj \
61 edit.obj \
62 eval.obj \
63 ex_cmds.obj \
64 ex_cmds2.obj \
65 ex_docmd.obj \
66 ex_eval.obj \
67 ex_getln.obj \
68 fileio.obj \
69 fold.obj \
70 getchar.obj \
Bram Moolenaar58d98232005-07-23 22:25:46 +000071 hardcopy.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +000072 hashtab.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +000073 main.obj \
74 mark.obj \
75 memfile.obj \
76 memline.obj \
77 menu.obj \
78 message.obj \
79 misc1.obj \
80 misc2.obj \
81 move.obj \
82 os_msdos.obj \
83 normal.obj \
84 ops.obj \
85 option.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +000086 popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +000087 quickfix.obj \
88 regexp.obj \
89 screen.obj \
90 search.obj \
Bram Moolenaaredac1852010-05-18 20:34:20 +020091 sha256.obj \
Bram Moolenaar6bb68362005-03-22 23:03:44 +000092 spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +000093 syntax.obj \
94 tag.obj \
95 term.obj \
96 ui.obj \
97 undo.obj \
98 window.obj
99
100all: vim.exe install.exe uninstal.exe xxd/xxd.exe
101
102# *Explicit Rules*
103
104vim.exe: vim.cfg $(EXE_dependencies) version.c
105 $(CC) $(DEBUG_FLAG) -c version.c
106 $(TLINK) /x/c/L$(LIBPATH) $(DEBUG_FLAG) @&&|
107c0l.obj $(EXE_dependencies) version.obj
108vim
109 # no map file
110$(SPAWNL) cl.lib
111|
112
113install.exe: dosinst.c
114 $(CC) -einstall $(DEBUG_FLAG) dosinst.c
115
116uninstal.exe: uninstal.c
117 $(CC) $(DEBUG_FLAG) uninstal.c
118
119# This may fail for older make versions, building xxd will fail anyway then.
120xxd/xxd.exe: xxd/xxd.c
121 cd xxd
122 $(MAKE) -f Make_bc3.mak BOR=$(BOR) DEBUG=$(DEBUG)
123 cd ..
124
125# cleaning up: Delete all generated files
126clean:
127 -del *.obj
128 -del vim.exe
129 -del vim.sym
130 -del install.exe
131 -del uninstal.exe
132 -del xxd\*.obj
133 -del xxd\xxd.exe
134 -del vim.cfg
135 -del testdir\*.out
136
137# Individual File Dependencies (incomplete)
138ex_docmd.obj: ex_docmd.c ex_cmds.h
139
140ex_eval.obj: ex_eval.c ex_cmds.h
141
142main.obj: main.c globals.h option.h
143
144term.obj: term.c term.h
145
146version.obj: version.c version.h
147
148
149# Compiler Configuration File
150#
151# The following compile options can be changed for better machines.
152# replace -1- with -2 to produce code for a 80286 or higher
153# replace -1- with -3 to produce code for a 80386 or higher
154# add -v for source debugging
155vim.cfg: Make_bc3.mak
156 copy &&|
157-ml
158-1-
159-f-
160-C
161-N
162-O
163-Z
164-k-
165-d
166-h
167-vi-
168-H=VIM.SYM
169-w-par
170-weas
171-wpre
172-Iproto
173-I$(INCLUDEPATH)
174-L$(LIBPATH)
Bram Moolenaar1a14c2c2006-03-25 21:52:34 +0000175-DMSDOS;FEAT_TINY$(SPAWND)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000176| vim.cfg
177
178test:
179 cd testdir
180 $(MAKE) -f Make_dos.mak small
181 cd ..