aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/Make-lang.in
blob: 11a97b4d858c6ba944d7bc2f9449def9d430a6b3 (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
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
# 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 -I$(srcdir)/ada -I$(srcdir)/ada/gcc-interface
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 gnatsym

# 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 file by parsing the
# associated ALI file.  We match the lines starting with D to achieve that.
ADA_DEPS=case $@ in \
            *sdefault.o);; \
            *)a="`echo $@ | sed -e 's/.o$$/.ali/'`"; \
                echo "$@: `cat $$a | \
                sed -ne 's;^D \([a-z0-9_\.-]*\).*;ada/\1;gp' | \
                tr -d '\015' | tr '\n' ' '`" > $(dir $@)/$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $@));; \
         esac;

.adb.o:
	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
	@$(ADA_DEPS)

.ads.o:
	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(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

CXX_LFLAGS = \
 -B../../../$(target_noncanonical)/libstdc++-v3/src/.libs \
 -B../../../$(target_noncanonical)/libstdc++-v3/libsupc++/.libs \
 -L../../../$(target_noncanonical)/libstdc++-v3/src/.libs \
 -L../../../$(target_noncanonical)/libstdc++-v3/libsupc++/.libs

# 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="../../xg++ -B../../ $(CXX_LFLAGS)" \
        $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
        ADA_INCLUDES="-I- -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$(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)-gnatmake
  GNATBIND_FOR_HOST=$(host)-gnatbind
  GNATLINK_FOR_HOST=$(host)-gnatlink
  GNATLS_FOR_HOST=$(host)-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../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$(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/seh_init.o ada/targext.o ada/cuintp.o ada/decl.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/a-charac.o	\
 ada/a-chlat1.o	\
 ada/a-elchha.o	\
 ada/a-except.o	\
 ada/a-ioexce.o	\
 ada/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/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_util.o	\
 ada/expander.o	\
 ada/fmap.o	\
 ada/fname-uf.o	\
 ada/fname.o	\
 ada/freeze.o	\
 ada/frontend.o	\
 ada/g-byorma.o	\
 ada/g-hesora.o	\
 ada/g-htable.o	\
 ada/g-spchge.o	\
 ada/g-speche.o	\
 ada/g-u3spch.o	\
 ada/get_spark_xrefs.o	\
 ada/get_targ.o	\
 ada/gnat.o	\
 ada/gnatvsn.o	\
 ada/hostparm.o	\
 ada/impunit.o	\
 ada/inline.o	\
 ada/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_spark_xrefs.o	\
 ada/put_scos.o	\
 ada/repinfo.o	\
 ada/restrict.o	\
 ada/rident.o	\
 ada/rtsfind.o	\
 ada/s-addope.o	\
 ada/s-assert.o	\
 ada/s-bitops.o	\
 ada/s-carun8.o	\
 ada/s-casuti.o	\
 ada/s-conca2.o	\
 ada/s-conca3.o	\
 ada/s-conca4.o	\
 ada/s-conca5.o	\
 ada/s-conca6.o	\
 ada/s-conca7.o	\
 ada/s-conca8.o	\
 ada/s-conca9.o	\
 ada/s-crc32.o	\
 ada/s-crtl.o	\
 ada/s-excdeb.o	\
 ada/s-except.o	\
 ada/s-exctab.o	\
 ada/s-htable.o	\
 ada/s-imenne.o	\
 ada/s-imgenu.o	\
 ada/s-mastop.o	\
 ada/s-memory.o	\
 ada/s-os_lib.o	\
 ada/s-parame.o	\
 ada/s-purexc.o	\
 ada/s-restri.o	\
 ada/s-secsta.o	\
 ada/s-soflin.o	\
 ada/s-sopco3.o	\
 ada/s-sopco4.o	\
 ada/s-sopco5.o	\
 ada/s-stache.o	\
 ada/s-stalib.o	\
 ada/s-stoele.o	\
 ada/s-strcom.o	\
 ada/s-strhas.o	\
 ada/s-string.o	\
 ada/s-strops.o	\
 ada/s-traent.o	\
 ada/s-unstyp.o	\
 ada/s-utf_32.o	\
 ada/s-valint.o	\
 ada/s-valuns.o	\
 ada/s-valuti.o	\
 ada/s-wchcnv.o	\
 ada/s-wchcon.o	\
 ada/s-wchjis.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_type.o	\
 ada/sem_util.o	\
 ada/sem_vfpt.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/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/a-clrefi.o   \
 ada/a-comlin.o   \
 ada/a-elchha.o   \
 ada/a-except.o   \
 ada/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/g-byorma.o   \
 ada/g-hesora.o   \
 ada/g-htable.o   \
 ada/gnat.o       \
 ada/gnatbind.o   \
 ada/gnatvsn.o    \
 ada/hostparm.o   \
 ada/init.o       \
 ada/initialize.o \
 ada/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/restrict.o   \
 ada/rident.o     \
 ada/s-addope.o   \
 ada/s-assert.o   \
 ada/s-carun8.o   \
 ada/s-casuti.o   \
 ada/s-conca2.o   \
 ada/s-conca3.o   \
 ada/s-conca4.o   \
 ada/s-conca5.o   \
 ada/s-conca6.o   \
 ada/s-conca7.o   \
 ada/s-conca8.o   \
 ada/s-conca9.o   \
 ada/s-crc32.o    \
 ada/s-crtl.o     \
 ada/s-excdeb.o   \
 ada/s-except.o   \
 ada/s-exctab.o   \
 ada/s-htable.o   \
 ada/s-imenne.o   \
 ada/s-imgenu.o   \
 ada/s-mastop.o   \
 ada/s-memory.o   \
 ada/s-os_lib.o   \
 ada/s-parame.o   \
 ada/s-restri.o   \
 ada/s-secsta.o   \
 ada/s-soflin.o   \
 ada/s-sopco3.o   \
 ada/s-sopco4.o   \
 ada/s-sopco5.o   \
 ada/s-stache.o   \
 ada/s-stalib.o   \
 ada/s-stoele.o   \
 ada/s-strhas.o   \
 ada/s-string.o   \
 ada/s-strops.o   \
 ada/s-traent.o   \
 ada/s-unstyp.o   \
 ada/s-utf_32.o   \
 ada/s-wchcnv.o   \
 ada/s-wchcon.o   \
 ada/s-wchjis.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/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 =

# 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.

ada/doctools/xgnatugn$(build_exeext): ada/xgnatugn.adb
	-$(MKDIR) ada/doctools
	$(CP) $^ ada/doctools
	cd ada/doctools && gnatmake -q xgnatugn

# Note that doc/gnat_ugn.texi and doc/projects.texi do not depend on
# xgnatugn being built so we can distribute a pregenerated doc/gnat_ugn.info

doc/gnat_ugn.texi: $(srcdir)/ada/gnat_ugn.texi $(srcdir)/ada/ug_words \
   doc/projects.texi $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
	$(MAKE) ada/doctools/xgnatugn$(build_exeext)
	ada/doctools/xgnatugn unw $(srcdir)/ada/gnat_ugn.texi \
	   $(srcdir)/ada/ug_words doc/gnat_ugn.texi

doc/projects.texi: $(srcdir)/ada/projects.texi
	$(MAKE) ada/doctools/xgnatugn$(build_exeext)
	ada/doctools/xgnatugn unw $(srcdir)/ada/projects.texi \
	   $(srcdir)/ada/ug_words doc/projects.texi

doc/gnat_ugn.info: doc/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_ugn.texi \
                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: doc/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: doc/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, gnatsym).
# gnatsym is only built on some platforms, including VMS.
# 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/*$(coverageexts)
	-$(RM) ada/sdefault.adb ada/stamp-sdefault ada/stamp-snames
	-$(RMDIR) ada/tools
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) gnatsym$(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

check-ada: check-acats check-gnat
check-ada-subtargets: check-acats-subtargets check-gnat-subtargets

ACATSDIR = $(TESTSUITEDIR)/ada/acats

check_acats_targets = $(patsubst %,check-acats%, 0 1 2)

check-acats:
	@test -d $(ACATSDIR) || mkdir -p $(ACATSDIR); \
	rootme=`${PWD_COMMAND}`; export rootme; \
	EXPECT=$(EXPECT); export EXPECT; \
	if [ -z "$(CHAPTERS)" ] && [ "$(filter -j, $(MFLAGS))" = "-j" ]; \
	then \
	  $(MAKE) $(check_acats_targets); \
	  for idx in 0 1 2; do \
	    mv -f $(ACATSDIR)$$idx/acats.sum $(ACATSDIR)$$idx/acats.sum.sep; \
	    mv -f $(ACATSDIR)$$idx/acats.log $(ACATSDIR)$$idx/acats.log.sep; \
	  done; \
	  $(SHELL) $(srcdir)/../contrib/dg-extract-results.sh \
	    $(ACATSDIR)0/acats.sum.sep $(ACATSDIR)1/acats.sum.sep \
	    $(ACATSDIR)2/acats.sum.sep > $(ACATSDIR)/acats.sum; \
	  $(SHELL) $(srcdir)/../contrib/dg-extract-results.sh -L \
	    $(ACATSDIR)0/acats.log.sep $(ACATSDIR)1/acats.log.sep \
	    $(ACATSDIR)2/acats.log.sep > $(ACATSDIR)/acats.log; \
	  exit 0; \
	fi; \
	testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
	export testdir; cd $(ACATSDIR) && $(SHELL) $${testdir}/run_acats $(CHAPTERS)

check-acats-subtargets:
	@echo $(check_acats_targets)

# Parallelized check-acats
$(check_acats_targets): check-acats%:
	test -d $(ACATSDIR)$* || mkdir -p $(ACATSDIR)$*; \
	testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
	case "$*" in \
	  0) chapters="`cd $$testdir/tests; echo [a-b]* c[0-4]*`";; \
	  1) chapters="`cd $$testdir/tests; echo c[5-9ab]*`";; \
	  2) chapters="`cd $$testdir/tests; echo c[c-z]* [d-z]*`";; \
	esac; \
	export testdir; cd $(ACATSDIR)$* && $(SHELL) $${testdir}/run_acats $$chapters

.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) \
	    $< $(OUTPUT_OPTION)

ada/b_gnatb.adb : $(GNATBIND_OBJS) ada/gnatbind.o ada/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) \
	    $< $(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/ada.ads ada/a-except.ads ada/a-unccon.ads \
   ada/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/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
   ada/s-stalib.ads ada/s-strops.ads ada/s-sopco3.ads ada/s-sopco4.ads \
   ada/s-sopco5.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
   ada/s-wchcon.ads ada/system.ads ada/table.adb ada/table.ads ada/tree_io.ads \
   ada/types.ads ada/unchdeal.ads ada/unchconv.ads

# Special flags - see gcc-interface/Makefile.in for the template.

ada/a-except.o  : ada/a-except.adb ada/a-except.ads
	$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
	 $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
	@$(ADA_DEPS)

ada/s-excdeb.o  : ada/s-excdeb.adb ada/s-excdeb.ads
	$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
	 $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
	@$(ADA_DEPS)

ada/s-assert.o  : ada/s-assert.adb ada/s-assert.ads
	$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
	  $< $(OUTPUT_OPTION)
	@$(ADA_DEPS)

ada/a-tags.o  : ada/a-tags.adb ada/a-tags.ads
	$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
	  $< $(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) $< $(OUTPUT_OPTION)

ada/mdll-fil.o : ada/mdll-fil.adb ada/mdll.ads ada/mdll-fil.ads
	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(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) $< $(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

# 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_ADA_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)