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