blob: a23174fefb5ce28318e703fbd451d0091c0770c8 [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 Moolenaar071d4272004-06-13 20:20:40 +000075 main.obj \
76 mark.obj \
77 memfile.obj \
78 memline.obj \
79 menu.obj \
80 message.obj \
81 misc1.obj \
82 misc2.obj \
83 move.obj \
84 os_msdos.obj \
85 normal.obj \
86 ops.obj \
87 option.obj \
Bram Moolenaarc01140a2006-03-24 22:21:52 +000088 popupmnu.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +000089 quickfix.obj \
90 regexp.obj \
91 screen.obj \
92 search.obj \
Bram Moolenaaredac1852010-05-18 20:34:20 +020093 sha256.obj \
Bram Moolenaar6bb68362005-03-22 23:03:44 +000094 spell.obj \
Bram Moolenaar071d4272004-06-13 20:20:40 +000095 syntax.obj \
96 tag.obj \
97 term.obj \
98 ui.obj \
99 undo.obj \
100 window.obj
101
102all: vim.exe install.exe uninstal.exe xxd/xxd.exe
103
104# *Explicit Rules*
105
106vim.exe: vim.cfg $(EXE_dependencies) version.c
107 $(CC) $(DEBUG_FLAG) -c version.c
108 $(TLINK) /x/c/L$(LIBPATH) $(DEBUG_FLAG) @&&|
109c0l.obj $(EXE_dependencies) version.obj
110vim
111 # no map file
112$(SPAWNL) cl.lib
113|
114
115install.exe: dosinst.c
116 $(CC) -einstall $(DEBUG_FLAG) dosinst.c
117
118uninstal.exe: uninstal.c
119 $(CC) $(DEBUG_FLAG) uninstal.c
120
121# This may fail for older make versions, building xxd will fail anyway then.
122xxd/xxd.exe: xxd/xxd.c
123 cd xxd
124 $(MAKE) -f Make_bc3.mak BOR=$(BOR) DEBUG=$(DEBUG)
125 cd ..
126
127# cleaning up: Delete all generated files
128clean:
129 -del *.obj
130 -del vim.exe
131 -del vim.sym
132 -del install.exe
133 -del uninstal.exe
134 -del xxd\*.obj
135 -del xxd\xxd.exe
136 -del vim.cfg
137 -del testdir\*.out
138
139# Individual File Dependencies (incomplete)
140ex_docmd.obj: ex_docmd.c ex_cmds.h
141
142ex_eval.obj: ex_eval.c ex_cmds.h
143
144main.obj: main.c globals.h option.h
145
146term.obj: term.c term.h
147
148version.obj: version.c version.h
149
150
151# Compiler Configuration File
152#
153# The following compile options can be changed for better machines.
154# replace -1- with -2 to produce code for a 80286 or higher
155# replace -1- with -3 to produce code for a 80386 or higher
156# add -v for source debugging
157vim.cfg: Make_bc3.mak
158 copy &&|
159-ml
160-1-
161-f-
162-C
163-N
164-O
165-Z
166-k-
167-d
168-h
169-vi-
170-H=VIM.SYM
171-w-par
172-weas
173-wpre
174-Iproto
175-I$(INCLUDEPATH)
176-L$(LIBPATH)
Bram Moolenaar1a14c2c2006-03-25 21:52:34 +0000177-DMSDOS;FEAT_TINY$(SPAWND)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000178| vim.cfg
179
180test:
181 cd testdir
182 $(MAKE) -f Make_dos.mak small
183 cd ..