summaryrefslogtreecommitdiff
path: root/gnu/egcs/gcc/makefile.vms
blob: 7f0b7ae309ff8831b46e3f281e76ae1d5b77fec7 (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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
#
# makefile for egcs
#
# Created by Klaus K"ampf, kkaempf@progis.de
#

# choose egcs or dec c
#CC = gcc
CC = cc

# With or withou haifa scheduler ?
#HAIFA=,"HAIFA"
HAIFA=

PWD=sys$$disk:[]
RM=delete/nolog

ifeq ($(CC),gcc)
ifeq ($(ARCH),ALPHA)
CFLAGS=/define=("HAVE_CONFIG_H=1","USE_COLLECT2" $(HAIFA))
LIBS=,gnu_cc_library:libgcc.olb/lib,sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj
else
CFLAGS=/define=("HAVE_CONFIG_H=1","USE_COLLECT2" $(HAIFA))
LIBS=,gnu_cc_library:libgcc.olb/lib,sys$$library:vaxcrtl.olb/lib
endif
LFLAGS=/map/full
#LFLAGS=
else
ifeq ($(ARCH),ALPHA)
CFLAGS=/names=as_is/float=ieee/noopt/debug/define=("HAVE_CONFIG_H=1","USE_COLLECT2" $(HAIFA))\
/warning=disable=(missingreturn,implicitfunc,ptrmismatch,undefescap,longextern,duptypespec)
else
CFLAGS=/noopt/debug/define=("HAVE_CONFIG_H=1","USE_COLLECT2" $(HAIFA))
endif
LFLAGS=/nomap
LIBS=,sys$$library:vaxcrtl.olb/lib
endif

BISON = bison
BISON_FLAGS=  /Yacc/Define/Verbose
RENAME=	rename/New_Version
LINK  =	link		#/noshare/nosysshr
EDIT  =	edit
SEARCH=	search
ABORT =	exit %x002C
echo  =	write sys$$output

CINCL1	=	/Incl=([],[.config])
CINCL2	=	/Incl=([],[.ginclude],[.config])
CINCL_SUB =	/Incl=([],[-],[-.ginclude],[-.config])
CINCL_CP=	/Incl=([],[.config],[.cp],[.cp.inc])

MDFILE = [.config.$(ARCH)]$(ARCH).md

ifeq ($(HAIFA),)
SCHED=sched
else
SCHED=haifa-sched
endif

GENOBJS=[]rtl.obj,obstack.obj

INDEPOBJS= []toplev.obj,version.obj,tree.obj,print-tree.obj,stor-layout.obj,\
fold-const.obj,function.obj,stmt.obj,except.obj,expr.obj,calls.obj,expmed.obj,\
explow.obj,optabs.obj,varasm.obj,rtl.obj,print-rtl.obj,rtlanal.obj,\
emit-rtl.obj,genrtl.obj,real.obj,regmove.obj,dbxout.obj,sdbout.obj,dwarfout.obj,\
dwarf2out.obj,xcoffout.obj,bitmap.obj,alias.obj,\
integrate.obj,jump.obj,cse.obj,loop.obj,unroll.obj,flow.obj,stupid.obj,\
combine.obj,regclass.obj,local-alloc.obj,global.obj,reload.obj,\
reload1.obj,caller-save.obj,insn-peep.obj,reorg.obj,$(SCHED).obj,\
final.obj,recog.obj,reg-stack.obj,insn-opinit.obj,insn-recog.obj,\
insn-extract.obj,insn-output.obj,insn-emit.obj,\
profile.obj,insn-attrtab.obj,\
aux-output.obj,getpwd.obj,convert.obj

CC1OBJS=[]c-parse.obj,c-lang.obj,c-lex.obj,c-pragma.obj,c-decl.obj,\
c-typeck.obj,c-convert.obj,c-aux-info.obj,c-common.obj,c-iterate.obj,\
obstack.obj

OBJCOBJS=

# list copied from cc1plus-objs.opt

CC1PLUSOBJS=[.cp]call.obj,[.cp]decl2.obj,\
[.cp]except.obj,[.cp]pt.obj,\
[.cp]spew.obj,[.cp]xref.obj,[.cp]class.obj,\
[.cp]expr.obj,[.cp]lex.obj,\
[.cp]ptree.obj,[.cp]tree.obj,[.cp]cvt.obj,\
[.cp]errfn.obj,[.cp]rtti.obj,[.cp]method.obj,\
[.cp]search.obj,[.cp]typeck.obj,[.cp]decl.obj,\
[.cp]error.obj,[.cp]friend.obj,[.cp]init.obj,[.cp]parse.obj,\
[.cp]sig.obj,[.cp]typeck2.obj,[.cp]repo.obj,\
[.cp]input.obj,\
[]obstack.obj,\
[]c-common.obj,[]c-pragma.obj

CCCPOBJS=[]cccp.obj,cexp.obj,version.obj,prefix.obj

ALLOCA=,[]alloca.obj

LIBIBERTY = [-.libiberty]libiberty.olb

CXX_LIB2FUNCS = [.cp]tinfo.obj,[.cp]tinfo2.obj,\
[.cp]new.obj,[.cp]new1.obj,[.cp]new2.obj,[.cp]exception.obj

.c.obj:
	$(CC) $(CFLAGS) $(CINCL1) $</obj=$@

.cc.obj:
	$(CC)/plus/CPP="-nostdinc++" $(CFLAGS) $(CINCL_CP) $</obj=$@

INSN_INCLUDES=insn-attr.h insn-codes.h insn-config.h insn-flags.h

#
#
#

all: cpp.exe cc1.exe float.h limits.h libgcc2.olb

allplus: cc1plus.exe libgccplus.olb

libplus: libgccplus.olb

cc1.exe: $(CC1OBJS) $(ALLOCA) $(INDEPOBJS)
	$(LINK)$(LFLAGS)/exe=$@ version.opt/opt,cc1-objs.opt/Opt,independent.opt/Opt$(ALLOCA)$(LIBS)

cpp.exe: $(CCCPOBJS) $(ALLOCA)
	$(LINK)$(LFLAGS)/exe=$@ $(CCCPOBJS),version.opt/opt$(ALLOCA)$(LIBS)

cc1plus.exe: $(CC1PLUSOBJS) $(ALLOCA) $(INDEPOBJS)
	$(LINK)$(LFLAGS)/exe=$@ version.opt/opt,cc1plus-objs.opt/Opt,independent.opt/Opt$(ALLOCA)$(LIBS)

gcc.exe: gcc.obj version.obj choose-temp.obj pexecute.obj prefix.obj obstack.obj
	$(LINK)$(LFLAGS)/exe=$@ $^$(ALLOCA)$(LIBS)
        
install: cpp.exe cc1.exe gcc.exe libgcc2.olb
	$(CP) $^ GNU_CC_LIBRARY

installplus: cc1plus.exe libgccplus.olb
	$(CP) $^ GNU_CC_LIBRARY

float.h: enquire.exe
	mcr $(PWD)enquire.exe -f > $@

limits.h: enquire.exe
	mcr $(PWD)enquire.exe -l > $@

enquire.exe: enquire.obj
	$(LINK)$(LFLAGS)/exe=$@ enquire.obj$(ALLOCA)$(LIBS)

libgcc2.olb:
	$$ @make-l2

libgccplus.olb: $(CXX_LIB2FUNCS)
	lib/create libgccplus $(CXX_LIB2FUNCS)

genattr.exe: genattr.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-attr.h: genattr.exe $(MDFILE)
	mcr $(PWD)genattr.exe $(MDFILE) > $@

genflags.exe: genflags.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-flags.h: genflags.exe $(MDFILE)
	mcr $(PWD)genflags.exe $(MDFILE) > $@

gencodes.exe: gencodes.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-codes.h: gencodes.exe $(MDFILE)
	mcr $(PWD)gencodes.exe $(MDFILE) > $@

genconfig.exe: genconfig.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-config.h: genconfig.exe $(MDFILE)
	mcr $(PWD)genconfig.exe $(MDFILE) > $@

genpeep.exe: genpeep.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-peep.c: genpeep.exe $(MDFILE)
	mcr $(PWD)genpeep.exe $(MDFILE) > $@

genopinit.exe: genopinit.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-opinit.c: genopinit.exe $(MDFILE)
	mcr $(PWD)genopinit.exe $(MDFILE) > $@

genrecog.exe: genrecog.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-recog.c: genrecog.exe $(MDFILE)
	mcr $(PWD)genrecog.exe $(MDFILE) > $@

genextract.exe: genextract.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-extract.c: genextract.exe $(MDFILE)
	mcr $(PWD)genextract.exe $(MDFILE) > $@

genoutput.exe: genoutput.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-output.c: genoutput.exe $(MDFILE)
	mcr $(PWD)genoutput.exe $(MDFILE) > $@

genemit.exe: genemit.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-emit.c: genemit.exe $(MDFILE)
	mcr $(PWD)genemit.exe $(MDFILE) > $@

genattrtab.exe: genattrtab.obj,rtlanal.obj,$(GENOBJS)$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

insn-attrtab.c: genattrtab.exe $(MDFILE)
	mcr $(PWD)genattrtab.exe $(MDFILE) > $@

gengenrtl.exe: gengenrtl.obj,obstack.obj,$(ALLOCA)
	$(LINK) $(LFLAGS)/exe=$@ $^$(LIBS)

genrtl.h genrtl.c: gengenrtl.exe
	mcr $(PWD)gengenrtl.exe	genrtl.h genrtl.c

cccp.obj: cccp.c config.h
aux-output.obj: aux-output.c insn-attr.h insn-flags.h insn-config.h
caller-save.obj: caller-save.c insn-config.h
calls.obj: calls.c insn-flags.h
combine.obj: combine.c insn-attr.h insn-flags.h insn-codes.h insn-config.h
cse.obj: cse.c insn-config.h
c-decl.obj: c-decl.c expr.h integrate.h insn-codes.h insn-config.h
c-lex.obj: c-lex.c genrtl.h
c-typeck.obj: c-typeck.c
dbxout.obj: dbxout.c insn-config.h
dwarfout.obj: dwarfout.c insn-config.h
dwarf2out.obj: dwarf2out.c insn-config.h
emit-rtl.obj: emit-rtl.c insn-config.h
except.obj: except.c insn-flags.h insn-codes.h insn-config.h
explow.obj: explow.c insn-flags.h insn-codes.h insn-config.h
expmed.obj: expmed.c insn-flags.h insn-codes.h insn-config.h
expr.obj: expr.c insn-flags.h insn-config.h
final.obj: final.c tm.h insn-attr.h insn-flags.h insn-codes.h insn-config.h
flow.obj: flow.c insn-config.h
function.obj: function.c insn-flags.h insn-codes.h insn-config.h insn-codes.h insn-config.h
genattrtab.obj: genattrtab.c insn-config.h
genextract.obj: genextract.c insn-config.h
global.obj: global.c insn-config.h
integrate.obj: integrate.c integrate.h insn-flags.h insn-config.h
jump.obj: jump.c insn-flags.h insn-config.h
local-alloc.obj: local-alloc.c insn-config.h
loop.obj: loop.c insn-flags.h insn-config.h
optabs.obj: optabs.c insn-flags.h insn-codes.h insn-config.h
print-rtl.obj: print-rtl.c
profile.obj: profile.c insn-flags.h insn-config.h
recog.obj: recog.c insn-attr.h insn-flags.h insn-codes.h insn-config.h
regclass.obj: regclass.c insn-config.h
reg-stack.obj: reg-stack.c insn-config.h
reload.obj: reload.c insn-codes.h insn-config.h
reload1.obj: reload1.c insn-flags.h insn-codes.h insn-config.h
reorg.obj: reorg.c insn-attr.h insn-flags.h insn-config.h
sched.obj: sched.c insn-attr.h insn-config.h
haifa-sched.obj: haifa-sched.c insn-attr.h insn-config.h
stmt.obj: stmt.c insn-flags.h insn-codes.h insn-config.h
stor-layout.obj: stor-layout.c
stupid.obj: stupid.c
toplev.obj: toplev.c insn-attr.h insn-config.h
unroll.obj: unroll.c insn-config.h

insn-attrtab.obj: insn-attrtab.c insn-attr.h insn-config.h
insn-output.obj: insn-output.c insn-attr.h insn-flags.h insn-codes.h
insn-emit.obj: insn-emit.c insn-flags.h insn-codes.h insn-config.h
insn-opinit.obj: insn-opinit.c insn-flags.h insn-codes.h insn-config.h
insn-output.obj: insn-config.h
insn-recog.obj: insn-config.h

varasm.obj: varasm.c tm.h
toplev.obj: toplev.c tm.h

cexp.c: cexp.y
	$(BISON) $(BISON_FLAGS)/output=$@ $<
c-parse.c: c-parse.y
	$(BISON) $(BISON_FLAGS)/output=$@ $<
[.cp]parse.c: [.cp]parse.y
	$(BISON) $(BISON_FLAGS)/output=$@ $<
[.cp]parse.h: [.cp]parse.c
	@$(ECHO) "Must copy YYEMPTY from [.cp]parse.c to [.cp]parse.h"
	$$ stop
aux-output.c: [.config.$(ARCH)]$(ARCH).c
	copy $< $@

expr.h: insn-codes.h
reload.h: insn-config.h
integrate.h: insn-config.h

config.h:
	$$ @vmsconfig

cleancccp:
	$$ purge
	$(RM) cccp.obj;,cexp.obj;
	$(RM) cpp.exe;

cleanlib:
	$$ purge
	$(RM) libgcc2.olb;

cleanlibplus:
	$$ purge
	$(RM) [.cp]tinfo.obj;
	$(RM) [.cp]tinfo2.obj;
	$(RM) [.cp]new.obj;
	$(RM) [.cp]new1.obj;
	$(RM) [.cp]new2.obj;
	$(RM) [.cp]exception.obj;
	$(RM) libgccplus.olb;

clean:
	$$ purge
	$$ purge [.cp]
	$(RM) *.obj;*
	$(RM) [.cp]*.obj;*
	$(RM) [.cp]parse.output;*
	$(RM) *.cpp;*
	$(RM) *.s;*
	$(RM) *.rtl;*
	$(RM) a.out;
	$(RM) *.combine;
	$(RM) *.cpp;
	$(RM) *.cse;
	$(RM) *.cse2;
	$(RM) *.dbr;
	$(RM) *.flow;
	$(RM) *.greg;
	$(RM) *.jump;
	$(RM) *.jump2;
	$(RM) *.loop;
	$(RM) *.lreg;
	$(RM) *.rtl;
	$(RM) *.sched;
	$(RM) *.sched2;
	$(RM) *.map;
	$(RM) genattr.exe;,insn-attr.h;
	$(RM) genflags.exe;,insn-flags.h;
	$(RM) gencodes.exe;,insn-codes.h;
	$(RM) genconfig.exe;,insn-config.h;
	$(RM) genpeep.exe;,insn-peep.c;
	$(RM) genopinit.exe;,insn-opinit.c;
	$(RM) genrecog.exe;,insn-recog.c;
	$(RM) genextract.exe;,insn-extract.c;
	$(RM) genoutput.exe;,insn-output.c;
	$(RM) genemit.exe;,insn-emit.c;
	$(RM) genattrtab.exe;,insn-attrtab.c;
	$(RM) gengenrtl.exe;,genrtl.c;,genrtl.h;
	$(RM) cc1.exe;
	$(RM) cpp.exe;
	$(RM) cc1plus.exe;
	$(RM) libgcc2.olb;
	$(RM) libgccplus.olb;
	$(RM) enquire.exe;,float.h;,limits.h;
#
# clean everything axpconfig.com creates
#
distclean: clean cleancccp
	purge [...]
	$(RM) config.h;
	$(RM) tconfig.h;
	$(RM) hconfig.h;
	$(RM) tm.h;
	$(RM) options.h;
	$(RM) specs.h;
	$(RM) aux-output.c;

[.cp]call.obj: [.cp]call.c
[.cp]decl2.obj: [.cp]decl2.c
[.cp]except.obj: [.cp]except.c insn-codes.h insn-flags.h
[.cp]pt.obj: [.cp]pt.c
[.cp]spew.obj: [.cp]spew.c
[.cp]xref.obj: [.cp]xref.c
[.cp]class.obj: [.cp]class.c
[.cp]expr.obj: [.cp]expr.c insn-codes.h
[.cp]lex.obj: [.cp]lex.c [.cp]parse.h
[.cp]ptree.obj: [.cp]ptree.c
[.cp]tree.obj: [.cp]tree.c
[.cp]cvt.obj: [.cp]cvt.c
[.cp]errfn.obj: [.cp]errfn.c
[.cp]rtti.obj: [.cp]rtti.c
[.cp]method.obj: [.cp]method.c insn-codes.h
[.cp]search.obj: [.cp]search.c
[.cp]typeck.obj: [.cp]typeck.c
[.cp]decl.obj: [.cp]decl.c
[.cp]error.obj: [.cp]error.c
[.cp]friend.obj: [.cp]friend.c
[.cp]init.obj: [.cp]init.c
[.cp]parse.obj: [.cp]parse.c
	$(CC) $(CFLAGS) $(CINCL_CP) $^/obj=$@
[.cp]sig.obj: [.cp]sig.c
[.cp]typeck2.obj: [.cp]typeck2.c
[.cp]repo.obj: [.cp]repo.c
[.cp]input.obj: [.cp]input.c
	$(TOUCH) $@
# g++ library
[.cp]tinfo.obj: [.cp]tinfo.cc
[.cp]tinfo2.obj: [.cp]tinfo2.cc
[.cp]new.obj: [.cp]new.cc
[.cp]new1.obj: [.cp]new1.cc
[.cp]new2.obj: [.cp]new2.cc
[.cp]exception.obj: [.cp]exception.cc

#EOF