blob: 1d27081a16e040d94236552ddb3f6cf2c11111c1 [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 = \
54 buffer.obj \
55 charset.obj \
56 diff.obj \
57 digraph.obj \
58 edit.obj \
59 eval.obj \
60 ex_cmds.obj \
61 ex_cmds2.obj \
62 ex_docmd.obj \
63 ex_eval.obj \
64 ex_getln.obj \
65 fileio.obj \
66 fold.obj \
67 getchar.obj \
68 main.obj \
69 mark.obj \
70 memfile.obj \
71 memline.obj \
72 menu.obj \
73 message.obj \
74 misc1.obj \
75 misc2.obj \
76 move.obj \
77 os_msdos.obj \
78 normal.obj \
79 ops.obj \
80 option.obj \
81 quickfix.obj \
82 regexp.obj \
83 screen.obj \
84 search.obj \
85 syntax.obj \
86 tag.obj \
87 term.obj \
88 ui.obj \
89 undo.obj \
90 window.obj
91
92all: vim.exe install.exe uninstal.exe xxd/xxd.exe
93
94# *Explicit Rules*
95
96vim.exe: vim.cfg $(EXE_dependencies) version.c
97 $(CC) $(DEBUG_FLAG) -c version.c
98 $(TLINK) /x/c/L$(LIBPATH) $(DEBUG_FLAG) @&&|
99c0l.obj $(EXE_dependencies) version.obj
100vim
101 # no map file
102$(SPAWNL) cl.lib
103|
104
105install.exe: dosinst.c
106 $(CC) -einstall $(DEBUG_FLAG) dosinst.c
107
108uninstal.exe: uninstal.c
109 $(CC) $(DEBUG_FLAG) uninstal.c
110
111# This may fail for older make versions, building xxd will fail anyway then.
112xxd/xxd.exe: xxd/xxd.c
113 cd xxd
114 $(MAKE) -f Make_bc3.mak BOR=$(BOR) DEBUG=$(DEBUG)
115 cd ..
116
117# cleaning up: Delete all generated files
118clean:
119 -del *.obj
120 -del vim.exe
121 -del vim.sym
122 -del install.exe
123 -del uninstal.exe
124 -del xxd\*.obj
125 -del xxd\xxd.exe
126 -del vim.cfg
127 -del testdir\*.out
128
129# Individual File Dependencies (incomplete)
130ex_docmd.obj: ex_docmd.c ex_cmds.h
131
132ex_eval.obj: ex_eval.c ex_cmds.h
133
134main.obj: main.c globals.h option.h
135
136term.obj: term.c term.h
137
138version.obj: version.c version.h
139
140
141# Compiler Configuration File
142#
143# The following compile options can be changed for better machines.
144# replace -1- with -2 to produce code for a 80286 or higher
145# replace -1- with -3 to produce code for a 80386 or higher
146# add -v for source debugging
147vim.cfg: Make_bc3.mak
148 copy &&|
149-ml
150-1-
151-f-
152-C
153-N
154-O
155-Z
156-k-
157-d
158-h
159-vi-
160-H=VIM.SYM
161-w-par
162-weas
163-wpre
164-Iproto
165-I$(INCLUDEPATH)
166-L$(LIBPATH)
167-DMSDOS$(SPAWND)
168| vim.cfg
169
170test:
171 cd testdir
172 $(MAKE) -f Make_dos.mak small
173 cd ..