summaryrefslogtreecommitdiff
path: root/src/Make_agui.mak
blob: 7b30a197603868e45228f0fcece5df3c3efcf515 (plain)
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
#
# Makefile for VIM on the Amiga, using SAS/Lattice C 6.0 to 6.56
#
# Do NOT use the peephole optimizer with a version before 6.55!
# 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.
# Don't know about 6.50, might work...
# Version 6.56 seems to be working fine.
# You should use Manx Aztec C whenever possible.
#
# 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:

#ANSI CODES
ANSIOFF = *e[0m
BBOLD = *e[1m
WBOLD = *e[2m
ITALIC = *e[3m
UNDERLI = *e[4m
ANSIOFF = *e[0m
FCOL1 = *e[31m
FCOL2 = *e[32m
FCOL3 = *e[33m
FCOL4 = *e[34m
BCOL1 = *e[41m
BCOL2 = *e[42m
BCOL3 = *e[43m
BCOL4 = *e[44m


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

DEFINES = DEF=NO_ARP DEF=AMIGA DEF=NEWSASC DEF=FEAT_GUI_AMIGA \
	    DEF="SASC=658" #" this fixes a bug in the syntax highlighting

#>>>>> 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=FULLFLUSH
#DBG = DBG=LINE

#>>>>> choose NOOPTPEEP for 6.0 to 6.3, NOOPT for debugging
#OPTIMIZE=NOOPTPEEP OPT

# 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
OPTIMIZE=OPT  OPTIMIZERTIME NoOPTIMIZERALIAS \
	OptimizerComplexity=10 OptimizerDepth=10 OptimizerRecurDepth=10 \
	OptimizerInLocal OPTPEEP
#OPTIMIZE = NOOPT

# no optimization, (works on all platforms)
#OPTIMIZE=NOOPT

#generate code for your processor - note however, that the 060 selection will work for 040's
# as well.
#CPU=68000
#CPU=68020
#CPU=68030
#CPU=68040
CPU=68060


#Error reporting - I use rexx for reporting, but console reporting may be more
#useful for some people.
#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
#	CHIP = not necessary for this application.
#MEMORYTYPE=FAST
MEMORYTYPE=ANY

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

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

CC = sc

GST=vim.gst
DEP = $(GST)


CFLAGS = NOLINK $(DBG)  CPU=$(CPU) NOSTACKCHECK
CFLAGS2 = $(OPTIMIZE) $(ERROR) GSTIMMEDIATE GST=$(GST)
CFLAGS3 =NOSINT SCODE SDATA 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 \
	main.c \
	mark.c \
	memfile.c \
	memline.c \
	menu.c \
	message.c \
	misc1.c \
	misc2.c \
	move.c \
	normal.c \
	ops.c \
	option.c \
	os_amiga.c \
	quickfix.c \
	regexp.c \
	screen.c \
	search.c \
	syntax.c \
	tag.c \
	term.c \
	ui.c \
	undo.c \
	window.c \
	version.c \
	gui_amiga.c \
	gui.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 main.o mark.o memfile.o memline.o menu.o message.o misc1.o misc2.o move.o \
	normal.o ops.o option.o os_amiga.o quickfix.o regexp.o screen.o search.o syntax.o \
	tag.o term.o ui.o undo.o window.o gui_amiga.o gui.o  $(TERMLIB)

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

all:
	@echo "$(BCOL2)building prototypes, this may take some time$(ANSIOFF)"
	@smake proto
	@echo "$(BCOL2)building vim production version$(ANSIOFF)"
	@smake vim

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

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

proto: $(PRO)

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

# can't use delete here, too many file names
clean:
	@echo removing all object files
	-delete $(OBJ) >nil:

clobber: clean
	@echo removing all prototype files
	-delete $(PRO) SCOPTIONS vim $(GST) > NIL:


# generate an options file, as there is no way the amiga command line can handle the
# lengths that this makefile will impose on the shell.
scoptions: smakefile
	@echo "$(BCOL2)Generating $(ANSIOFF)$(FCOL4)- $@$(ANSIOFF)"
	@echo $(CFLAGS) > scoptions
	@echo $(CFLAGS1) >> scoptions
	@echo $(CFLAGS2) >> scoptions
	@echo $(CFLAGS3) >> scoptions
	@echo $(CFLAGS4) >> scoptions
	@echo $(COPTS) >>scoptions
	@echo scoptions has been built


#generate GlobalSymbolTable, which both speeds up the compile time, but also
#solves some problems with prototypes, and types  that are defined in a unixy
#manner.
#
#I use a preprocessing stage here to work arounda bug in the GST generator, in
#that it does not handle nested makefiles properly in this stage.
$(GST): scoptions vim.h keymap.h macros.h ascii.h term.h structs.h gui.h gui_amiga.h
	@echo "$(BCOL2)Generating Global Symbol Table $(ANSIOFF)$(FCOL4) $(GST) $(ANSIOFF)"
	$(CC) PREPROCESSORONLY gui_amiga.h  objectname pre.h
	$(CC)  MGST=$(GST) pre.h ignore=105,316
	del pre.h


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

.c.o:
	@echo "$(BCOL2)Generating object for $(ANSIOFF)$(FCOL4) $*.c -> $@$(ANSIOFF)"
	$(CC) $*.c

.c.pro:
	@echo "$(BCOL2)Generating prototypes for $(ANSIOFF)$(FCOL4) $*.c -> $@$(ANSIOFF)"
	@$(CC) NOERRORREXX GPFILE=$*.pro $(PROPT) $*.c ignore=306,316,317,304

$(PRO): $(GST)
$(OBJ): $(GST)

# dependancies
buffer.o:	buffer.c $(DEP)
buffer.pro:	buffer.c $(DEP)
charset.o:	charset.c  $(DEP)
charset.pro:	charset.c $(DEP)
diff.o:		diff.c  $(DEP)
diff.pro:	diff.c $(DEP)
digraph.o:	digraph.c  $(DEP)
digraph.pro:	digraph.c $(DEP)
edit.o:		edit.c  $(DEP)
edit.pro:	edit.c   $(DEP)
eval.o:		eval.c  $(DEP)
eval.pro:	eval.c  $(DEP)
ex_cmds.o:	ex_cmds.c $(DEP)
ex_cmds.pro:	ex_cmds.c  $(DEP)
ex_cmds2.o:	ex_cmds2.c $(DEP)
ex_cmds2.pro:	ex_cmds2.c $(DEP)
ex_docmd.o:	ex_docmd.c ex_cmds.h  $(DEP)
ex_docmd.pro:	ex_docmd.c ex_cmds.h $(DEP)
ex_eval.o:	ex_eval.c ex_cmds.h  $(DEP)
ex_eval.pro:	ex_eval.c ex_cmds.h $(DEP)
ex_getln.o:	ex_getln.c  $(DEP)
ex_getln.pro:	ex_getln.c  $(DEP)
fileio.o:	fileio.c  $(DEP)
fileio.pro:	fileio.c   $(DEP)
fold.o:		fold.c  $(DEP)
fold.pro:	fold.c   $(DEP)
getchar.o:	getchar.c  $(DEP)
getchar.pro:	getchar.c $(DEP)
main.o:		main.c globals.h $(DEP)
main.pro:	main.c globals.h $(DEP)
mark.o:		mark.c  $(DEP)
mark.pro:	mark.c $(DEP)
memfile.o:	memfile.c  $(DEP)
memfile.pro:	memfile.c $(DEP)
memline.o:	memline.c  $(DEP)
memline.pro:	memline.c $(DEP)
menu.o:		menu.c  $(DEP)
menu.pro:	menu.c $(DEP)
message.o:	message.c  $(DEP)
message.pro:	message.c $(DEP)
misc1.o:	misc1.c  $(DEP)
misc1.pro:	misc1.c  $(DEP)
misc2.o:	misc2.c  $(DEP)
misc2.pro:	misc2.c $(DEP)
move.o:		move.c  $(DEP)
move.pro:	move.c $(DEP)
normal.o:	normal.c  $(DEP)
normal.pro:	normal.c $(DEP)
ops.o:		ops.c  $(DEP)
ops.pro:	ops.c  $(DEP)
option.o:	option.c  $(DEP)
option.pro:	option.c   $(DEP)
os_amiga.o:	os_amiga.c  $(DEP)
os_amiga.pro:	os_amiga.c  $(DEP)
quickfix.o:	quickfix.c  $(DEP)
quickfix.pro:	quickfix.c  $(DEP)
regexp.o:	regexp.c  $(DEP)
regexp.pro:	regexp.c  $(DEP)
screen.o:	screen.c  $(DEP)
screen.pro:	screen.c  $(DEP)
search.o:	search.c  $(DEP)
search.pro:	search.c  $(DEP)
syntax.o:	syntax.c   $(DEP)
syntax.pro:	syntax.c  $(DEP)
tag.o:		tag.c   $(DEP)
tag.pro:	tag.c   $(DEP)
term.o:		term.c   $(DEP)
term.pro:	term.c  $(DEP)
termlib.o:	termlib.c   $(DEP)
termlib.pro:	termlib.c  $(DEP)
ui.o:		ui.c   $(DEP)
ui.pro:		ui.c  $(DEP)
undo.o:		undo.c   $(DEP)
undo.pro:	undo.c  $(DEP)
window.o:	window.c   $(DEP)
window.pro:	window.c  $(DEP)
gui_amiga.o:	gui_amiga.c $(DEP) amiga.h
#gui_amiga.pro:	gui_amiga.c $(DEP) amiga.h
amiga.o:	amiga.c $(DEP) amiga.h
amiga.pro:	amiga.c $(DEP) amiga.h
gui.o:		gui.c   $(DEP)
gui.pro:	gui.c  $(DEP)