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