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