7
|
1 # 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?
|
|
28 DEFINES = 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
|
|
32 TERMLIB =
|
|
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.
|
|
38 DBG = 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
|
|
43 OPTIMIZE = 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.
|
|
53 CPU=68000
|
|
54 #CPU=68020
|
|
55 #CPU=68030
|
|
56 #CPU=68040
|
|
57 #CPU=68060
|
|
58
|
|
59 #Error reporting - rexx or console
|
|
60 ERROR = 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
|
|
67 MEMORYTYPE=ANY
|
|
68
|
|
69 #MEMSIZE - this is for compile time only for speed of compilation
|
|
70 #MEMSIZE=HUGE
|
|
71 MEMSIZE=LARGE
|
|
72 #MEMSIZE=SMALL
|
|
73
|
|
74 #>>>>> end of choices
|
|
75 ###########################################################################
|
|
76
|
|
77 CC = sc
|
|
78 GST = vim.gst
|
|
79 COPTS = SINT SCODE SDATA
|
|
80 SHELL = csh
|
|
81 DEL = $(SHELL) -c rm -f
|
|
82
|
|
83 # ignore error messages for uninitialized variables, they are mostly not correct
|
|
84 CFLAGS = NOLINK $(DBG) CPU=$(CPU) NOSTACKCHECK DEF=AMIGA CODE=FAR idir=proto ignore=317
|
|
85 CFLAGS2 = $(OPTIMIZE) $(ERROR) GSTIMMEDIATE GST=$(GST)
|
|
86 CFLAGS3 = $(COPTS) STRINGMERGE MEMSIZE=$(MEMSIZE)
|
|
87 CFLAGS4 = $(DEFINES) DATAMEMORY=$(MEMORYTYPE)
|
|
88
|
|
89 PROPT = DEF=PROTO GPROTO GPPARM MAXIMUMERRORS=999 GENPROTOSTATICS GENPROTOPARAMETERS
|
|
90
|
|
91 SRC = \
|
|
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 \
|
119
|
106 hashtable.c \
|
7
|
107 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 \
|
221
|
125 spell.c \
|
7
|
126 syntax.c \
|
|
127 tag.c \
|
|
128 term.c \
|
|
129 ui.c \
|
|
130 undo.c \
|
|
131 window.c \
|
|
132 version.c
|
|
133
|
|
134 OBJ = \
|
|
135 buffer.o \
|
|
136 charset.o \
|
|
137 diff.o \
|
|
138 digraph.o \
|
|
139 edit.o \
|
|
140 eval.o \
|
|
141 ex_cmds.o \
|
|
142 ex_cmds2.o \
|
|
143 ex_docmd.o \
|
|
144 ex_eval.o \
|
|
145 ex_getln.o \
|
|
146 fileio.o \
|
|
147 fold.o \
|
|
148 getchar.o \
|
119
|
149 hashtable.o \
|
7
|
150 main.o \
|
|
151 mark.o \
|
|
152 memfile.o \
|
|
153 memline.o \
|
|
154 menu.o \
|
|
155 message.o \
|
|
156 misc1.o \
|
|
157 misc2.o \
|
|
158 move.o \
|
|
159 mbyte.o \
|
|
160 normal.o \
|
|
161 ops.o \
|
|
162 option.o \
|
|
163 os_amiga.o \
|
|
164 quickfix.o \
|
|
165 regexp.o \
|
|
166 screen.o \
|
|
167 search.o \
|
221
|
168 spell.o \
|
7
|
169 syntax.o \
|
|
170 tag.o \
|
|
171 term.o \
|
|
172 ui.o \
|
|
173 undo.o \
|
|
174 window.o \
|
|
175 $(TERMLIB)
|
|
176
|
|
177 PRO = \
|
|
178 proto/buffer.pro \
|
|
179 proto/charset.pro \
|
|
180 proto/diff.pro \
|
|
181 proto/digraph.pro \
|
|
182 proto/edit.pro \
|
|
183 proto/eval.pro \
|
|
184 proto/ex_cmds.pro \
|
|
185 proto/ex_cmds2.pro \
|
|
186 proto/ex_docmd.pro \
|
|
187 proto/ex_eval.pro \
|
|
188 proto/ex_getln.pro \
|
|
189 proto/fileio.pro \
|
|
190 proto/fold.pro \
|
|
191 proto/getchar.pro \
|
119
|
192 proto/hashtable.pro \
|
7
|
193 proto/main.pro \
|
|
194 proto/mark.pro \
|
|
195 proto/memfile.pro \
|
|
196 proto/memline.pro \
|
|
197 proto/menu.pro \
|
|
198 proto/message.pro \
|
|
199 proto/misc1.pro \
|
|
200 proto/misc2.pro \
|
|
201 proto/move.pro \
|
|
202 proto/mbyte.pro \
|
|
203 proto/normal.pro \
|
|
204 proto/ops.pro \
|
|
205 proto/option.pro \
|
|
206 proto/os_amiga.pro \
|
|
207 proto/quickfix.pro \
|
|
208 proto/regexp.pro \
|
|
209 proto/screen.pro \
|
|
210 proto/search.pro \
|
221
|
211 proto/spell.pro \
|
7
|
212 proto/syntax.pro \
|
|
213 proto/tag.pro \
|
|
214 proto/term.pro \
|
|
215 proto/termlib.pro \
|
|
216 proto/ui.pro \
|
|
217 proto/undo.pro \
|
|
218 proto/window.pro
|
|
219
|
|
220 all: proto Vim
|
|
221
|
|
222 Vim: scoptions $(OBJ) version.c version.h
|
|
223 $(CC) $(CFLAGS) version.c
|
|
224 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
|
|
225
|
|
226 debug: scoptions $(OBJ) version.c version.h
|
|
227 $(CC) $(CFLAGS) version.c
|
|
228 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
|
|
229
|
|
230 proto: $(GST) $(PRO)
|
|
231
|
|
232 tags:
|
|
233 spat ctags $(SRC) *.h
|
|
234 # csh -c ctags $(SRC) *.h
|
|
235
|
|
236 # can't use delete here, too many file names
|
|
237 clean:
|
|
238 $(DEL) *.o Vim $(GST)
|
|
239
|
|
240 # generate GlobalSymbolTable, which speeds up the compile time.
|
|
241 #
|
|
242 # A preprocessing stage is used to work arounda bug in the GST generator, in
|
|
243 # that it does not handle nested makefiles properly in this stage.
|
|
244 # Ignore error message for not producing any code (105).
|
|
245 $(GST): scoptions vim.h keymap.h macros.h ascii.h term.h structs.h
|
|
246 $(CC) $(CFLAGS) PREPROCESSORONLY vim.h objectname pre.h
|
|
247 $(CC) MGST=$(GST) pre.h ignore=105
|
|
248 $(DEL) pre.h
|
|
249
|
|
250 # generate an options file, because SAS/C smake can't handle the amiga command
|
|
251 # line can handle the lengths that this makefile will impose on the shell.
|
|
252 # (Manx's make can do this).
|
|
253 scoptions: Make_sas.mak
|
|
254 @echo "Generating - $@ ..."
|
|
255 @echo $(CFLAGS) > scoptions
|
|
256 @echo $(CFLAGS1) >> scoptions
|
|
257 @echo $(CFLAGS2) >> scoptions
|
|
258 @echo $(CFLAGS3) >> scoptions
|
|
259 @echo $(CFLAGS4) >> scoptions
|
|
260 @echo $(COPTS) >>scoptions
|
|
261 @echo done
|
|
262
|
|
263 ###########################################################################
|
|
264
|
|
265 $(OBJ): $(GST) vim.h
|
|
266 $(PRO): $(GST) vim.h
|
|
267
|
|
268 .c.o:
|
|
269 $(CC) $(CFLAGS) $*.c
|
|
270
|
|
271 .c.pro:
|
|
272 $(CC) $(CFLAGS) GPFILE=proto/$*.pro $(PROPT) $*.c
|
|
273
|
|
274 # dependancies
|
|
275 buffer.o: buffer.c
|
|
276 proto/buffer.pro: buffer.c
|
|
277 charset.o: charset.c
|
|
278 proto/charset.pro: charset.c
|
|
279 diff.o: diff.c
|
|
280 proto/diff.pro: diff.c
|
|
281 digraph.o: digraph.c
|
|
282 proto/digraph.pro: digraph.c
|
|
283 edit.o: edit.c
|
|
284 proto/edit.pro: edit.c
|
|
285 eval.o: eval.c
|
|
286 proto/eval.pro: eval.c
|
|
287 ex_cmds.o: ex_cmds.c
|
|
288 proto/ex_cmds.pro: ex_cmds.c
|
|
289 ex_cmds2.o: ex_cmds2.c
|
|
290 proto/ex_cmds2.pro: ex_cmds2.c
|
|
291 ex_docmd.o: ex_docmd.c ex_cmds.h
|
|
292 proto/ex_docmd.pro: ex_docmd.c ex_cmds.h
|
|
293 ex_eval.o: ex_eval.c ex_cmds.h
|
|
294 proto/ex_eval.pro: ex_eval.c ex_cmds.h
|
|
295 ex_getln.o: ex_getln.c
|
|
296 proto/ex_getln.pro: ex_getln.c
|
|
297 fileio.o: fileio.c
|
|
298 proto/fileio.pro: fileio.c
|
|
299 fold.o: fold.c
|
|
300 proto/fold.pro: fold.c
|
|
301 getchar.o: getchar.c
|
|
302 proto/getchar.pro: getchar.c
|
119
|
303 hashtable.o: hashtable.c
|
|
304 proto/hashtable.pro: hashtable.c
|
7
|
305 main.o: main.c
|
|
306 proto/main.pro: main.c
|
|
307 mark.o: mark.c
|
|
308 proto/mark.pro: mark.c
|
|
309 memfile.o: memfile.c
|
|
310 proto/memfile.pro: memfile.c
|
|
311 memline.o: memline.c
|
|
312 proto/memline.pro: memline.c
|
|
313 menu.o: menu.c
|
|
314 proto/menu.pro: menu.c
|
|
315 message.o: message.c
|
|
316 proto/message.pro: message.c
|
|
317 misc1.o: misc1.c
|
|
318 proto/misc1.pro: misc1.c
|
|
319 misc2.o: misc2.c
|
|
320 proto/misc2.pro: misc2.c
|
|
321 move.o: move.c
|
|
322 proto/move.pro: move.c
|
|
323 mbyte.o: mbyte.c
|
|
324 proto/mbyte.pro: mbyte.c
|
|
325 normal.o: normal.c
|
|
326 proto/normal.pro: normal.c
|
|
327 ops.o: ops.c
|
|
328 proto/ops.pro: ops.c
|
|
329 option.o: option.c
|
|
330 proto/option.pro: option.c
|
|
331 os_amiga.o: os_amiga.c
|
|
332 proto/os_amiga.pro: os_amiga.c
|
|
333 quickfix.o: quickfix.c
|
|
334 proto/quickfix.pro: quickfix.c
|
|
335 regexp.o: regexp.c
|
|
336 proto/regexp.pro: regexp.c
|
|
337 screen.o: screen.c
|
|
338 proto/screen.pro: screen.c
|
|
339 search.o: search.c
|
|
340 proto/search.pro: search.c
|
221
|
341 spell.o: spell.c
|
|
342 proto/spell.pro: spell.c
|
7
|
343 syntax.o: syntax.c
|
|
344 proto/syntax.pro: syntax.c
|
|
345 tag.o: tag.c
|
|
346 proto/tag.pro: tag.c
|
|
347 term.o: term.c
|
|
348 proto/term.pro: term.c
|
|
349 termlib.o: termlib.c
|
|
350 proto/termlib.pro: termlib.c
|
|
351 ui.o: ui.c
|
|
352 proto/ui.pro: ui.c
|
|
353 undo.o: undo.c
|
|
354 proto/undo.pro: undo.c
|
|
355 window.o: window.c
|