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