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