blob: 1751d8ae8d11514c225bbaa8891f241d9c68dde6 [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 Moolenaar383f9bc2005-01-19 22:18:32 +0000106 hashtable.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000107 main.c \
108 mark.c \
109 memfile.c \
110 memline.c \
111 menu.c \
112 message.c \
113 misc1.c \
114 misc2.c \
115 move.c \
116 mbyte.c \
117 normal.c \
118 ops.c \
119 option.c \
120 os_amiga.c \
121 quickfix.c \
122 regexp.c \
123 screen.c \
124 search.c \
125 syntax.c \
126 tag.c \
127 term.c \
128 ui.c \
129 undo.c \
130 window.c \
131 version.c
132
133OBJ = \
134 buffer.o \
135 charset.o \
136 diff.o \
137 digraph.o \
138 edit.o \
139 eval.o \
140 ex_cmds.o \
141 ex_cmds2.o \
142 ex_docmd.o \
143 ex_eval.o \
144 ex_getln.o \
145 fileio.o \
146 fold.o \
147 getchar.o \
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000148 hashtable.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000149 main.o \
150 mark.o \
151 memfile.o \
152 memline.o \
153 menu.o \
154 message.o \
155 misc1.o \
156 misc2.o \
157 move.o \
158 mbyte.o \
159 normal.o \
160 ops.o \
161 option.o \
162 os_amiga.o \
163 quickfix.o \
164 regexp.o \
165 screen.o \
166 search.o \
167 syntax.o \
168 tag.o \
169 term.o \
170 ui.o \
171 undo.o \
172 window.o \
173 $(TERMLIB)
174
175PRO = \
176 proto/buffer.pro \
177 proto/charset.pro \
178 proto/diff.pro \
179 proto/digraph.pro \
180 proto/edit.pro \
181 proto/eval.pro \
182 proto/ex_cmds.pro \
183 proto/ex_cmds2.pro \
184 proto/ex_docmd.pro \
185 proto/ex_eval.pro \
186 proto/ex_getln.pro \
187 proto/fileio.pro \
188 proto/fold.pro \
189 proto/getchar.pro \
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000190 proto/hashtable.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000191 proto/main.pro \
192 proto/mark.pro \
193 proto/memfile.pro \
194 proto/memline.pro \
195 proto/menu.pro \
196 proto/message.pro \
197 proto/misc1.pro \
198 proto/misc2.pro \
199 proto/move.pro \
200 proto/mbyte.pro \
201 proto/normal.pro \
202 proto/ops.pro \
203 proto/option.pro \
204 proto/os_amiga.pro \
205 proto/quickfix.pro \
206 proto/regexp.pro \
207 proto/screen.pro \
208 proto/search.pro \
209 proto/syntax.pro \
210 proto/tag.pro \
211 proto/term.pro \
212 proto/termlib.pro \
213 proto/ui.pro \
214 proto/undo.pro \
215 proto/window.pro
216
217all: proto Vim
218
219Vim: scoptions $(OBJ) version.c version.h
220 $(CC) $(CFLAGS) version.c
221 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
222
223debug: scoptions $(OBJ) version.c version.h
224 $(CC) $(CFLAGS) version.c
225 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
226
227proto: $(GST) $(PRO)
228
229tags:
230 spat ctags $(SRC) *.h
231# csh -c ctags $(SRC) *.h
232
233# can't use delete here, too many file names
234clean:
235 $(DEL) *.o Vim $(GST)
236
237# generate GlobalSymbolTable, which speeds up the compile time.
238#
239# A preprocessing stage is used to work arounda bug in the GST generator, in
240# that it does not handle nested makefiles properly in this stage.
241# Ignore error message for not producing any code (105).
242$(GST): scoptions vim.h keymap.h macros.h ascii.h term.h structs.h
243 $(CC) $(CFLAGS) PREPROCESSORONLY vim.h objectname pre.h
244 $(CC) MGST=$(GST) pre.h ignore=105
245 $(DEL) pre.h
246
247# generate an options file, because SAS/C smake can't handle the amiga command
248# line can handle the lengths that this makefile will impose on the shell.
249# (Manx's make can do this).
250scoptions: Make_sas.mak
251 @echo "Generating - $@ ..."
252 @echo $(CFLAGS) > scoptions
253 @echo $(CFLAGS1) >> scoptions
254 @echo $(CFLAGS2) >> scoptions
255 @echo $(CFLAGS3) >> scoptions
256 @echo $(CFLAGS4) >> scoptions
257 @echo $(COPTS) >>scoptions
258 @echo done
259
260###########################################################################
261
262$(OBJ): $(GST) vim.h
263$(PRO): $(GST) vim.h
264
265.c.o:
266 $(CC) $(CFLAGS) $*.c
267
268.c.pro:
269 $(CC) $(CFLAGS) GPFILE=proto/$*.pro $(PROPT) $*.c
270
271# dependancies
272buffer.o: buffer.c
273proto/buffer.pro: buffer.c
274charset.o: charset.c
275proto/charset.pro: charset.c
276diff.o: diff.c
277proto/diff.pro: diff.c
278digraph.o: digraph.c
279proto/digraph.pro: digraph.c
280edit.o: edit.c
281proto/edit.pro: edit.c
282eval.o: eval.c
283proto/eval.pro: eval.c
284ex_cmds.o: ex_cmds.c
285proto/ex_cmds.pro: ex_cmds.c
286ex_cmds2.o: ex_cmds2.c
287proto/ex_cmds2.pro: ex_cmds2.c
288ex_docmd.o: ex_docmd.c ex_cmds.h
289proto/ex_docmd.pro: ex_docmd.c ex_cmds.h
290ex_eval.o: ex_eval.c ex_cmds.h
291proto/ex_eval.pro: ex_eval.c ex_cmds.h
292ex_getln.o: ex_getln.c
293proto/ex_getln.pro: ex_getln.c
294fileio.o: fileio.c
295proto/fileio.pro: fileio.c
296fold.o: fold.c
297proto/fold.pro: fold.c
298getchar.o: getchar.c
299proto/getchar.pro: getchar.c
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000300hashtable.o: hashtable.c
301proto/hashtable.pro: hashtable.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000302main.o: main.c
303proto/main.pro: main.c
304mark.o: mark.c
305proto/mark.pro: mark.c
306memfile.o: memfile.c
307proto/memfile.pro: memfile.c
308memline.o: memline.c
309proto/memline.pro: memline.c
310menu.o: menu.c
311proto/menu.pro: menu.c
312message.o: message.c
313proto/message.pro: message.c
314misc1.o: misc1.c
315proto/misc1.pro: misc1.c
316misc2.o: misc2.c
317proto/misc2.pro: misc2.c
318move.o: move.c
319proto/move.pro: move.c
320mbyte.o: mbyte.c
321proto/mbyte.pro: mbyte.c
322normal.o: normal.c
323proto/normal.pro: normal.c
324ops.o: ops.c
325proto/ops.pro: ops.c
326option.o: option.c
327proto/option.pro: option.c
328os_amiga.o: os_amiga.c
329proto/os_amiga.pro: os_amiga.c
330quickfix.o: quickfix.c
331proto/quickfix.pro: quickfix.c
332regexp.o: regexp.c
333proto/regexp.pro: regexp.c
334screen.o: screen.c
335proto/screen.pro: screen.c
336search.o: search.c
337proto/search.pro: search.c
338syntax.o: syntax.c
339proto/syntax.pro: syntax.c
340tag.o: tag.c
341proto/tag.pro: tag.c
342term.o: term.c
343proto/term.pro: term.c
344termlib.o: termlib.c
345proto/termlib.pro: termlib.c
346ui.o: ui.c
347proto/ui.pro: ui.c
348undo.o: undo.c
349proto/undo.pro: undo.c
350window.o: window.c