-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile.in
626 lines (517 loc) · 19.8 KB
/
Makefile.in
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
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
#
#
# Copyright (C) 2021 Xcalibyte (Shenzhen) Limited.
#
#
# Copyright (C) 2009-2011 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it would be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Further, this software is distributed without any warranty that it is
# free of the rightful claim of any third person regarding infringement
# or the like. Any license provided herein, whether implied or
# otherwise, applies only to this software file. Patent licenses, if
# any, provided herein do not apply to combinations of this program with
# other software, or any other product whatsoever.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write the Free Software Foundation, Inc., 59
# Temple Place - Suite 330, Boston MA 02111-1307, USA.
#
# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky,
# Mountain View, CA 94043, or:
#
# http://www.sgi.com
#
# For further information regarding this notice, see:
#
# http://oss.sgi.com/projects/GenInfo/NoticeExplan
#
#
# The directory where all native compiler component build subdirectories
# are located
#
MACHINE_TYPE = @MACHINE_TYPE@
COMPILER_TARG_DIR = @abs_top_builddir@/osprey/targdir
LIB_BUILD_AREA = @abs_top_builddir@/osprey/targdir_lib
LIB2_BUILD_AREA = @abs_top_builddir@/osprey/targdir_lib2
NATIVE_BUILD_DIR = osprey/targdir
NATIVE_BUILD_DIR_LD = osprey/cygnus
GNUFE_BUILD_DIR = osprey-gcc-4.2.0
GNUFE_BUILD_SUBDIR = osprey-gcc-4.2.0/host-unknown
LD_BUILD_DIR = binutils
LD_BUILD_SUBDIR = binutils/ld
LIB_MACHINE_TYPE = @LIB_MACHINE_TYPE@
LIB_BUILD_TARGET = @LIB_BUILD_TARGET@
LIB_BUILD_ABI = @LIB_BUILD_ABI@
LIB_BUILD_ARCH = @LIB_BUILD_ARCH@
LIB_BUILD_HOST = @LIB_BUILD_HOST@
LIB2_MACHINE_TYPE = @LIB2_MACHINE_TYPE@
LIB2_BUILD_TARGET = @LIB2_BUILD_TARGET@
LIB2_BUILD_ABI = @LIB2_BUILD_ABI@
LIB2_BUILD_ARCH = @LIB2_BUILD_ARCH@
LIB2_BUILD_HOST = @LIB2_BUILD_HOST@
LIB_BUILD_DIR = osprey/targdir_lib
LIB2_BUILD_DIR = osprey/targdir_lib2
TOP_SRCDIR = @abs_top_srcdir@
TOP_BUILDDIR = @abs_top_builddir@
BUILD_VENDOR = @BUILD_VENDOR@
BUILD_ARCH = @BUILD_ARCH@
BUILD_TARGET = @BUILD_TARGET@
BUILD_MULTILIB = @BUILD_MULTILIB@
BUILD_GNU3 = @BUILD_GNU3@
BUILD_FORTRAN = @BUILD_FORTRAN@
BUILD_TYPE = @BUILD_TYPE@
BUILD_SKIP_IPA = @BUILD_SKIP_IPA@
BUILD_PRODUCT = @BUILD_PRODUCT@
ifeq ($(MACHINE_TYPE), ia64)
# ia64
GNUFE_BUILD_HOST = ia64-linux-gnu
TARGET_EXTRA_OBJ = $(NATIVE_BUILD_DIR)/targ_info/itanium.so
TARGET_EXTRA_OBJ += $(NATIVE_BUILD_DIR)/orc_ict/orc_ict.so
TARGET_EXTRA_OBJ += $(NATIVE_BUILD_DIR)/orc_intel/orc_intel.so
endif
ifeq ($(MACHINE_TYPE), i386)
# i386
GNUFE_BUILD_HOST = x86_64-linux-gnu
endif
ifeq ($(MACHINE_TYPE), x86_64)
# x86_64
GNUFE_BUILD_HOST = x86_64-linux-gnu
endif
CROSS_BUILD = false
# All native compiler components:
BASIC_COMPONENTS = \
$(NATIVE_BUILD_DIR)/driver/driver \
$(NATIVE_BUILD_DIR)/be/be \
$(NATIVE_BUILD_DIR)/lw_inline/inline \
$(NATIVE_BUILD_DIR)/whirl2c/whirl2c \
$(NATIVE_BUILD_DIR)/ir_tools/ir_b2a
ifeq ($(BUILD_TYPE), SHARED)
BASIC_COMPONENTS += \
$(NATIVE_BUILD_DIR)/be/be.so \
$(NATIVE_BUILD_DIR)/cg/cg.so \
$(NATIVE_BUILD_DIR)/wopt/wopt.so \
$(NATIVE_BUILD_DIR)/lno/lno.so \
$(NATIVE_BUILD_DIR)/whirl2c/whirl2c.so
endif
ifneq ($(BUILD_SKIP_IPA), YES)
BASIC_COMPONENTS += \
$(NATIVE_BUILD_DIR)/ipa/ipa.so \
$(NATIVE_BUILD_DIR)/ipl/ipl.so \
$(NATIVE_BUILD_DIR)/ipl/ipl \
$(NATIVE_BUILD_DIR_LD)/ld/ld-new
endif
ifeq ($(BUILD_FORTRAN), YES)
BASIC_COMPONENTS += \
$(NATIVE_BUILD_DIR)/whirl2f/whirl2f
ifeq ($(BUILD_TYPE), SHARED)
BASIC_COMPONENTS += \
$(NATIVE_BUILD_DIR)/whirl2f/whirl2f.so
endif
endif
GNU4_FE_COMPONENTS = \
$(NATIVE_BUILD_DIR)/wgen/wgen42 \
$(NATIVE_BUILD_DIR)/jfe/jfe \
$(NATIVE_BUILD_DIR)/clang2whirl/clangfe \
$(NATIVE_BUILD_DIR)/js2mplref/js2mpl \
$(GNUFE_BUILD_SUBDIR)/gcc/cc1 \
$(GNUFE_BUILD_SUBDIR)/gcc/cc1plus
GNU3_FE_COMPONENTS = \
$(NATIVE_BUILD_DIR)/gccfe/gfec \
$(NATIVE_BUILD_DIR)/g++fe/gfecc
ifeq ($(BUILD_FORTRAN), YES)
FORT_FE_COMPONENTS = \
$(NATIVE_BUILD_DIR)/crayf90/sgi/mfef95
endif
FIRST_COMPONENTS = \
$(NATIVE_BUILD_DIR)/include \
$(NATIVE_BUILD_DIR)/libcomutil \
$(NATIVE_BUILD_DIR)/libcmplrs \
$(NATIVE_BUILD_DIR)/libiberty \
$(NATIVE_BUILD_DIR)/targ_info \
$(NATIVE_BUILD_DIR)/libelf \
$(NATIVE_BUILD_DIR)/libelfutil \
$(NATIVE_BUILD_DIR)/libdwarf \
$(NATIVE_BUILD_DIR)/libunwindP \
$(NATIVE_BUILD_DIR)/libcif \
$(NATIVE_BUILD_DIR)/libjson
NATIVE_COMPONENTS = $(BASIC_COMPONENTS) $(TARGET_EXTRA_OBJ) \
$(GNU4_FE_COMPONENTS) $(FORT_FE_COMPONENTS) \
$(FIRST_COMPONENTS)
ifeq ($(BUILD_GNU3), YES)
NATIVE_COMPONENTS += $(GNU3_FE_COMPONENTS)
endif
CROSS_COMPONENTS = $(BASIC_COMPONENTS) $(TARGET_EXTRA_OBJ) \
$(FORT_FE_COMPONENTS)
BASIC_PHONY_TARGET = $(shell for i in $(BASIC_COMPONENTS); do basename "$$i" ; done)
CROSS_PHONY_TARGET = $(shell for i in $(CROSS_COMPONENTS); do basename "$$i" ; done)
PHONY_TARGET = $(shell for i in $(NATIVE_COMPONENTS); do basename "$$i" ; done)
.PHONY : $(PHONY_TARGET) all build install install_fe install_compiler clean clobber backend
#define SKIP_DEP_BUILD will disable the unnecessary dependency check
export SKIP_DEP_BUILD=1
ifeq ($(BUILD_PRODUCT), MASTIFF)
# Only build basic components and front ends for mastiff
MASTIFF_COMPONENTS = $(BASIC_COMPONENTS) \
$(GNU4_FE_COMPONENTS) \
$(NATIVE_BUILD_DIR)/vsa/vsa.so \
mapxfa
PHONY_TARGET = $(shell for i in $(MASTIFF_COMPONENTS); do basename "$$i" ; done)
ifeq ($(BUILD_TARGET), X8664)
ALL_TARGETS = build librbc libwffi libopen64rt
else
ALL_TARGETS = build
endif
else
# Use all to build compiler (build) and libraries (lib)
ALL_TARGETS = build lib
endif
# If BUILD_MULTILIB is YES, build a second library as well.
CLEAN_LIB = clean-lib
ifeq ($(BUILD_MULTILIB), YES)
ALL_TARGETS += lib2
CLEAN_LIB += clean-lib2
endif
all: $(ALL_TARGETS)
include:
$(MAKE) -C $(NATIVE_BUILD_DIR)/include
libcomutil: include
$(MAKE) -C $(NATIVE_BUILD_DIR)/libcomutil
libcmplrs: include
$(MAKE) -C $(NATIVE_BUILD_DIR)/libcmplrs
libiberty: include
$(MAKE) -C $(NATIVE_BUILD_DIR)/libiberty
targ_info: include
$(MAKE) -C $(NATIVE_BUILD_DIR)/targ_info
libelf: include
$(MAKE) -C $(NATIVE_BUILD_DIR)/libelf
libelfutil: include
$(MAKE) -C $(NATIVE_BUILD_DIR)/libelfutil
libdwarf: libelf
$(MAKE) -C $(NATIVE_BUILD_DIR)/libdwarf
libunwindP: targ_info
$(MAKE) -C $(NATIVE_BUILD_DIR)/libunwindP
libcif: include
$(MAKE) -C $(NATIVE_BUILD_DIR)/libcif
arith:
$(MAKE) -C $(NATIVE_BUILD_DIR)/arith
libjson:
$(MAKE) -C $(NATIVE_BUILD_DIR)/libjson
$(NATIVE_BUILD_DIR)/driver/driver driver: include
$(MAKE) -C $(NATIVE_BUILD_DIR)/driver
$(NATIVE_BUILD_DIR)/gccfe/gfec gfec: libiberty libcomutil libcmplrs
$(MAKE) -C $(NATIVE_BUILD_DIR)/gccfe
$(NATIVE_BUILD_DIR)/g++fe/gfecc gfecc: libiberty libcomutil libcmplrs
$(MAKE) -C $(NATIVE_BUILD_DIR)/g++fe
$(NATIVE_BUILD_DIR)/wgen/wgen42 wgen42: libiberty libcomutil libcmplrs $(NATIVE_BUILD_DIR)/libspin_4_2_0/libgspin42.a
$(MAKE) -C $(NATIVE_BUILD_DIR)/wgen
$(NATIVE_BUILD_DIR)/jfe/jfe jfe:
$(MAKE) -C $(NATIVE_BUILD_DIR)/jfe
$(NATIVE_BUILD_DIR)/clang2whirl/clangfe clangfe: include libiberty libcomutil libcmplrs
$(MAKE) -C $(NATIVE_BUILD_DIR)/clang2whirl
$(NATIVE_BUILD_DIR)/js2mplref/js2mpl js2mpl: include libiberty libcomutil libcmplrs
$(MAKE) -C $(NATIVE_BUILD_DIR)/js2mplref
ifeq ($(BUILD_TYPE), SHARED)
$(NATIVE_BUILD_DIR)/be/be be: be.so
$(NATIVE_BUILD_DIR)/be/be.so be.so: include libiberty targ_info
$(MAKE) -C $(NATIVE_BUILD_DIR)/be
$(NATIVE_BUILD_DIR)/cg/cg.so cg.so: be.so libelf libelfutil libdwarf libunwindP
$(MAKE) -C $(NATIVE_BUILD_DIR)/cg
$(NATIVE_BUILD_DIR)/vsa/vsa.so vsa.so: be.so wopt.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/vsa
$(NATIVE_BUILD_DIR)/wopt/wopt.so wopt.so: be.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/wopt
$(NATIVE_BUILD_DIR)/lno/lno.so lno.so: wopt.so ipl.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/lno
$(NATIVE_BUILD_DIR)/ipa/ipa.so ipa.so: ipl.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/ipa
$(NATIVE_BUILD_DIR)/ipl/ipl ipl: ipl.so
$(NATIVE_BUILD_DIR)/ipl/ipl.so ipl.so: be.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/ipl
$(NATIVE_BUILD_DIR)/lw_inline/inline inline: be.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/lw_inline
$(NATIVE_BUILD_DIR)/whirl2c/whirl2c whirl2c: whirl2c.so
$(NATIVE_BUILD_DIR)/whirl2c/whirl2c.so whirl2c.so: be.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/whirl2c
$(NATIVE_BUILD_DIR)/whirl2f/whirl2f whirl2f: whirl2f.so
$(NATIVE_BUILD_DIR)/whirl2f/whirl2f.so whirl2f.so: be.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/whirl2f
else
$(NATIVE_BUILD_DIR)/be/be be: include libiberty targ_info libbe libipl liblno libwopt libwhirl2c libwhirl2f libdwarf libcg libelfutil libelf
$(MAKE) -C $(NATIVE_BUILD_DIR)/be be
$(NATIVE_BUILD_DIR)/be/libbe libbe: include libiberty targ_info
$(MAKE) -C $(NATIVE_BUILD_DIR)/be
$(NATIVE_BUILD_DIR)/cg/libcg libcg: libbe libelf libelfutil libdwarf libunwindP
$(MAKE) -C $(NATIVE_BUILD_DIR)/cg
$(NATIVE_BUILD_DIR)/wopt/libwopt libwopt: libbe
$(MAKE) -C $(NATIVE_BUILD_DIR)/wopt
$(NATIVE_BUILD_DIR)/lno/liblno liblno: libwopt libipl
$(MAKE) -C $(NATIVE_BUILD_DIR)/lno
$(NATIVE_BUILD_DIR)/ipa/libipa libipa: libipl
$(MAKE) -C $(NATIVE_BUILD_DIR)/ipa
$(NATIVE_BUILD_DIR)/ipl/ipl ipl: libipl
$(NATIVE_BUILD_DIR)/ipl/libipl libipl: libbe
$(MAKE) -C $(NATIVE_BUILD_DIR)/ipl
$(NATIVE_BUILD_DIR)/lw_inline/inline inline: libbe
$(MAKE) -C $(NATIVE_BUILD_DIR)/lw_inline
$(NATIVE_BUILD_DIR)/whirl2c/whirl2c whirl2c: libwhirl2c
$(NATIVE_BUILD_DIR)/whirl2c/libwhirl2c libwhirl2c: libbe
$(MAKE) -C $(NATIVE_BUILD_DIR)/whirl2c
$(NATIVE_BUILD_DIR)/whirl2c/whirl2f whirl2f: libwhirl2f
$(NATIVE_BUILD_DIR)/whirl2c/libwhirl2f libwhirl2f: libbe
$(MAKE) -C $(NATIVE_BUILD_DIR)/whirl2f
endif
ifeq ($(MACHINE_TYPE), ia64)
$(NATIVE_BUILD_DIR)/orc_ict/orc_ict.so orc_ict.so: cg.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/orc_ict
$(NATIVE_BUILD_DIR)/orc_intel/orc_intel.so orc_intel.so: cg.so
$(MAKE) -C $(NATIVE_BUILD_DIR)/orc_intel
$(NATIVE_BUILD_DIR)/targ_info/itanium.so itanium.so: targ_info
endif
$(NATIVE_BUILD_DIR)/ir_tools/ir_b2a ir_b2a: be libcomutil libjson
$(MAKE) -C $(NATIVE_BUILD_DIR)/ir_tools
$(NATIVE_BUILD_DIR)/crayf90/sgi/mfef95 mfef95: libcomutil libcif arith
$(MAKE) -C $(NATIVE_BUILD_DIR)/crayf90
.PHONY: phony_targets first
$(NATIVE_BUILD_DIR_LD)/ld/ld-new ld-new:
$(MAKE) -C $(NATIVE_BUILD_DIR_LD)
$(NATIVE_BUILD_DIR)/libspin_4_2_0/libgspin42.a libspin42:
$(MAKE) -C $(NATIVE_BUILD_DIR)/libspin_4_2_0
# GNU 4.2.0 based FE
cc1plus: $(GNUFE_BUILD_SUBDIR)/gcc/cc1plus
cc1: $(GNUFE_BUILD_SUBDIR)/gcc/cc1
cc1plus: cc1
$(GNUFE_BUILD_SUBDIR)/gcc/cc1plus cc1plus: $(GNUFE_BUILD_SUBDIR)/gcc/cc1
ifeq ($(BUILD_ARCH), RISCV64)
# ignore libgcc/libstdc++ build error
$(GNUFE_BUILD_SUBDIR)/gcc/cc1 cc1: $(NATIVE_BUILD_DIR)/libspin_4_2_0/libgspin42.a
-$(MAKE) -C $(GNUFE_BUILD_DIR)
if [ ! -f $(GNUFE_BUILD_DIR)/host-unknown/gcc/cc1 -o ! -f $(GNUFE_BUILD_DIR)/host-unknown/gcc/cc1plus ]; then \
echo "Build $(GNUFE_BUILD_DIR) failed." \
exit 1; \
fi
else
$(GNUFE_BUILD_SUBDIR)/gcc/cc1 cc1: $(NATIVE_BUILD_DIR)/libspin_4_2_0/libgspin42.a
$(MAKE) -C $(GNUFE_BUILD_DIR)
endif
# ld in binutils
mapxfa: $(LD_BUILD_SUBDIR)/ld-new
$(LD_BUILD_SUBDIR)/ld-new mapxfa:
$(MAKE) -C $(LD_BUILD_DIR) MAKEINFO=true
librbc: build include
$(MAKE) -C $(LIB_BUILD_AREA)/librbc
libopen64rt: build
$(MAKE) -C $(LIB_BUILD_AREA)/libopen64rt
libwffi: build include
$(MAKE) -C $(LIB_BUILD_AREA)/libwffi
build:
$(MAKE) first
$(MAKE) phony_targets
phony_targets: $(PHONY_TARGET)
cross: NATIVE_BUILD_DIR = osprey/targia32_ia64_nodebug
cross: NATIVE_BUILD_DIR_LD = osprey/targcygnus_ia32_ia64
cross: CROSS_BUILD = true
cross: $(CROSS_PHONY_TARGET)
echo $(CROSS_PHONY_TARGET)
backend: $(BASIC_PHONY_TARGET)
ifeq ($(BUILD_TARGET), SL)
install:
export TOOLROOT=@prefix@; \
export TOP_SRCDIR=$(TOP_SRCDIR); \
$(TOP_SRCDIR)/INSTALL.cross.sl @abs_top_builddir@
else
install: install_fe install_compiler
ifeq ($(BUILD_TARGET), PPC32)
install_fe:
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-common
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-headers
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-cpp
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-driver
else ifeq ($(BUILD_ARCH), RISCV64)
install_fe:
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-common
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-headers
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-cpp
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-driver
else
install_fe:
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-common
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-headers
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-libgcc
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-cpp
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-driver
$(MAKE) -C $(GNUFE_BUILD_DIR)/$(GNUFE_BUILD_HOST)/libstdc++-v3 \
install
endif
ifeq ($(BUILD_PRODUCT), MASTIFF)
include @abs_top_srcdir@/mastiff.mk
install_compiler:
export TOOLROOT=@prefix@; \
export TOP_SRCDIR=$(TOP_SRCDIR); \
$(TOP_SRCDIR)/install_mastiff.sh $(BUILD_TARGET) $(OPEN64_FULL_VERSION)
# distribution installation
dist: install_fe
export TOOLROOT=@prefix@; \
export TOP_SRCDIR=$(TOP_SRCDIR); \
$(TOP_SRCDIR)/install_mastiff.sh $(BUILD_TARGET) $(OPEN64_FULL_VERSION) dist
else
install_compiler:
export TOOLROOT=@prefix@; \
export TOP_SRCDIR=$(TOP_SRCDIR); \
$(TOP_SRCDIR)/install_compiler.sh $(MACHINE_TYPE) $(if $(BUILD_FORTRAN),"YES","NO") @CROSS_TARGET@
endif
endif
install-cross:
export TOOLROOT=@prefix@; $(TOP_SRCDIR)/install_compiler.sh ia64-cross $(if $(BUILD_FORTRAN),"YES","NO")
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-common
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-headers
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-libgcc
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-cpp
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/gcc \
install-driver
$(MAKE) -C $(GNUFE_BUILD_SUBDIR)/$(GNUFE_BUILD_HOST)/libstdc++-v3 \
install
export TOOLROOT=@prefix@; $(TOP_SRCDIR)/install_compiler.sh ia64-cross $(if $(BUILD_FORTRAN),"YES","NO")
LIB_ARGS = BUILD_TARGET=$(LIB_BUILD_TARGET) BUILD_COMPILER=SELF BUILD_AREA=$(LIB_BUILD_AREA) MACHINE_TYPE=$(LIB_MACHINE_TYPE) BUILD_ABI=$(LIB_BUILD_ABI) BUILD_ARCH=$(LIB_BUILD_ARCH) BUILD_HOST=$(LIB_BUILD_HOST) BUILD_OPTIMIZE=@BUILD_LIB_OPTIMIZE@
ifeq ($(LIB_BUILD_TARGET),IA64)
LIB_ARGS += BUILD_TYPE=NONSHARED
else
LIB_ARGS += BUILD_TYPE=@BUILD_TYPE@
endif
LIB2_ARGS = BUILD_TARGET=$(LIB2_BUILD_TARGET) BUILD_COMPILER=SELF BUILD_AREA=$(LIB2_BUILD_AREA) MACHINE_TYPE=$(LIB2_MACHINE_TYPE) BUILD_ABI=$(LIB2_BUILD_ABI) BUILD_ARCH=$(LIB2_BUILD_ARCH) BUILD_HOST=$(LIB2_BUILD_HOST) BUILD_OPTIMIZE=@BUILD_LIB_OPTIMIZE@ BUILD_TYPE=@BUILD_TYPE@
.PHONY: library lib clean-library clean-lib
.PHONY: library2 lib2 clean-library2 clean-lib2
library lib library2 lib2 : LOCAL_LIB_ACTION = default
clean-library clean-lib clean-library2 clean-lib2 : LOCAL_LIB_ACTION = clobber
library lib clean-library clean-lib : LOCAL_LIB_BUILD_DIR = $(LIB_BUILD_DIR)
library lib clean-library clean-lib : LOCAL_LIB_ARGS = $(LIB_ARGS)
library2 lib2 clean-library2 clean-lib2 : LOCAL_LIB_BUILD_DIR = $(LIB2_BUILD_DIR)
library2 lib2 clean-library2 clean-lib2 : LOCAL_LIB_ARGS = $(LIB2_ARGS)
library lib library2 lib2 : build
ifneq ($(BUILD_TARGET), PPC32)
library lib clean-library clean-lib library2 lib2 clean-library2 clean-lib2:
@echo "$(MAKE) -C $(LOCAL_LIB_BUILD_DIR) $(LOCAL_LIB_ACTION) $(LOCAL_LIB_ARGS)"; \
$(MAKE) -C $(LOCAL_LIB_BUILD_DIR) $(LOCAL_LIB_ACTION) $(LOCAL_LIB_ARGS)
endif
clobber: clean
rm -rf $(CROSSDIR) $(BOOTDIR)
clean: $(CLEAN_LIB)
$(MAKE) -C $(NATIVE_BUILD_DIR)/driver clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/wgen clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/jfe clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/clang2whirl clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/js2mplref clobber
ifeq ($(BUILD_GNU3), YES)
$(MAKE) -C $(NATIVE_BUILD_DIR)/gccfe clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/g++fe clobber
endif
$(MAKE) -C $(NATIVE_BUILD_DIR)/be clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/cg clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/wopt clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/vsa clobber
$(MAKE) -C $(LIB_BUILD_DIR)/librbc clobber
$(MAKE) -C $(LIB_BUILD_DIR)/libwffi clobber
ifneq ($(BUILD_TARGET), UWASM)
$(MAKE) -C $(LIB_BUILD_DIR)/libopen64rt clobber
endif
$(MAKE) -C $(NATIVE_BUILD_DIR)/lno clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/ipa clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/ipl clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/lw_inline clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/whirl2c clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/libkapi clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/targ_info clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/ir_tools clobber
ifeq ($(BUILD_FORTRAN), YES)
$(MAKE) -C $(NATIVE_BUILD_DIR)/crayf90 clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/whirl2f clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/arith clobber
endif
$(MAKE) -C $(NATIVE_BUILD_DIR)/include clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/libspin_4_2_0 clobber
ifeq ($(MACHINE_TYPE), ia64)
$(MAKE) -C $(NATIVE_BUILD_DIR)/orc_ict clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/orc_intel clobber
endif
$(MAKE) -C $(NATIVE_BUILD_DIR_LD) clean
$(MAKE) -C $(GNUFE_BUILD_DIR) clean
$(MAKE) -C $(LD_BUILD_DIR) clean
@for i in libcif libcmplrs libcomutil libcsup libdwarf libelf libelfutil \
libiberty libunwindP libjson; do \
$(MAKE) -C "$(NATIVE_BUILD_DIR)/$${i}" clobber; \
done
help:
@echo "Help of the Makefile for Open64 compiler source"
@echo "Available targets:"
@echo " - (DEFAULT)"
@echo " Build the components of the compiler"
@echo " - help"
@echo " Display this help"
@echo " - install"
@echo " Install the components of the compiler."
@echo " If TOOLROOT is set, the compiler will be installed under the TOOLROOT,"
@echo " otherwise, you will be prompted to input the path\n"
@echo " - library"
@echo " Build the libraries needed by the compiler"
@echo " - clean-lib"
@echo " Remove intermediate files generated in building libraries"
@echo " - clean"
@echo " - clobber"
@echo " Remove all intermediate files"
@echo ""
@echo "Available options (former is default):"
@echo " - BUILD_OPTIMIZE={NODEBUG|DEBUG}"
@echo " Enable debug the compiler or not"
@echo " - BUILD_COMPILER={GNU|OSP|PSC}"
@echo " Using GCC(GNU) or Open64(OSP) Or Pathscale(PSC) compiler"
@echo " to build the open64 compiler"
@echo " - V={0|1}"
@echo " Display detailed compilation progress or not"
.PHONY: bootstrap reboot boot cross_gcc
BOOTDIR=$(PWD)/boot
CROSSDIR=$(PWD)/cross_gcc
bootstrap: reboot
#build the reboot compiler
reboot: boot
$(MAKE) clean
set +h; $(MAKE) all lib BUILD_COMPILER=OSP PATH=$(BOOTDIR)/bin:$(PATH)
#build the boot compiler using the exist open64 compiler
boot:
#if opencc is not found use gcc to build the cross compiler
if ! opencc -v >/dev/null 2>&1; then $(MAKE) cross_gcc; fi
$(MAKE) clean
rm -rf $(BOOTDIR)
set +h; $(MAKE) all lib BUILD_COMPILER=OSP PATH=$(CROSSDIR)/bin:$(PATH)
$(MAKE) install TOOLROOT=$(BOOTDIR)
cross_gcc:
$(MAKE) clean
@rm -rf $(CROSSDIR)
$(MAKE) all BUILD_COMPILER=GNU
$(MAKE) install TOOLROOT=$(CROSSDIR)
set +h; $(MAKE) lib BUILD_COMPILER=OSP PATH=$(CROSSDIR)/bin:$(PATH)
$(MAKE) install TOOLROOT=$(CROSSDIR)