blob: 484f562adffecfee0c659b5ce7d99adc2a2b4649 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001# vim: set ft=make :
2# Makefile for VIM on the Amiga, using SAS/Lattice C 6.0 to 6.58
3#
4# Do NOT use the peephole optimizer with a version before 6.56!
5# It messes up all kinds of things:
6# For 6.0 and 6.1, expand_env() will not work correctly.
7# For 6.2 and 6.3 the call to free_line in u_freeentry is wrong.
8# The "read.me" file for version 6.56 includes a remark about a fix for the
9# peephole optimizer. Everything before 6.56 will probably fail.
10#
11# You should use Manx Aztec C whenever possible, because it has been tested.
12#
13# The prototypes from Manx and SAS are incompatible. If the prototypes
14# were generated by Manx, first do "touch *.c; make proto" before "make".
15# The prototypes generated on Unix work for both.
16#
17# Note: Not all dependencies are included. This was done to avoid having
18# to compile everything when a global variable or function is added.
19
20#>>>>> choose options:
21
22### See feature.h for a list of optionals.
23### Any other defines can be included here.
24
25# NO_ARP Don't include ARP functions
26# SASC=658 Sas/C version number
27# NEWSASC fixes a bug in the syntax highlighting?
28DEFINES = DEF=NO_ARP DEF=NEWSASC DEF="SASC=658"
29
30#>>>>> if HAVE_TGETENT is defined termlib.o has to be used
31#TERMLIB = termlib.o
32TERMLIB =
33
34#>>>>> choose NODEBUG for normal compiling, the other for debugging and
35# profiling
36# don't switch on debugging when generating proto files, it crashes the
37# compiler.
38DBG = NODEBUG
39#DBG = DBG=SF
40
41#>>>>> choose NOOPTPEEP for 6.0 to 6.3, NOOPT for debugging
42# with version 6.56 and later you can probably use OPT
43OPTIMIZE = OPT
44#OPTIMIZE = NOOPTPEEP
45#OPTIMIZE = NOOPT
46
47# for 6.58 you can use the line below, but be warned it takes a loooonnnggg time
48#OPTIMIZE=OPT OPTIMIZERSCHEDULER OPTIMIZERTIME NoOPTIMIZERALIAS \
49 OptimizerComplexity=10 OptimizerDepth=10 OptimizerRecurDepth=10 \
50 OptimizerInLocal OPTPEEP
51
52#generate code for your processor - 68060 will work for 040's as well.
53CPU=68000
54#CPU=68020
55#CPU=68030
56#CPU=68040
57#CPU=68060
58
59#Error reporting - rexx or console
60ERROR = ERRORCONSOLE ERRORSOURCE ERRORHIGHLIGHT
61#ERROR = ERRORREXX ERRORCONSOLE ERRORSOURCE ERRORHIGHLIGHT
62
63#memory types, if you have fast use it :->,
64# ANY = will work on all machines
65# FAST = this is the best option, for speed
66#MEMORYTYPE=FAST
67MEMORYTYPE=ANY
68
69#MEMSIZE - this is for compile time only for speed of compilation
70#MEMSIZE=HUGE
71MEMSIZE=LARGE
72#MEMSIZE=SMALL
73
74#>>>>> end of choices
75###########################################################################
76
77CC = sc
78GST = vim.gst
79COPTS = SINT SCODE SDATA
80SHELL = csh
81DEL = $(SHELL) -c rm -f
82
83# ignore error messages for uninitialized variables, they are mostly not correct
84CFLAGS = NOLINK $(DBG) CPU=$(CPU) NOSTACKCHECK DEF=AMIGA CODE=FAR idir=proto ignore=317
85CFLAGS2 = $(OPTIMIZE) $(ERROR) GSTIMMEDIATE GST=$(GST)
86CFLAGS3 = $(COPTS) STRINGMERGE MEMSIZE=$(MEMSIZE)
87CFLAGS4 = $(DEFINES) DATAMEMORY=$(MEMORYTYPE)
88
89PROPT = DEF=PROTO GPROTO GPPARM MAXIMUMERRORS=999 GENPROTOSTATICS GENPROTOPARAMETERS
90
91SRC = \
92 buffer.c \
93 charset.c \
94 diff.c \
95 digraph.c \
96 edit.c \
97 eval.c \
98 ex_cmds.c \
99 ex_cmds2.c \
100 ex_docmd.c \
101 ex_eval.c \
102 ex_getln.c \
103 fileio.c \
104 fold.c \
105 getchar.c \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000106 hardcopy.c \
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000107 hashtable.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000108 main.c \
109 mark.c \
110 memfile.c \
111 memline.c \
112 menu.c \
113 message.c \
114 misc1.c \
115 misc2.c \
116 move.c \
117 mbyte.c \
118 normal.c \
119 ops.c \
120 option.c \
121 os_amiga.c \
122 quickfix.c \
123 regexp.c \
124 screen.c \
125 search.c \
Bram Moolenaar217ad922005-03-20 22:37:15 +0000126 spell.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000127 syntax.c \
128 tag.c \
129 term.c \
130 ui.c \
131 undo.c \
132 window.c \
133 version.c
134
135OBJ = \
136 buffer.o \
137 charset.o \
138 diff.o \
139 digraph.o \
140 edit.o \
141 eval.o \
142 ex_cmds.o \
143 ex_cmds2.o \
144 ex_docmd.o \
145 ex_eval.o \
146 ex_getln.o \
147 fileio.o \
148 fold.o \
149 getchar.o \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000150 hardcopy.o \
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000151 hashtable.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000152 main.o \
153 mark.o \
154 memfile.o \
155 memline.o \
156 menu.o \
157 message.o \
158 misc1.o \
159 misc2.o \
160 move.o \
161 mbyte.o \
162 normal.o \
163 ops.o \
164 option.o \
165 os_amiga.o \
166 quickfix.o \
167 regexp.o \
168 screen.o \
169 search.o \
Bram Moolenaar217ad922005-03-20 22:37:15 +0000170 spell.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000171 syntax.o \
172 tag.o \
173 term.o \
174 ui.o \
175 undo.o \
176 window.o \
177 $(TERMLIB)
178
179PRO = \
180 proto/buffer.pro \
181 proto/charset.pro \
182 proto/diff.pro \
183 proto/digraph.pro \
184 proto/edit.pro \
185 proto/eval.pro \
186 proto/ex_cmds.pro \
187 proto/ex_cmds2.pro \
188 proto/ex_docmd.pro \
189 proto/ex_eval.pro \
190 proto/ex_getln.pro \
191 proto/fileio.pro \
192 proto/fold.pro \
193 proto/getchar.pro \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000194 proto/hardcopy.pro \
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000195 proto/hashtable.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000196 proto/main.pro \
197 proto/mark.pro \
198 proto/memfile.pro \
199 proto/memline.pro \
200 proto/menu.pro \
201 proto/message.pro \
202 proto/misc1.pro \
203 proto/misc2.pro \
204 proto/move.pro \
205 proto/mbyte.pro \
206 proto/normal.pro \
207 proto/ops.pro \
208 proto/option.pro \
209 proto/os_amiga.pro \
210 proto/quickfix.pro \
211 proto/regexp.pro \
212 proto/screen.pro \
213 proto/search.pro \
Bram Moolenaar217ad922005-03-20 22:37:15 +0000214 proto/spell.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000215 proto/syntax.pro \
216 proto/tag.pro \
217 proto/term.pro \
218 proto/termlib.pro \
219 proto/ui.pro \
220 proto/undo.pro \
221 proto/window.pro
222
223all: proto Vim
224
225Vim: scoptions $(OBJ) version.c version.h
226 $(CC) $(CFLAGS) version.c
227 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
228
229debug: scoptions $(OBJ) version.c version.h
230 $(CC) $(CFLAGS) version.c
231 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
232
233proto: $(GST) $(PRO)
234
235tags:
236 spat ctags $(SRC) *.h
237# csh -c ctags $(SRC) *.h
238
239# can't use delete here, too many file names
240clean:
241 $(DEL) *.o Vim $(GST)
242
243# generate GlobalSymbolTable, which speeds up the compile time.
244#
245# A preprocessing stage is used to work arounda bug in the GST generator, in
246# that it does not handle nested makefiles properly in this stage.
247# Ignore error message for not producing any code (105).
248$(GST): scoptions vim.h keymap.h macros.h ascii.h term.h structs.h
249 $(CC) $(CFLAGS) PREPROCESSORONLY vim.h objectname pre.h
250 $(CC) MGST=$(GST) pre.h ignore=105
251 $(DEL) pre.h
252
253# generate an options file, because SAS/C smake can't handle the amiga command
254# line can handle the lengths that this makefile will impose on the shell.
255# (Manx's make can do this).
256scoptions: Make_sas.mak
257 @echo "Generating - $@ ..."
258 @echo $(CFLAGS) > scoptions
259 @echo $(CFLAGS1) >> scoptions
260 @echo $(CFLAGS2) >> scoptions
261 @echo $(CFLAGS3) >> scoptions
262 @echo $(CFLAGS4) >> scoptions
263 @echo $(COPTS) >>scoptions
264 @echo done
265
266###########################################################################
267
268$(OBJ): $(GST) vim.h
269$(PRO): $(GST) vim.h
270
271.c.o:
272 $(CC) $(CFLAGS) $*.c
273
274.c.pro:
275 $(CC) $(CFLAGS) GPFILE=proto/$*.pro $(PROPT) $*.c
276
277# dependancies
278buffer.o: buffer.c
279proto/buffer.pro: buffer.c
280charset.o: charset.c
281proto/charset.pro: charset.c
282diff.o: diff.c
283proto/diff.pro: diff.c
284digraph.o: digraph.c
285proto/digraph.pro: digraph.c
286edit.o: edit.c
287proto/edit.pro: edit.c
288eval.o: eval.c
289proto/eval.pro: eval.c
290ex_cmds.o: ex_cmds.c
291proto/ex_cmds.pro: ex_cmds.c
292ex_cmds2.o: ex_cmds2.c
293proto/ex_cmds2.pro: ex_cmds2.c
294ex_docmd.o: ex_docmd.c ex_cmds.h
295proto/ex_docmd.pro: ex_docmd.c ex_cmds.h
296ex_eval.o: ex_eval.c ex_cmds.h
297proto/ex_eval.pro: ex_eval.c ex_cmds.h
298ex_getln.o: ex_getln.c
299proto/ex_getln.pro: ex_getln.c
300fileio.o: fileio.c
301proto/fileio.pro: fileio.c
302fold.o: fold.c
303proto/fold.pro: fold.c
304getchar.o: getchar.c
305proto/getchar.pro: getchar.c
Bram Moolenaar58d98232005-07-23 22:25:46 +0000306hardcopy.o: hardcopy.c
307proto/hardcopy.pro: hardcopy.c
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000308hashtable.o: hashtable.c
309proto/hashtable.pro: hashtable.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000310main.o: main.c
311proto/main.pro: main.c
312mark.o: mark.c
313proto/mark.pro: mark.c
314memfile.o: memfile.c
315proto/memfile.pro: memfile.c
316memline.o: memline.c
317proto/memline.pro: memline.c
318menu.o: menu.c
319proto/menu.pro: menu.c
320message.o: message.c
321proto/message.pro: message.c
322misc1.o: misc1.c
323proto/misc1.pro: misc1.c
324misc2.o: misc2.c
325proto/misc2.pro: misc2.c
326move.o: move.c
327proto/move.pro: move.c
328mbyte.o: mbyte.c
329proto/mbyte.pro: mbyte.c
330normal.o: normal.c
331proto/normal.pro: normal.c
332ops.o: ops.c
333proto/ops.pro: ops.c
334option.o: option.c
335proto/option.pro: option.c
336os_amiga.o: os_amiga.c
337proto/os_amiga.pro: os_amiga.c
338quickfix.o: quickfix.c
339proto/quickfix.pro: quickfix.c
340regexp.o: regexp.c
341proto/regexp.pro: regexp.c
342screen.o: screen.c
343proto/screen.pro: screen.c
344search.o: search.c
345proto/search.pro: search.c
Bram Moolenaar217ad922005-03-20 22:37:15 +0000346spell.o: spell.c
347proto/spell.pro: spell.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000348syntax.o: syntax.c
349proto/syntax.pro: syntax.c
350tag.o: tag.c
351proto/tag.pro: tag.c
352term.o: term.c
353proto/term.pro: term.c
354termlib.o: termlib.c
355proto/termlib.pro: termlib.c
356ui.o: ui.c
357proto/ui.pro: ui.c
358undo.o: undo.c
359proto/undo.pro: undo.c
360window.o: window.c