blob: 3e563f9a538bda3ee3aea756e9d7668018bdc008 [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 \
Bram Moolenaar217ad922005-03-20 22:37:15 +0000125 spell.c \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000126 syntax.c \
127 tag.c \
128 term.c \
129 ui.c \
130 undo.c \
131 window.c \
132 version.c
133
134OBJ = \
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 \
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000149 hashtable.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000150 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 \
Bram Moolenaar217ad922005-03-20 22:37:15 +0000168 spell.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000169 syntax.o \
170 tag.o \
171 term.o \
172 ui.o \
173 undo.o \
174 window.o \
175 $(TERMLIB)
176
177PRO = \
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 \
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000192 proto/hashtable.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000193 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 \
Bram Moolenaar217ad922005-03-20 22:37:15 +0000211 proto/spell.pro \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000212 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
220all: proto Vim
221
222Vim: scoptions $(OBJ) version.c version.h
223 $(CC) $(CFLAGS) version.c
224 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
225
226debug: scoptions $(OBJ) version.c version.h
227 $(CC) $(CFLAGS) version.c
228 $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
229
230proto: $(GST) $(PRO)
231
232tags:
233 spat ctags $(SRC) *.h
234# csh -c ctags $(SRC) *.h
235
236# can't use delete here, too many file names
237clean:
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).
253scoptions: 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
275buffer.o: buffer.c
276proto/buffer.pro: buffer.c
277charset.o: charset.c
278proto/charset.pro: charset.c
279diff.o: diff.c
280proto/diff.pro: diff.c
281digraph.o: digraph.c
282proto/digraph.pro: digraph.c
283edit.o: edit.c
284proto/edit.pro: edit.c
285eval.o: eval.c
286proto/eval.pro: eval.c
287ex_cmds.o: ex_cmds.c
288proto/ex_cmds.pro: ex_cmds.c
289ex_cmds2.o: ex_cmds2.c
290proto/ex_cmds2.pro: ex_cmds2.c
291ex_docmd.o: ex_docmd.c ex_cmds.h
292proto/ex_docmd.pro: ex_docmd.c ex_cmds.h
293ex_eval.o: ex_eval.c ex_cmds.h
294proto/ex_eval.pro: ex_eval.c ex_cmds.h
295ex_getln.o: ex_getln.c
296proto/ex_getln.pro: ex_getln.c
297fileio.o: fileio.c
298proto/fileio.pro: fileio.c
299fold.o: fold.c
300proto/fold.pro: fold.c
301getchar.o: getchar.c
302proto/getchar.pro: getchar.c
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000303hashtable.o: hashtable.c
304proto/hashtable.pro: hashtable.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000305main.o: main.c
306proto/main.pro: main.c
307mark.o: mark.c
308proto/mark.pro: mark.c
309memfile.o: memfile.c
310proto/memfile.pro: memfile.c
311memline.o: memline.c
312proto/memline.pro: memline.c
313menu.o: menu.c
314proto/menu.pro: menu.c
315message.o: message.c
316proto/message.pro: message.c
317misc1.o: misc1.c
318proto/misc1.pro: misc1.c
319misc2.o: misc2.c
320proto/misc2.pro: misc2.c
321move.o: move.c
322proto/move.pro: move.c
323mbyte.o: mbyte.c
324proto/mbyte.pro: mbyte.c
325normal.o: normal.c
326proto/normal.pro: normal.c
327ops.o: ops.c
328proto/ops.pro: ops.c
329option.o: option.c
330proto/option.pro: option.c
331os_amiga.o: os_amiga.c
332proto/os_amiga.pro: os_amiga.c
333quickfix.o: quickfix.c
334proto/quickfix.pro: quickfix.c
335regexp.o: regexp.c
336proto/regexp.pro: regexp.c
337screen.o: screen.c
338proto/screen.pro: screen.c
339search.o: search.c
340proto/search.pro: search.c
Bram Moolenaar217ad922005-03-20 22:37:15 +0000341spell.o: spell.c
342proto/spell.pro: spell.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000343syntax.o: syntax.c
344proto/syntax.pro: syntax.c
345tag.o: tag.c
346proto/tag.pro: tag.c
347term.o: term.c
348proto/term.pro: term.c
349termlib.o: termlib.c
350proto/termlib.pro: termlib.c
351ui.o: ui.c
352proto/ui.pro: ui.c
353undo.o: undo.c
354proto/undo.pro: undo.c
355window.o: window.c