blob: 0d8eb3d9ec464d1c44c3f02f7e03400e203b6365 [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 = \
Bram Moolenaar75464dc2016-07-02 20:27:50 +020092 arabic.c \
Bram Moolenaar3e460fd2019-01-26 16:21:07 +010093 autocmd.c \
Bram Moolenaaredac1852010-05-18 20:34:20 +020094 blowfish.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +000095 buffer.c \
96 charset.c \
Bram Moolenaar07cf3822014-08-10 16:31:50 +020097 crypt.c \
98 crypt_zip.c \
Bram Moolenaareead75c2019-04-21 11:35:00 +020099 debugger.c \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200100 dict.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101 diff.c \
102 digraph.c \
103 edit.c \
104 eval.c \
Bram Moolenaar73dad1e2016-07-17 22:13:49 +0200105 evalfunc.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000106 ex_cmds.c \
107 ex_cmds2.c \
108 ex_docmd.c \
109 ex_eval.c \
110 ex_getln.c \
111 fileio.c \
Bram Moolenaar5fd0f502019-02-13 23:13:28 +0100112 findfile.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000113 fold.c \
114 getchar.c \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000115 hardcopy.c \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000116 hashtab.c \
Bram Moolenaar4b471622019-01-31 13:48:09 +0100117 indent.c \
Bram Moolenaar7591bb32019-03-30 13:53:47 +0100118 insexpand.c \
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100119 json.c \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200120 list.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000121 main.c \
122 mark.c \
123 memfile.c \
124 memline.c \
125 menu.c \
126 message.c \
127 misc1.c \
128 misc2.c \
129 move.c \
130 mbyte.c \
131 normal.c \
132 ops.c \
133 option.c \
134 os_amiga.c \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000135 popupmnu.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136 quickfix.c \
137 regexp.c \
138 screen.c \
139 search.c \
Bram Moolenaaredac1852010-05-18 20:34:20 +0200140 sha256.c \
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100141 sign.c \
Bram Moolenaar217ad922005-03-20 22:37:15 +0000142 spell.c \
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200143 spellfile.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000144 syntax.c \
145 tag.c \
146 term.c \
147 ui.c \
148 undo.c \
Bram Moolenaarac9fb182019-04-27 13:04:13 +0200149 usercmd.c \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200150 userfunc.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000151 window.c \
152 version.c
153
154OBJ = \
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200155 arabic.o \
Bram Moolenaar3e460fd2019-01-26 16:21:07 +0100156 autocmd.o \
Bram Moolenaaredac1852010-05-18 20:34:20 +0200157 blowfish.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000158 buffer.o \
159 charset.o \
Bram Moolenaar07cf3822014-08-10 16:31:50 +0200160 crypt.o \
161 crypt_zip.o \
Bram Moolenaareead75c2019-04-21 11:35:00 +0200162 debugger.o \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200163 dict.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000164 diff.o \
165 digraph.o \
166 edit.o \
167 eval.o \
Bram Moolenaar73dad1e2016-07-17 22:13:49 +0200168 evalfunc.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000169 ex_cmds.o \
170 ex_cmds2.o \
171 ex_docmd.o \
172 ex_eval.o \
173 ex_getln.o \
174 fileio.o \
Bram Moolenaar5fd0f502019-02-13 23:13:28 +0100175 findfile.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000176 fold.o \
177 getchar.o \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000178 hardcopy.o \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000179 hashtab.o \
Bram Moolenaar4b471622019-01-31 13:48:09 +0100180 indent.o \
Bram Moolenaar7591bb32019-03-30 13:53:47 +0100181 insexpand.o \
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100182 json.o \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200183 list.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000184 main.o \
185 mark.o \
186 memfile.o \
187 memline.o \
188 menu.o \
189 message.o \
190 misc1.o \
191 misc2.o \
192 move.o \
193 mbyte.o \
194 normal.o \
195 ops.o \
196 option.o \
197 os_amiga.o \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000198 popupmnu.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000199 quickfix.o \
200 regexp.o \
201 screen.o \
202 search.o \
Bram Moolenaaredac1852010-05-18 20:34:20 +0200203 sha256.o \
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100204 sign.o \
Bram Moolenaar217ad922005-03-20 22:37:15 +0000205 spell.o \
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200206 spellfile.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000207 syntax.o \
208 tag.o \
209 term.o \
210 ui.o \
211 undo.o \
Bram Moolenaarac9fb182019-04-27 13:04:13 +0200212 usercmd.o \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200213 userfunc.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000214 window.o \
215 $(TERMLIB)
216
217PRO = \
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200218 proto/arabic.pro \
Bram Moolenaar3e460fd2019-01-26 16:21:07 +0100219 proto/autocmd.pro \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200220 proto/blowfish.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000221 proto/buffer.pro \
222 proto/charset.pro \
Bram Moolenaar07cf3822014-08-10 16:31:50 +0200223 proto/crypt.pro \
224 proto/crypt_zip.pro \
Bram Moolenaareead75c2019-04-21 11:35:00 +0200225 proto/debugger.pro \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200226 proto/dict.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000227 proto/diff.pro \
228 proto/digraph.pro \
229 proto/edit.pro \
230 proto/eval.pro \
Bram Moolenaar73dad1e2016-07-17 22:13:49 +0200231 proto/evalfunc.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000232 proto/ex_cmds.pro \
233 proto/ex_cmds2.pro \
234 proto/ex_docmd.pro \
235 proto/ex_eval.pro \
236 proto/ex_getln.pro \
237 proto/fileio.pro \
Bram Moolenaar5fd0f502019-02-13 23:13:28 +0100238 proto/findfile.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000239 proto/fold.pro \
240 proto/getchar.pro \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000241 proto/hardcopy.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000242 proto/hashtab.pro \
Bram Moolenaar4b471622019-01-31 13:48:09 +0100243 proto/indent.pro \
Bram Moolenaar7591bb32019-03-30 13:53:47 +0100244 proto/insexpand.pro \
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100245 proto/json.pro \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200246 proto/list.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000247 proto/main.pro \
248 proto/mark.pro \
249 proto/memfile.pro \
250 proto/memline.pro \
251 proto/menu.pro \
252 proto/message.pro \
253 proto/misc1.pro \
254 proto/misc2.pro \
255 proto/move.pro \
256 proto/mbyte.pro \
257 proto/normal.pro \
258 proto/ops.pro \
259 proto/option.pro \
260 proto/os_amiga.pro \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000261 proto/popupmnu.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000262 proto/quickfix.pro \
263 proto/regexp.pro \
264 proto/screen.pro \
265 proto/search.pro \
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200266 proto/sha256.pro \
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100267 proto/sign.pro \
Bram Moolenaar217ad922005-03-20 22:37:15 +0000268 proto/spell.pro \
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200269 proto/spellfile.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000270 proto/syntax.pro \
271 proto/tag.pro \
272 proto/term.pro \
273 proto/termlib.pro \
274 proto/ui.pro \
275 proto/undo.pro \
Bram Moolenaarac9fb182019-04-27 13:04:13 +0200276 proto/usercmd.pro \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200277 proto/userfunc.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000278 proto/window.pro
279
280all: proto Vim
281
282Vim: scoptions $(OBJ) version.c version.h
283 $(CC) $(CFLAGS) version.c
284 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
285
286debug: scoptions $(OBJ) version.c version.h
287 $(CC) $(CFLAGS) version.c
288 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
289
290proto: $(GST) $(PRO)
291
292tags:
293 spat ctags $(SRC) *.h
294# csh -c ctags $(SRC) *.h
295
296# can't use delete here, too many file names
297clean:
298 $(DEL) *.o Vim $(GST)
299
300# generate GlobalSymbolTable, which speeds up the compile time.
301#
Bram Moolenaar84a05ac2013-05-06 04:24:17 +0200302# A preprocessing stage is used to work around a bug in the GST generator, in
Bram Moolenaar071d4272004-06-13 20:20:40 +0000303# that it does not handle nested makefiles properly in this stage.
304# Ignore error message for not producing any code (105).
305$(GST): scoptions vim.h keymap.h macros.h ascii.h term.h structs.h
306 $(CC) $(CFLAGS) PREPROCESSORONLY vim.h objectname pre.h
307 $(CC) MGST=$(GST) pre.h ignore=105
308 $(DEL) pre.h
309
310# generate an options file, because SAS/C smake can't handle the amiga command
311# line can handle the lengths that this makefile will impose on the shell.
312# (Manx's make can do this).
313scoptions: Make_sas.mak
314 @echo "Generating - $@ ..."
315 @echo $(CFLAGS) > scoptions
316 @echo $(CFLAGS1) >> scoptions
317 @echo $(CFLAGS2) >> scoptions
318 @echo $(CFLAGS3) >> scoptions
319 @echo $(CFLAGS4) >> scoptions
320 @echo $(COPTS) >>scoptions
321 @echo done
322
323###########################################################################
324
325$(OBJ): $(GST) vim.h
326$(PRO): $(GST) vim.h
327
328.c.o:
329 $(CC) $(CFLAGS) $*.c
330
331.c.pro:
332 $(CC) $(CFLAGS) GPFILE=proto/$*.pro $(PROPT) $*.c
333
Bram Moolenaar84a05ac2013-05-06 04:24:17 +0200334# dependencies
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200335arabic.o: arabic.c
336proto/arabic.pro: arabic.c
Bram Moolenaar3e460fd2019-01-26 16:21:07 +0100337autocmd.o: autocmd.c
338proto/autocmd.pro: autocmd.c
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200339blowfish.o: blowfish.c
340proto/blowfish.pro: blowfish.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000341buffer.o: buffer.c
342proto/buffer.pro: buffer.c
343charset.o: charset.c
344proto/charset.pro: charset.c
Bram Moolenaar07cf3822014-08-10 16:31:50 +0200345crypt.o: crypt.c
346proto/crypt.pro: crypt.c
347crypt_zip.o: crypt_zip.c
348proto/crypt_zip.pro: crypt_zip.c
Bram Moolenaareead75c2019-04-21 11:35:00 +0200349debugger.o: debugger.c
350proto/debugger.pro: debugger.c
Bram Moolenaar6583c442016-07-17 18:41:47 +0200351dict.o: dict.c
352proto/dict.pro: dict.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000353diff.o: diff.c
354proto/diff.pro: diff.c
355digraph.o: digraph.c
356proto/digraph.pro: digraph.c
357edit.o: edit.c
358proto/edit.pro: edit.c
359eval.o: eval.c
360proto/eval.pro: eval.c
Bram Moolenaar73dad1e2016-07-17 22:13:49 +0200361evalfunc.o: evalfunc.c
362proto/evalfunc.pro: evalfunc.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000363ex_cmds.o: ex_cmds.c
364proto/ex_cmds.pro: ex_cmds.c
365ex_cmds2.o: ex_cmds2.c
366proto/ex_cmds2.pro: ex_cmds2.c
367ex_docmd.o: ex_docmd.c ex_cmds.h
368proto/ex_docmd.pro: ex_docmd.c ex_cmds.h
369ex_eval.o: ex_eval.c ex_cmds.h
370proto/ex_eval.pro: ex_eval.c ex_cmds.h
371ex_getln.o: ex_getln.c
372proto/ex_getln.pro: ex_getln.c
373fileio.o: fileio.c
374proto/fileio.pro: fileio.c
Bram Moolenaar5fd0f502019-02-13 23:13:28 +0100375findfile.o: findfile.c
376proto/findfile.pro: findfile.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000377fold.o: fold.c
378proto/fold.pro: fold.c
379getchar.o: getchar.c
380proto/getchar.pro: getchar.c
Bram Moolenaar58d98232005-07-23 22:25:46 +0000381hardcopy.o: hardcopy.c
382proto/hardcopy.pro: hardcopy.c
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000383hashtab.o: hashtab.c
384proto/hashtab.pro: hashtab.c
Bram Moolenaar4b471622019-01-31 13:48:09 +0100385indent.o: indent.c
386proto/indent.pro: indent.c
Bram Moolenaar7591bb32019-03-30 13:53:47 +0100387insexpand.o: insexpand.c
388proto/insexpand.pro: insexpand.c
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100389json.o: json.c
390proto/json.pro: json.c
Bram Moolenaar6583c442016-07-17 18:41:47 +0200391list.o: list.c
392proto/list.pro: list.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000393main.o: main.c
394proto/main.pro: main.c
395mark.o: mark.c
396proto/mark.pro: mark.c
397memfile.o: memfile.c
398proto/memfile.pro: memfile.c
399memline.o: memline.c
400proto/memline.pro: memline.c
401menu.o: menu.c
402proto/menu.pro: menu.c
403message.o: message.c
404proto/message.pro: message.c
405misc1.o: misc1.c
406proto/misc1.pro: misc1.c
407misc2.o: misc2.c
408proto/misc2.pro: misc2.c
409move.o: move.c
410proto/move.pro: move.c
411mbyte.o: mbyte.c
412proto/mbyte.pro: mbyte.c
413normal.o: normal.c
414proto/normal.pro: normal.c
415ops.o: ops.c
416proto/ops.pro: ops.c
417option.o: option.c
418proto/option.pro: option.c
419os_amiga.o: os_amiga.c
420proto/os_amiga.pro: os_amiga.c
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000421popupmnu.o: popupmnu.c
422proto/popupmnu.pro: popupmnu.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000423quickfix.o: quickfix.c
424proto/quickfix.pro: quickfix.c
425regexp.o: regexp.c
426proto/regexp.pro: regexp.c
427screen.o: screen.c
428proto/screen.pro: screen.c
429search.o: search.c
430proto/search.pro: search.c
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200431sha256.o: sha256.c
432proto/sha256.pro: sha256.c
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100433sign.o: sign.c
434proto/sign.pro: sign.c
Bram Moolenaar217ad922005-03-20 22:37:15 +0000435spell.o: spell.c
436proto/spell.pro: spell.c
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200437spellfile.o: spellfile.c
438proto/spellfile.pro: spellfile.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000439syntax.o: syntax.c
440proto/syntax.pro: syntax.c
441tag.o: tag.c
442proto/tag.pro: tag.c
443term.o: term.c
444proto/term.pro: term.c
445termlib.o: termlib.c
446proto/termlib.pro: termlib.c
447ui.o: ui.c
448proto/ui.pro: ui.c
449undo.o: undo.c
450proto/undo.pro: undo.c
Bram Moolenaarac9fb182019-04-27 13:04:13 +0200451usercmd.o: usercmd.c
452proto/usercmd.pro: usercmd.c
Bram Moolenaar6583c442016-07-17 18:41:47 +0200453userfunc.o: userfunc.c
454proto/userfunc.pro: userfunc.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000455window.o: window.c