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