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
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
|
# Top level -*- makefile -*- fragment for GNU Ada (GNAT).
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
# Free Software Foundation, Inc.
#This file is part of GCC.
#GCC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 3, or (at your option)
#any later version.
#GCC is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with GCC; see the file COPYING3. If not see
#<http://www.gnu.org/licenses/>.
# This file provides the language dependent support in the main Makefile.
# Each language makefile fragment must provide the following targets:
#
# foo.all.cross, foo.start.encap, foo.rest.encap,
# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
# foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
# foo.mostlyclean, foo.clean, foo.distclean,
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
#
# where `foo' is the name of the language.
#
# It should also provide rules for:
#
# - making any compiler driver (eg: g++)
# - the compiler proper (eg: cc1plus)
# - define the names for selecting the language in LANGUAGES.
# tool definitions
CP = cp -p
ECHO = echo
MV = mv
MKDIR = mkdir -p
RM = rm -f
RMDIR = rm -rf
# Extra flags to pass to recursive makes.
COMMON_ADAFLAGS= -gnatpg
ifeq ($(TREECHECKING),)
CHECKING_ADAFLAGS=
else
CHECKING_ADAFLAGS= -gnata
endif
WARN_ADAFLAGS= -W -Wall
# For native builds, the base compiler might be old and we need to arrange for
# style warnings not to be flagged as errors during stage1. Cross compilers
# need to be built by a recent/matching native so we might as well leave the
# checks fully active.
ifeq ($(CROSS),)
ADAFLAGS= $(COMMON_ADAFLAGS) -gnatwns
else
ADAFLAGS= $(COMMON_ADAFLAGS)
endif
ALL_ADAFLAGS = \
$(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS) $(CHECKING_ADAFLAGS) $(WARN_ADAFLAGS)
FORCE_DEBUG_ADAFLAGS = -g
ADA_CFLAGS =
ADA_INCLUDES = -nostdinc -I- -I. -Iada/generated -Iada -I$(srcdir)/ada -I$(srcdir)/ada/gcc-interface -Iada/libgnat -I$(srcdir)/ada/libgnat
GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
GNATLIBCFLAGS= -g -O2 $(TCFLAGS)
ADA_INCLUDE_DIR = $(libsubdir)/adainclude
ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
THREAD_KIND=native
TRACE=no
# We do not want the WARN_CFLAGS of the compiler in Ada as it is for C/C++.
COMMON_FLAGS_TO_PASS = $(filter-out $(WARN_CFLAGS), $(FLAGS_TO_PASS))
ADA_FLAGS_TO_PASS = \
"ADA_FOR_BUILD=$(ADA_FOR_BUILD)" \
"ADA_INCLUDE_DIR=$(ADA_INCLUDE_DIR)" \
"ADA_RTL_OBJ_DIR=$(ADA_RTL_OBJ_DIR)" \
"ADAFLAGS=$(ADAFLAGS) $(WARN_ADAFLAGS)" \
"ADA_FOR_TARGET=$(ADA_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
# List of Ada tools to build and install
ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
gnatname gnatprep gnatxref gnatfind gnatclean
# Say how to compile Ada programs.
.SUFFIXES: .ada .adb .ads
# FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
# Use mildly strict warnings for this front end and add special flags.
ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
# Unresolved warnings in specific files.
ada/adaint.o-warn = -Wno-error
ada/%.o: ada/gcc-interface/%.c
$(COMPILE) $<
$(POSTCOMPILE)
# Function that dumps the dependencies of an Ada object. Dependency only work
# fully if the compiler support -gnatd.n. Otherwise a fallback mechanism is
# used. The fallback mechanism parse the ali files to get the list of
# dependencies and try to guess their location. If the location cannot be found
# then the dependency is ignored.
ifeq ($(findstring -gnatd.n,$(ALL_ADAFLAGS)),)
ADA_DEPS=\
mkdir -p $(dir $@)/$(DEPDIR); \
(o="$@: $<"; \
a="`echo $@ | sed -e 's/.o$$/.ali/'`"; \
for d in `cat $$a | sed -ne 's;^D \([a-z0-9_\.-]*\).*;\1;gp'`; do \
for l in ada $(srcdir)/ada ada/libgnat $(srcdir)/ada/libgnat; do \
if test -f $$l/$$d; then \
o="$$o $$l/$$d"; \
fi; \
done; \
done; \
echo "$$o"; echo) \
>$(dir $@)/$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $@))
ADA_OUTPUT_OPTION = $(OUTPUT_OPTION)
else
ADA_DEPS=\
mkdir -p $(dir $@)/$(DEPDIR); \
(echo "$@: $< " | tr -d '\015' | tr -d '\n'; \
cat $@.gnatd.n | tr -d '\015' | tr '\n' ' '; \
echo; echo) \
>$(dir $@)/$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $@))
ADA_OUTPUT_OPTION = $(OUTPUT_OPTION) > $@.gnatd.n
endif
.adb.o:
mkdir -p $(dir $@)
$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(ADA_OUTPUT_OPTION)
@$(ADA_DEPS)
.ads.o:
mkdir -p $(dir $@)
$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(ADA_OUTPUT_OPTION)
@$(ADA_DEPS)
# Define the names for selecting Ada in LANGUAGES.
ada: gnat1$(exeext) gnatbind$(exeext)
# Tell GNU Make to ignore these, if they exist.
.PHONY: ada
# Compute the FLAGS to pass for gnattools, now linked with a C++ driver as
# we're linking against at least libcommon which contains C++ compiled code.
# We need to use the same driver to link as the one that was used to produce
# the objects, which depends on whether we're bootstrapping or not. The CXX
# variable conveys what we need for this, set to "g++" if not bootstrapping,
# ".../xg++" otherwise.
# There are too many Ada sources to check against here. Let's
# always force the recursive make.
ifeq ($(build), $(host))
ifeq ($(host), $(target))
# This is a regular native. So use the compiler from our current build
# tree.
ADA_TOOLS_FLAGS_TO_PASS=\
CC="../../xgcc -B../../" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I- -I../generated -I../rts" \
GNATMAKE="../../gnatmake" \
GNATLINK="../../gnatlink" \
GNATBIND="../../gnatbind"
else
# This is a regular cross compiler. Use the native compiler to compile
# the tools.
# put the host RTS dir first in the PATH to hide the default runtime
# files that are among the sources
ifneq ($(findstring ada,$(LANGUAGES)),)
RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
endif
ADA_TOOLS_FLAGS_TO_PASS=\
CC="$(CC)" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I../generated -I$(RTS_DIR)/../adainclude -I$(RTS_DIR)" \
GNATMAKE="gnatmake" \
GNATBIND="gnatbind" \
GNATLINK="gnatlink" \
LIBGNAT=""
endif
else
# Build is different from host so we are either building a canadian cross
# or a cross-native compiler. We provide defaults for tools targeting the
# host platform, but they can be overriden by just setting <tool>_FOR_HOST
# variables.
GNATMAKE_FOR_HOST=$(host_noncanonical)-gnatmake
GNATBIND_FOR_HOST=$(host_noncanonical)-gnatbind
GNATLINK_FOR_HOST=$(host_noncanonical)-gnatlink
GNATLS_FOR_HOST=$(host_noncanonical)-gnatls
ifeq ($(host), $(target))
# This is a cross native. All the sources are taken from the currently
# built runtime.
ADA_TOOLS_FLAGS_TO_PASS=\
CC="$(CC)" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I../generated -I../rts" \
GNATMAKE="$(GNATMAKE_FOR_HOST)" \
GNATBIND="$(GNATBIND_FOR_HOST)" \
GNATLINK="$(GNATLINK_FOR_HOST)" \
LIBGNAT=""
else
# This is a canadian cross. We should use a toolchain running on the
# build platform and targeting the host platform.
ifneq ($(findstring ada,$(LANGUAGES)),)
RTS_DIR:=$(strip $(subst \,/,$(shell $(GNATLS_FOR_HOST) -v | grep adalib )))
endif
ADA_TOOLS_FLAGS_TO_PASS=\
CC="$(CC)" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I../generated -I$(RTS_DIR)/../adainclude -I$(RTS_DIR)" \
GNATMAKE="$(GNATMAKE_FOR_HOST)" \
GNATBIND="$(GNATBIND_FOR_HOST)" \
GNATLINK="$(GNATLINK_FOR_HOST)" \
LIBGNAT=""
endif
endif
# Strip -Werror during linking for the LTO bootstrap
GCC_LINKERFLAGS = $(filter-out -Werror, $(ALL_LINKERFLAGS))
GCC_LINK=$(LINKER) $(GCC_LINKERFLAGS) $(LDFLAGS)
GCC_LLINK=$(LLINKER) $(GCC_LINKERFLAGS) $(LDFLAGS)
# Lists of files for various purposes.
# Languages-specific object files for Ada.
# Object files for gnat1 from C sources.
GNAT1_C_OBJS = ada/adadecode.o ada/adaint.o ada/argv.o ada/cio.o \
ada/cstreams.o ada/env.o ada/init.o ada/initialize.o ada/raise.o \
ada/raise-gcc.o \
ada/seh_init.o ada/targext.o ada/cuintp.o ada/decl.o ada/rtfinal.o \
ada/rtinit.o ada/misc.o ada/utils.o ada/utils2.o ada/trans.o ada/targtyps.o
# Object files from Ada sources that are used by gnat1
GNAT_ADA_OBJS = \
ada/libgnat/a-charac.o \
ada/libgnat/a-chlat1.o \
ada/libgnat/a-elchha.o \
ada/libgnat/a-except.o \
ada/libgnat/a-exctra.o \
ada/libgnat/a-ioexce.o \
ada/libgnat/ada.o \
ada/spark_xrefs.o \
ada/ali.o \
ada/alloc.o \
ada/aspects.o \
ada/atree.o \
ada/butil.o \
ada/casing.o \
ada/checks.o \
ada/comperr.o \
ada/contracts.o \
ada/csets.o \
ada/cstand.o \
ada/debug.o \
ada/debug_a.o \
ada/einfo.o \
ada/elists.o \
ada/err_vars.o \
ada/errout.o \
ada/erroutc.o \
ada/eval_fat.o \
ada/exp_aggr.o \
ada/exp_spark.o \
ada/exp_atag.o \
ada/exp_attr.o \
ada/exp_cg.o \
ada/exp_ch11.o \
ada/exp_ch12.o \
ada/exp_ch13.o \
ada/exp_ch2.o \
ada/exp_ch3.o \
ada/exp_ch4.o \
ada/exp_ch5.o \
ada/exp_ch6.o \
ada/exp_ch7.o \
ada/exp_ch8.o \
ada/exp_ch9.o \
ada/exp_code.o \
ada/exp_dbug.o \
ada/exp_disp.o \
ada/exp_dist.o \
ada/exp_fixd.o \
ada/exp_imgv.o \
ada/exp_intr.o \
ada/exp_pakd.o \
ada/exp_prag.o \
ada/exp_sel.o \
ada/exp_smem.o \
ada/exp_strm.o \
ada/exp_tss.o \
ada/exp_unst.o \
ada/exp_util.o \
ada/expander.o \
ada/fmap.o \
ada/fname-uf.o \
ada/fname.o \
ada/freeze.o \
ada/frontend.o \
ada/libgnat/g-byorma.o \
ada/libgnat/g-dynhta.o \
ada/libgnat/g-hesora.o \
ada/libgnat/g-htable.o \
ada/libgnat/g-spchge.o \
ada/libgnat/g-speche.o \
ada/libgnat/g-u3spch.o \
ada/get_targ.o \
ada/ghost.o \
ada/libgnat/gnat.o \
ada/gnatvsn.o \
ada/hostparm.o \
ada/impunit.o \
ada/inline.o \
ada/libgnat/interfac.o \
ada/itypes.o \
ada/krunch.o \
ada/layout.o \
ada/lib-load.o \
ada/lib-util.o \
ada/lib-writ.o \
ada/lib-xref.o \
ada/lib.o \
ada/live.o \
ada/namet-sp.o \
ada/namet.o \
ada/nlists.o \
ada/nmake.o \
ada/opt.o \
ada/osint-c.o \
ada/osint.o \
ada/output.o \
ada/par.o \
ada/par_sco.o \
ada/prep.o \
ada/prepcomp.o \
ada/put_scos.o \
ada/repinfo.o \
ada/restrict.o \
ada/rident.o \
ada/rtsfind.o \
ada/libgnat/s-addope.o \
ada/libgnat/s-addima.o \
ada/libgnat/s-assert.o \
ada/libgnat/s-bitops.o \
ada/libgnat/s-carun8.o \
ada/libgnat/s-casuti.o \
ada/libgnat/s-conca2.o \
ada/libgnat/s-conca3.o \
ada/libgnat/s-conca4.o \
ada/libgnat/s-conca5.o \
ada/libgnat/s-conca6.o \
ada/libgnat/s-conca7.o \
ada/libgnat/s-conca8.o \
ada/libgnat/s-conca9.o \
ada/libgnat/s-crc32.o \
ada/libgnat/s-crtl.o \
ada/libgnat/s-excdeb.o \
ada/libgnat/s-except.o \
ada/libgnat/s-exctab.o \
ada/libgnat/s-excmac.o \
ada/libgnat/s-htable.o \
ada/libgnat/s-imenne.o \
ada/libgnat/s-imgenu.o \
ada/libgnat/s-imgint.o \
ada/libgnat/s-mastop.o \
ada/libgnat/s-memory.o \
ada/libgnat/s-os_lib.o \
ada/libgnat/s-parame.o \
ada/libgnat/s-purexc.o \
ada/libgnat/s-restri.o \
ada/libgnat/s-secsta.o \
ada/libgnat/s-soflin.o \
ada/libgnat/s-soliin.o \
ada/libgnat/s-sopco3.o \
ada/libgnat/s-sopco4.o \
ada/libgnat/s-sopco5.o \
ada/libgnat/s-stache.o \
ada/libgnat/s-stalib.o \
ada/libgnat/s-stoele.o \
ada/libgnat/s-strcom.o \
ada/libgnat/s-strhas.o \
ada/libgnat/s-string.o \
ada/libgnat/s-strops.o \
ada/libgnat/s-traceb.o \
ada/libgnat/s-traent.o \
ada/libgnat/s-trasym.o \
ada/libgnat/s-unstyp.o \
ada/libgnat/s-utf_32.o \
ada/libgnat/s-valint.o \
ada/libgnat/s-valuns.o \
ada/libgnat/s-valuti.o \
ada/libgnat/s-wchcnv.o \
ada/libgnat/s-wchcon.o \
ada/libgnat/s-wchjis.o \
ada/libgnat/s-wchstw.o \
ada/scans.o \
ada/scil_ll.o \
ada/scn.o \
ada/scng.o \
ada/scos.o \
ada/sdefault.o \
ada/sem.o \
ada/sem_aggr.o \
ada/sem_attr.o \
ada/sem_aux.o \
ada/sem_case.o \
ada/sem_cat.o \
ada/sem_ch10.o \
ada/sem_ch11.o \
ada/sem_ch12.o \
ada/sem_ch13.o \
ada/sem_ch2.o \
ada/sem_ch3.o \
ada/sem_ch4.o \
ada/sem_ch5.o \
ada/sem_ch6.o \
ada/sem_ch7.o \
ada/sem_ch8.o \
ada/sem_ch9.o \
ada/sem_dim.o \
ada/sem_disp.o \
ada/sem_dist.o \
ada/sem_elab.o \
ada/sem_elim.o \
ada/sem_eval.o \
ada/sem_intr.o \
ada/sem_mech.o \
ada/sem_prag.o \
ada/sem_res.o \
ada/sem_scil.o \
ada/sem_smem.o \
ada/sem_spark.o \
ada/sem_type.o \
ada/sem_util.o \
ada/sem_warn.o \
ada/set_targ.o \
ada/sinfo-cn.o \
ada/sinfo.o \
ada/sinput-d.o \
ada/sinput-l.o \
ada/sinput.o \
ada/snames.o \
ada/sprint.o \
ada/stand.o \
ada/stringt.o \
ada/style.o \
ada/styleg.o \
ada/stylesw.o \
ada/switch-c.o \
ada/switch.o \
ada/libgnat/system.o \
ada/table.o \
ada/targparm.o \
ada/tbuild.o \
ada/tree_gen.o \
ada/tree_in.o \
ada/tree_io.o \
ada/treepr.o \
ada/treeprs.o \
ada/ttypes.o \
ada/types.o \
ada/uintp.o \
ada/uname.o \
ada/urealp.o \
ada/usage.o \
ada/validsw.o \
ada/warnsw.o \
ada/widechar.o
# Object files for gnat executables
GNAT1_ADA_OBJS = $(GNAT_ADA_OBJS) ada/back_end.o ada/gnat1drv.o
GNAT1_OBJS = $(GNAT1_C_OBJS) $(GNAT1_ADA_OBJS) ada/b_gnat1.o
GNATBIND_OBJS = \
ada/libgnat/a-elchha.o \
ada/libgnat/a-except.o \
ada/libgnat/ada.o \
ada/adaint.o \
ada/ali-util.o \
ada/ali.o \
ada/alloc.o \
ada/argv.o \
ada/aspects.o \
ada/atree.o \
ada/bcheck.o \
ada/binde.o \
ada/binderr.o \
ada/bindgen.o \
ada/bindusg.o \
ada/butil.o \
ada/casing.o \
ada/cio.o \
ada/csets.o \
ada/cstreams.o \
ada/debug.o \
ada/einfo.o \
ada/elists.o \
ada/env.o \
ada/err_vars.o \
ada/errout.o \
ada/erroutc.o \
ada/exit.o \
ada/final.o \
ada/fmap.o \
ada/fname-uf.o \
ada/fname.o \
ada/libgnat/g-byorma.o \
ada/libgnat/g-hesora.o \
ada/libgnat/g-htable.o \
ada/libgnat/gnat.o \
ada/gnatbind.o \
ada/gnatvsn.o \
ada/hostparm.o \
ada/init.o \
ada/initialize.o \
ada/libgnat/interfac.o \
ada/krunch.o \
ada/lib.o \
ada/link.o \
ada/namet.o \
ada/nlists.o \
ada/opt.o \
ada/osint-b.o \
ada/osint.o \
ada/output.o \
ada/raise.o \
ada/raise-gcc.o \
ada/restrict.o \
ada/rident.o \
ada/rtfinal.o \
ada/rtinit.o \
ada/libgnat/s-addope.o \
ada/libgnat/s-assert.o \
ada/libgnat/s-carun8.o \
ada/libgnat/s-casuti.o \
ada/libgnat/s-conca2.o \
ada/libgnat/s-conca3.o \
ada/libgnat/s-conca4.o \
ada/libgnat/s-conca5.o \
ada/libgnat/s-conca6.o \
ada/libgnat/s-conca7.o \
ada/libgnat/s-conca8.o \
ada/libgnat/s-conca9.o \
ada/libgnat/s-crc32.o \
ada/libgnat/s-crtl.o \
ada/libgnat/s-excdeb.o \
ada/libgnat/s-except.o \
ada/libgnat/s-excmac.o \
ada/libgnat/s-exctab.o \
ada/libgnat/s-htable.o \
ada/libgnat/s-imenne.o \
ada/libgnat/s-imgenu.o \
ada/libgnat/s-imgint.o \
ada/libgnat/s-mastop.o \
ada/libgnat/s-memory.o \
ada/libgnat/s-os_lib.o \
ada/libgnat/s-parame.o \
ada/libgnat/s-resfil.o \
ada/libgnat/s-restri.o \
ada/libgnat/s-secsta.o \
ada/libgnat/s-soflin.o \
ada/libgnat/s-soliin.o \
ada/libgnat/s-sopco3.o \
ada/libgnat/s-sopco4.o \
ada/libgnat/s-sopco5.o \
ada/libgnat/s-stache.o \
ada/libgnat/s-stalib.o \
ada/libgnat/s-stoele.o \
ada/libgnat/s-strhas.o \
ada/libgnat/s-string.o \
ada/libgnat/s-strops.o \
ada/libgnat/s-traent.o \
ada/libgnat/s-traceb.o \
ada/libgnat/s-unstyp.o \
ada/libgnat/s-utf_32.o \
ada/libgnat/s-wchcnv.o \
ada/libgnat/s-wchcon.o \
ada/libgnat/s-wchjis.o \
ada/libgnat/s-wchstw.o \
ada/scans.o \
ada/scil_ll.o \
ada/scng.o \
ada/sdefault.o \
ada/seh_init.o \
ada/sem_aux.o \
ada/sinfo.o \
ada/sinput-c.o \
ada/sinput.o \
ada/snames.o \
ada/stand.o \
ada/stringt.o \
ada/style.o \
ada/styleg.o \
ada/stylesw.o \
ada/switch-b.o \
ada/switch.o \
ada/libgnat/system.o \
ada/table.o \
ada/targext.o \
ada/targparm.o \
ada/tree_io.o \
ada/types.o \
ada/uintp.o \
ada/uname.o \
ada/urealp.o \
ada/widechar.o
# Language-independent object files.
ADA_BACKEND = $(BACKEND) attribs.o
# List of target dependent sources, overridden below as necessary
TARGET_ADA_SRCS =
# Select the right s-excmac according to exception layout (Itanium or arm)
host_cpu=$(word 1, $(subst -, ,$(host)))
EH_MECHANISM=gcc
ifeq ($(strip $(filter-out arm%,$(host_cpu))),)
EH_MECHANISM=arm
endif
# For unwind-pe.h
CFLAGS-ada/raise-gcc.o += -I$(srcdir)/../libgcc -DEH_MECHANISM_$(EH_MECHANISM)
ada/libgnat/s-excmac.o: ada/libgnat/s-excmac.ads ada/libgnat/s-excmac.adb
ada/libgnat/s-excmac.ads: $(srcdir)/ada/libgnat/s-excmac__$(EH_MECHANISM).ads
mkdir -p ada/libgnat
$(CP) $< $@
ada/libgnat/s-excmac.adb: $(srcdir)/ada/libgnat/s-excmac__$(EH_MECHANISM).adb
mkdir -p ada/libgnat
$(CP) $< $@
# Needs to be built with CC=gcc
# Since the RTL should be built with the latest compiler, remove the
# stamp target in the parent directory whenever gnat1 is rebuilt
gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNAT1_OBJS) $(ADA_BACKEND) libcommon-target.a $(LIBDEPS)
+$(GCC_LLINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) \
libcommon-target.a $(LIBS) $(SYSLIBS) $(BACKENDLIBS) $(CFLAGS)
$(RM) stamp-gnatlib2-rts stamp-tools
gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS) ggc-none.o libcommon-target.a $(LIBDEPS)
+$(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) ggc-none.o libcommon-target.a $(LIBS) $(SYSLIBS) $(CFLAGS)
# use target-gcc target-gnatmake target-gnatbind target-gnatlink
gnattools: $(GCC_PARTS) $(CONFIG_H) prefix.o force
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
regnattools:
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
cross-gnattools: force
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools4
canadian-gnattools: force
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools4
gnatlib gnatlib-sjlj gnatlib-zcx gnatlib-shared: force
$(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
THREAD_KIND="$(THREAD_KIND)" \
TRACE="$(TRACE)" \
FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
$@
# use only for native compiler
gnatlib_and_tools: gnatlib gnattools
# Build hooks:
ada.all.cross:
for tool in $(ADA_TOOLS) ; do \
if [ -f $$tool$(exeext) ] ; \
then \
$(MV) $$tool$(exeext) $$tool-cross$(exeext); \
fi; \
done
ada.start.encap:
ada.rest.encap:
ada.man:
ada.srcextra:
ada.srcman:
ada.tags: force
cd $(srcdir)/ada && etags -o TAGS.sub *.c *.h *.ads *.adb && \
etags --include TAGS.sub --include ../TAGS.sub
# Generate documentation.
doc/gnat_ugn.info: ada/gnat_ugn.texi \
$(gcc_docdir)/include/fdl.texi $(gcc_docdir)/include/gcc-common.texi \
gcc-vers.texi
if [ x$(BUILD_INFO) = xinfo ]; then \
rm -f $(@)*; \
$(MAKEINFO) $(MAKEINFOFLAGS) -I$(gcc_docdir)/include \
-I$(srcdir)/ada -o $@ $<; \
else true; fi
doc/gnat_rm.info: ada/gnat_rm.texi $(gcc_docdir)/include/fdl.texi \
$(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
if [ x$(BUILD_INFO) = xinfo ]; then \
rm -f $(@)*; \
$(MAKEINFO) $(MAKEINFOFLAGS) -I$(gcc_docdir)/include \
-I$(srcdir)/ada -o $@ $<; \
else true; fi
doc/gnat-style.info: ada/gnat-style.texi $(gcc_docdir)/include/fdl.texi \
$(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
if [ x$(BUILD_INFO) = xinfo ]; then \
rm -f $(@)*; \
$(MAKEINFO) $(MAKEINFOFLAGS) -I$(gcc_docdir)/include \
-I$(srcdir)/ada -o $@ $<; \
else true; fi
ADA_INFOFILES = doc/gnat_ugn.info doc/gnat_rm.info doc/gnat-style.info
ada.info: $(ADA_INFOFILES)
ada.srcinfo: $(ADA_INFOFILES)
-$(CP) $^ $(srcdir)/doc
ada.install-info: $(DESTDIR)$(infodir)/gnat_ugn.info \
$(DESTDIR)$(infodir)/gnat_rm.info \
$(DESTDIR)$(infodir)/gnat-style.info
ada.dvi: doc/gnat_ugn.dvi \
doc/gnat_rm.dvi doc/gnat-style.dvi
ADA_PDFFILES = doc/gnat_ugn.pdf \
doc/gnat_rm.pdf doc/gnat-style.pdf
ada.pdf: $(ADA_PDFFILES)
ada.install-pdf: $(ADA_PDFFILES)
@$(NORMAL_INSTALL)
test -z "$(pdfdir)/gcc" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)/gcc"
@list='$(ADA_PDFFILES)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(pdf__strip_dir) \
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \
done
ada.html:
ada.install-html:
doc/gnat_ugn.dvi: ada/gnat_ugn.texi \
$(gcc_docdir)/include/fdl.texi \
$(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
$(TEXI2DVI) -c -I $(abs_docdir)/include -o $@ $<
doc/gnat_rm.dvi: ada/gnat_rm.texi $(gcc_docdir)/include/fdl.texi \
$(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
$(TEXI2DVI) -c -I $(abs_docdir)/include -o $@ $<
doc/gnat-style.dvi: ada/gnat-style.texi $(gcc_docdir)/include/fdl.texi
$(TEXI2DVI) -c -I $(abs_docdir)/include -o $@ $<
doc/gnat_ugn.pdf: ada/gnat_ugn.texi \
$(gcc_docdir)/include/fdl.texi \
$(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
$(TEXI2PDF) -c -I $(abs_docdir)/include -o $@ $<
doc/gnat_rm.pdf: ada/gnat_rm.texi $(gcc_docdir)/include/fdl.texi \
$(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
$(TEXI2PDF) -c -I $(abs_docdir)/include -o $@ $<
doc/gnat-style.pdf: ada/gnat-style.texi $(gcc_docdir)/include/fdl.texi
$(TEXI2PDF) -c -I $(abs_docdir)/include -o $@ $<
# Install hooks:
# gnat1 is installed elsewhere as part of $(COMPILERS).
# Install the binder program as gnatbind (native) or $(prefix)gnatbind
# (cross). $(prefix) comes from the --program-prefix configure option,
# or from the --target option if the former is not specified.
# Do the same for the rest of the Ada tools (gnatchop, gnat, gnatkr,
# gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref, gnatfind,
# gnatclean).
# gnatdll is only used on Windows.
# vxaddr2line is only used for cross VxWorks ports (it calls the underlying
# cross addr2line).
ada.install-common:
$(MKDIR) $(DESTDIR)$(bindir)
-if [ -f gnat1$(exeext) ] ; \
then \
for tool in $(ADA_TOOLS) ; do \
install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
$(RM) $(DESTDIR)$(bindir)/$$install_name; \
if [ -f $$tool-cross$(exeext) ] ; \
then \
$(INSTALL_PROGRAM) $$tool-cross$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
else \
$(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
fi ; \
done; \
$(RM) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
$(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
if [ -f vxaddr2line$(exeext) ] ; \
then \
$(RM) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
$(INSTALL_PROGRAM) vxaddr2line$(exeext) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
fi ; \
fi
#
# Finally, install the library
#
-if [ -f gnat1$(exeext) ] ; \
then \
$(MAKE) $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib; \
fi
install-gnatlib:
$(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib$(LIBGNAT_TARGET)
install-gnatlib-obj:
$(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib-obj
ada.install-man:
ada.install-plugin:
ada.uninstall:
for tool in $(ADA_TOOLS) ; do \
install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
-$(RM) $(DESTDIR)$(bindir)/$$install_name; \
done
-$(RM) $(DESTDIR)$(tooldir)/bin/gnatdll$(exeext)
-$(RM) $(DESTDIR)$(tooldir)/bin/vxaddr2line$(exeext)
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
# We just have to delete files specific to us.
ada.mostlyclean:
-$(RM) ada/*$(objext) ada/*.ali ada/b_gnat*.ads ada/b_gnat*.adb
-$(RM) ada/*$(objext).gnatd.n
-$(RM) ada/*$(coverageexts)
-$(RM) ada/sdefault.adb ada/stamp-sdefault ada/stamp-snames
-$(RMDIR) ada/tools
-$(RMDIR) ada/libgnat
-$(RM) gnatbind$(exeext) gnat1$(exeext)
ada.clean:
ada.distclean:
-$(RM) ada/Makefile
-$(RM) gnatchop$(exeext)
-$(RM) gnat$(exeext)
-$(RM) gnatdll$(exeext)
-$(RM) gnatkr$(exeext)
-$(RM) gnatlink$(exeext)
-$(RM) gnatls$(exeext)
-$(RM) gnatmake$(exeext)
-$(RM) gnatname$(exeext)
-$(RM) gnatprep$(exeext)
-$(RM) gnatfind$(exeext)
-$(RM) gnatxref$(exeext)
-$(RM) gnatclean$(exeext)
-$(RM) ada/rts/*
-$(RMDIR) ada/rts
-$(RM) ada/tools/*
-$(RMDIR) ada/tools
ada.maintainer-clean:
-$(RM) ada/sinfo.h
-$(RM) ada/einfo.h
-$(RM) ada/nmake.adb
-$(RM) ada/nmake.ads
-$(RM) ada/treeprs.ads
-$(RM) ada/snames.ads ada/snames.adb ada/snames.h
# Stage hooks:
# The main makefile has already created stage?/ada
ada.stage1: stage1-start
-$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage1/ada
-$(MV) ada/stamp-* stage1/ada
ada.stage2: stage2-start
-$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage2/ada
-$(MV) ada/stamp-* stage2/ada
ada.stage3: stage3-start
-$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage3/ada
-$(MV) ada/stamp-* stage3/ada
ada.stage4: stage4-start
-$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage4/ada
-$(MV) ada/stamp-* stage4/ada
ada.stageprofile: stageprofile-start
-$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stageprofile/ada
-$(MV) ada/stamp-* stageprofile/ada
ada.stagefeedback: stagefeedback-start
-$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stagefeedback/ada
-$(MV) ada/stamp-* stagefeedback/ada
lang_checks += check-gnat
lang_checks_parallelized += check-gnat
# For description see the check_$lang_parallelize comment in gcc/Makefile.in.
check_gnat_parallelize = 1000
check-ada: check-acats check-gnat
check-ada-subtargets: check-acats-subtargets check-gnat-subtargets
ACATSDIR = $(TESTSUITEDIR)/ada/acats
ACATSCMD = run_acats.sh
check_acats_numbers0:=1 2 3 4 5 6 7 8 9
check_acats_numbers1:=0 $(check_acats_numbers0)
check_acats_numbers2:=$(foreach i,$(check_acats_numbers0),$(addprefix $(i),$(check_acats_numbers1)))
check_acats_numbers3:=$(addprefix 0,$(check_acats_numbers1)) $(check_acats_numbers2)
check_acats_numbers4:=$(foreach i,$(check_acats_numbers0),$(addprefix $(i),$(check_acats_numbers3)))
check_acats_numbers5:=$(addprefix 0,$(check_acats_numbers3)) $(check_acats_numbers4)
check_acats_numbers6:=$(foreach i,$(check_acats_numbers0),$(addprefix $(i),$(check_acats_numbers5)))
check_acats_numbers:=$(check_acats_numbers0) $(check_acats_numbers2) $(check_acats_numbers4) $(check_acats_numbers6)
check_acats_subdirs=$(wordlist 1, \
$(if $(GCC_TEST_PARALLEL_SLOTS),$(GCC_TEST_PARALLEL_SLOTS),128), \
$(check_acats_numbers))
check_acats_targets = $(addprefix check-acats, $(check_acats_subdirs))
check-acats:
@test -d $(ACATSDIR) || mkdir -p $(ACATSDIR); \
rootme=`${PWD_COMMAND}`; export rootme; \
EXPECT=$(EXPECT); export EXPECT; \
if [ -z "$(CHAPTERS)" ] && [ -n "$(filter -j%, $(MFLAGS))" ]; \
then \
rm -rf $(ACATSDIR)-parallel; \
mkdir $(ACATSDIR)-parallel; \
( testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
export testdir; \
cd $(ACATSDIR) && $(SHELL) $${testdir}/$(ACATSCMD) NONE ) \
|| exit 1; \
GCC_RUNTEST_PARALLELIZE_DIR=$$rootme/$(ACATSDIR)-parallel; \
export GCC_RUNTEST_PARALLELIZE_DIR; \
$(MAKE) $(check_acats_targets); \
rm -rf $(ACATSDIR)-parallel; \
acats_sums= ; acats_logs= ; \
for idx in "" $(check_acats_subdirs); do \
[ -d $(ACATSDIR)$$idx ] || continue; \
mv -f $(ACATSDIR)$$idx/acats.sum $(ACATSDIR)$$idx/acats.sum.sep; \
mv -f $(ACATSDIR)$$idx/acats.log $(ACATSDIR)$$idx/acats.log.sep; \
acats_sums="$$acats_sums $(ACATSDIR)$$idx/acats.sum.sep"; \
acats_logs="$$acats_logs $(ACATSDIR)$$idx/acats.log.sep"; \
done; \
$(SHELL) $(srcdir)/../contrib/dg-extract-results.sh \
$$acats_sums > $(ACATSDIR)/acats.sum; \
$(SHELL) $(srcdir)/../contrib/dg-extract-results.sh -L \
$$acats_logs > $(ACATSDIR)/acats.log; \
exit 0; \
fi; \
testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
export testdir; cd $(ACATSDIR) && $(SHELL) $${testdir}/$(ACATSCMD) $(CHAPTERS)
check-acats-subtargets:
@echo check-acats
# Parallelized check-acats
$(check_acats_targets): check-acats%:
if [ -f $$GCC_RUNTEST_PARALLELIZE_DIR/finished ]; then \
rm -rf $(ACATSDIR)$*; exit 0; \
fi; \
test -d $(ACATSDIR)$* || mkdir -p $(ACATSDIR)$*; \
testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
export testdir; cd $(ACATSDIR)$* && $(SHELL) $${testdir}/$(ACATSCMD)
touch $$GCC_RUNTEST_PARALLELIZE_DIR/finished
.PHONY: check-acats $(check_acats_targets)
# Compiling object files from source files.
# Ada language specific files.
ada/b_gnat1.adb : $(GNAT1_ADA_OBJS)
# Old gnatbind do not allow a path for -o.
$(GNATBIND) $(ADA_INCLUDES) -o b_gnat1.adb -n ada/gnat1drv.ali
$(MV) b_gnat1.adb b_gnat1.ads ada/
ada/b_gnat1.o : ada/b_gnat1.adb
# Do not use ADAFLAGS to get rid of -gnatg which generates a lot
# of style messages.
$(CC) -c $(CFLAGS) $(ADA_CFLAGS) -gnatp -gnatws $(ADA_INCLUDES) \
$< $(ADA_OUTPUT_OPTION)
ada/b_gnatb.adb : $(GNATBIND_OBJS) ada/gnatbind.o ada/libgnat/interfac.o
# Old gnatbind do not allow a path for -o.
$(GNATBIND) $(ADA_INCLUDES) -o b_gnatb.adb ada/gnatbind.ali
$(MV) b_gnatb.adb b_gnatb.ads ada/
ada/b_gnatb.o : ada/b_gnatb.adb
$(CC) -c $(CFLAGS) $(ADA_CFLAGS) -gnatp -gnatws $(ADA_INCLUDES) \
$< $(ADA_OUTPUT_OPTION)
include $(srcdir)/ada/Make-generated.in
update-sources : ada/treeprs.ads ada/einfo.h ada/sinfo.h ada/nmake.adb \
ada/nmake.ads
$(RM) $(addprefix $(srcdir)/ada/,$(notdir $^))
$(CP) $^ $(srcdir)/ada
ada/sdefault.o : ada/libgnat/ada.ads ada/libgnat/a-except.ads ada/libgnat/a-unccon.ads \
ada/libgnat/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/hostparm.ads ada/namet.ads \
ada/opt.ads ada/osint.ads ada/output.ads ada/sdefault.ads ada/sdefault.adb \
ada/libgnat/s-exctab.ads ada/libgnat/s-memory.ads ada/libgnat/s-os_lib.ads ada/libgnat/s-parame.ads \
ada/libgnat/s-stalib.ads ada/libgnat/s-strops.ads ada/libgnat/s-sopco3.ads ada/libgnat/s-sopco4.ads \
ada/libgnat/s-sopco5.ads ada/libgnat/s-string.ads ada/libgnat/s-traent.ads ada/libgnat/s-unstyp.ads \
ada/libgnat/s-wchcon.ads ada/libgnat/system.ads ada/table.adb ada/table.ads ada/tree_io.ads \
ada/types.ads ada/libgnat/unchdeal.ads ada/libgnat/unchconv.ads
# Special flags - see gcc-interface/Makefile.in for the template.
ada/libgnat/a-except.o : ada/libgnat/a-except.adb ada/libgnat/a-except.ads ada/libgnat/s-excmac.ads ada/libgnat/s-excmac.adb
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
$(ADA_INCLUDES) $< $(ADA_OUTPUT_OPTION)
@$(ADA_DEPS)
ada/libgnat/s-excdeb.o : ada/libgnat/s-excdeb.adb ada/libgnat/s-excdeb.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
$(ADA_INCLUDES) $< $(ADA_OUTPUT_OPTION)
@$(ADA_DEPS)
ada/libgnat/s-assert.o : ada/libgnat/s-assert.adb ada/libgnat/s-assert.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
$< $(ADA_OUTPUT_OPTION)
@$(ADA_DEPS)
ada/libgnat/a-tags.o : ada/libgnat/a-tags.adb ada/libgnat/a-tags.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
$< $(ADA_OUTPUT_OPTION)
@$(ADA_DEPS)
# Handling of gnatvsn version string
# This ensure the build works even if there is no GNAT_DATE present in the
# sources
ada/GNAT_DATE:
touch ada/GNAT_DATE
ada/generated/gnatvsn.ads: ada/gnatvsn.ads BASE-VER ada/GNAT_DATE
$(MKDIR) ada/generated
s=`cat $(srcdir)/BASE-VER | sed -e "s/\([0-9]*\)\.\([0-9]*\)\..*/-\1\2/g"`; \
d=`if test -f $(srcdir)/ada/GNAT_DATE; then \
cat $(srcdir)/ada/GNAT_DATE; else date +%Y%m%d; fi`; \
cat $< | sed -e "/Version/s/(\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*)/($$d$$s)/g" >$@
ada/gnatvsn.o : ada/gnatvsn.adb ada/generated/gnatvsn.ads
$(CC) -c $(ALL_ADAFLAGS) -Iada/generated -I../ada/generated $(ADA_INCLUDES) $< $(ADA_OUTPUT_OPTION)
@$(ADA_DEPS)
# Dependencies for windows specific tool (mdll)
ada/mdll.o : ada/mdll.adb ada/mdll.ads ada/mdll-fil.ads ada/mdll-utl.ads
$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(ADA_OUTPUT_OPTION)
ada/mdll-fil.o : ada/mdll-fil.adb ada/mdll.ads ada/mdll-fil.ads
$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(ADA_OUTPUT_OPTION)
ada/mdll-utl.o : ada/mdll-utl.adb ada/mdll.ads ada/mdll-utl.ads ada/sdefault.ads ada/types.ads
$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(ADA_OUTPUT_OPTION)
ada_generated_files = ada/sinfo.h ada/einfo.h ada/nmake.adb ada/nmake.ads \
ada/treeprs.ads ada/snames.ads ada/snames.adb ada/snames.h \
ada/generated/gnatvsn.ads
# When building from scratch we don't have dependency files, the only thing
# we need to ensure is that the generated files are created first.
$(GNAT1_OBJS) $(GNATBIND_OBJS): | $(ada_generated_files)
# Manually include the auto-generated dependencies for the Ada host objects.
ADA_DEPFILES = $(foreach obj,$(GNAT1_ADA_OBJS) $(GNATBIND_OBJS),\
$(dir $(obj))/$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $(obj))))
-include $(ADA_DEPFILES)
# Automatically include the auto-generated dependencies for the C host objects.
ada_OBJS = $(GNAT1_C_OBJS)
|