File: Make_sas.mak

package info (click to toggle)
vim 1:7.1.314-3+lenny2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 39,856 kB
  • ctags: 25,430
  • sloc: ansic: 279,681; cpp: 3,229; makefile: 2,958; perl: 1,232; sh: 857; awk: 715; xml: 507; cs: 458; asm: 114; python: 28; csh: 6
file content (365 lines) | stat: -rw-r--r-- 8,408 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# vim: set ft=make :
# Makefile for VIM on the Amiga, using SAS/Lattice C 6.0 to 6.58
#
# Do NOT use the peephole optimizer with a version before 6.56!
# It messes up all kinds of things:
# For 6.0 and 6.1, expand_env() will not work correctly.
# For 6.2 and 6.3 the call to free_line in u_freeentry is wrong.
# The "read.me" file for version 6.56 includes a remark about a fix for the
# peephole optimizer.  Everything before 6.56 will probably fail.
#
# You should use Manx Aztec C whenever possible, because it has been tested.
#
# The prototypes from Manx and SAS are incompatible. If the prototypes
# were generated by Manx, first do "touch *.c; make proto" before "make".
# The prototypes generated on Unix work for both.
#
# Note: Not all dependencies are included. This was done to avoid having
#       to compile everything when a global variable or function is added.

#>>>>> choose options:

### See feature.h for a list of optionals.
### Any other defines can be included here.

# NO_ARP	Don't include ARP functions
# SASC=658	Sas/C version number
# NEWSASC	fixes a bug in the syntax highlighting?
DEFINES = DEF=NO_ARP DEF=NEWSASC DEF="SASC=658"

#>>>>> if HAVE_TGETENT is defined termlib.o has to be used
#TERMLIB = termlib.o
TERMLIB =

#>>>>> choose NODEBUG for normal compiling, the other for debugging and
# profiling
# don't switch on debugging when generating proto files, it crashes the
# compiler.
DBG = NODEBUG
#DBG = DBG=SF

#>>>>> choose NOOPTPEEP for 6.0 to 6.3, NOOPT for debugging
# with version 6.56 and later you can probably use OPT
OPTIMIZE  = OPT
#OPTIMIZE = NOOPTPEEP
#OPTIMIZE = NOOPT

# for 6.58 you can use the line below, but be warned it takes a loooonnnggg time
#OPTIMIZE=OPT  OPTIMIZERSCHEDULER OPTIMIZERTIME NoOPTIMIZERALIAS \
	OptimizerComplexity=10 OptimizerDepth=10 OptimizerRecurDepth=10 \
	OptimizerInLocal OPTPEEP

#generate code for your processor - 68060 will work for 040's as well.
CPU=68000
#CPU=68020
#CPU=68030
#CPU=68040
#CPU=68060

#Error reporting - rexx or console
ERROR = ERRORCONSOLE ERRORSOURCE ERRORHIGHLIGHT
#ERROR = ERRORREXX ERRORCONSOLE ERRORSOURCE ERRORHIGHLIGHT

#memory types, if you have fast use it :->,
#	ANY = will work on all machines
#	FAST = this is the best option, for speed
#MEMORYTYPE=FAST
MEMORYTYPE=ANY

#MEMSIZE - this is for compile time only for speed of compilation
#MEMSIZE=HUGE
MEMSIZE=LARGE
#MEMSIZE=SMALL

#>>>>> end of choices
###########################################################################

CC	= sc
GST	= vim.gst
COPTS	= SINT SCODE SDATA
SHELL	= csh
DEL	= $(SHELL) -c rm -f

# ignore error messages for uninitialized variables, they are mostly not correct
CFLAGS  = NOLINK $(DBG) CPU=$(CPU) NOSTACKCHECK DEF=AMIGA CODE=FAR idir=proto ignore=317
CFLAGS2 = $(OPTIMIZE) $(ERROR) GSTIMMEDIATE GST=$(GST)
CFLAGS3 = $(COPTS) STRINGMERGE MEMSIZE=$(MEMSIZE)
CFLAGS4 = $(DEFINES) DATAMEMORY=$(MEMORYTYPE)

PROPT = DEF=PROTO GPROTO GPPARM MAXIMUMERRORS=999 GENPROTOSTATICS GENPROTOPARAMETERS

SRC = \
	buffer.c \
	charset.c \
	diff.c \
	digraph.c \
	edit.c \
	eval.c \
	ex_cmds.c \
	ex_cmds2.c \
	ex_docmd.c \
	ex_eval.c \
	ex_getln.c \
	fileio.c \
	fold.c \
	getchar.c \
	hardcopy.c \
	hashtab.c \
	main.c \
	mark.c \
	memfile.c \
	memline.c \
	menu.c \
	message.c \
	misc1.c \
	misc2.c \
	move.c \
	mbyte.c \
	normal.c \
	ops.c \
	option.c \
	os_amiga.c \
	popupmnu.c \
	quickfix.c \
	regexp.c \
	screen.c \
	search.c \
	spell.c \
	syntax.c \
	tag.c \
	term.c \
	ui.c \
	undo.c \
	window.c \
	version.c

OBJ = \
	buffer.o \
	charset.o \
	diff.o \
	digraph.o \
	edit.o \
	eval.o \
	ex_cmds.o \
	ex_cmds2.o \
	ex_docmd.o \
	ex_eval.o \
	ex_getln.o \
	fileio.o \
	fold.o \
	getchar.o \
	hardcopy.o \
	hashtab.o \
	main.o \
	mark.o \
	memfile.o \
	memline.o \
	menu.o \
	message.o \
	misc1.o \
	misc2.o \
	move.o \
	mbyte.o \
	normal.o \
	ops.o \
	option.o \
	os_amiga.o \
	popupmnu.o \
	quickfix.o \
	regexp.o \
	screen.o \
	search.o \
	spell.o \
	syntax.o \
	tag.o \
	term.o \
	ui.o \
	undo.o \
	window.o \
	$(TERMLIB)

PRO = \
	proto/buffer.pro \
	proto/charset.pro \
	proto/diff.pro \
	proto/digraph.pro \
	proto/edit.pro \
	proto/eval.pro \
	proto/ex_cmds.pro \
	proto/ex_cmds2.pro \
	proto/ex_docmd.pro \
	proto/ex_eval.pro \
	proto/ex_getln.pro \
	proto/fileio.pro \
	proto/fold.pro \
	proto/getchar.pro \
	proto/hardcopy.pro \
	proto/hashtab.pro \
	proto/main.pro \
	proto/mark.pro \
	proto/memfile.pro \
	proto/memline.pro \
	proto/menu.pro \
	proto/message.pro \
	proto/misc1.pro \
	proto/misc2.pro \
	proto/move.pro \
	proto/mbyte.pro \
	proto/normal.pro \
	proto/ops.pro \
	proto/option.pro \
	proto/os_amiga.pro \
	proto/popupmnu.pro \
	proto/quickfix.pro \
	proto/regexp.pro \
	proto/screen.pro \
	proto/search.pro \
	proto/spell.pro \
	proto/syntax.pro \
	proto/tag.pro \
	proto/term.pro \
	proto/termlib.pro \
	proto/ui.pro \
	proto/undo.pro \
	proto/window.pro

all: proto Vim

Vim: scoptions $(OBJ) version.c version.h
	$(CC) $(CFLAGS) version.c
	$(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim

debug: scoptions $(OBJ) version.c version.h
	$(CC) $(CFLAGS) version.c
	$(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim

proto: $(GST) $(PRO)

tags:
	spat ctags $(SRC) *.h
#	csh -c ctags $(SRC) *.h

# can't use delete here, too many file names
clean:
	$(DEL) *.o Vim $(GST)

# generate GlobalSymbolTable, which speeds up the compile time.
#
# A preprocessing stage is used to work arounda bug in the GST generator, in
# that it does not handle nested makefiles properly in this stage.
# Ignore error message for not producing any code (105).
$(GST): scoptions vim.h keymap.h macros.h ascii.h term.h structs.h
	$(CC) $(CFLAGS) PREPROCESSORONLY vim.h objectname pre.h
	$(CC) MGST=$(GST) pre.h ignore=105
	$(DEL) pre.h

# generate an options file, because SAS/C smake can't handle the amiga command
# line can handle the lengths that this makefile will impose on the shell.
# (Manx's make can do this).
scoptions: Make_sas.mak
	@echo "Generating - $@ ..."
	@echo $(CFLAGS) > scoptions
	@echo $(CFLAGS1) >> scoptions
	@echo $(CFLAGS2) >> scoptions
	@echo $(CFLAGS3) >> scoptions
	@echo $(CFLAGS4) >> scoptions
	@echo $(COPTS) >>scoptions
	@echo done

###########################################################################

$(OBJ): $(GST) vim.h
$(PRO): $(GST) vim.h

.c.o:
	$(CC) $(CFLAGS) $*.c

.c.pro:
	$(CC) $(CFLAGS) GPFILE=proto/$*.pro $(PROPT) $*.c

# dependancies
buffer.o:		buffer.c
proto/buffer.pro:	buffer.c
charset.o:		charset.c
proto/charset.pro:	charset.c
diff.o:			diff.c
proto/diff.pro:		diff.c
digraph.o:		digraph.c
proto/digraph.pro:	digraph.c
edit.o:			edit.c
proto/edit.pro:		edit.c
eval.o:			eval.c
proto/eval.pro:		eval.c
ex_cmds.o:		ex_cmds.c
proto/ex_cmds.pro:	ex_cmds.c
ex_cmds2.o:		ex_cmds2.c
proto/ex_cmds2.pro:	ex_cmds2.c
ex_docmd.o:		ex_docmd.c ex_cmds.h
proto/ex_docmd.pro:	ex_docmd.c ex_cmds.h
ex_eval.o:		ex_eval.c ex_cmds.h
proto/ex_eval.pro:	ex_eval.c ex_cmds.h
ex_getln.o:		ex_getln.c
proto/ex_getln.pro:	ex_getln.c
fileio.o:		fileio.c
proto/fileio.pro:	fileio.c
fold.o:			fold.c
proto/fold.pro:		fold.c
getchar.o:		getchar.c
proto/getchar.pro:	getchar.c
hardcopy.o:		hardcopy.c
proto/hardcopy.pro:	hardcopy.c
hashtab.o:		hashtab.c
proto/hashtab.pro:	hashtab.c
main.o:			main.c
proto/main.pro:		main.c
mark.o:			mark.c
proto/mark.pro:		mark.c
memfile.o:		memfile.c
proto/memfile.pro:	memfile.c
memline.o:		memline.c
proto/memline.pro:	memline.c
menu.o:			menu.c
proto/menu.pro:		menu.c
message.o:		message.c
proto/message.pro:	message.c
misc1.o:		misc1.c
proto/misc1.pro:	misc1.c
misc2.o:		misc2.c
proto/misc2.pro:	misc2.c
move.o:			move.c
proto/move.pro:		move.c
mbyte.o:		mbyte.c
proto/mbyte.pro:	mbyte.c
normal.o:		normal.c
proto/normal.pro:	normal.c
ops.o:			ops.c
proto/ops.pro:		ops.c
option.o:		option.c
proto/option.pro:	option.c
os_amiga.o:		os_amiga.c
proto/os_amiga.pro:	os_amiga.c
popupmnu.o:		popupmnu.c
proto/popupmnu.pro:	popupmnu.c
quickfix.o:		quickfix.c
proto/quickfix.pro:	quickfix.c
regexp.o:		regexp.c
proto/regexp.pro:	regexp.c
screen.o:		screen.c
proto/screen.pro:	screen.c
search.o:		search.c
proto/search.pro:	search.c
spell.o:		spell.c
proto/spell.pro:	spell.c
syntax.o:		syntax.c
proto/syntax.pro:	syntax.c
tag.o:			tag.c
proto/tag.pro:		tag.c
term.o:			term.c
proto/term.pro:		term.c
termlib.o:		termlib.c
proto/termlib.pro:	termlib.c
ui.o:			ui.c
proto/ui.pro:		ui.c
undo.o:			undo.c
proto/undo.pro:		undo.c
window.o:		window.c