1 ## SPDX-License-Identifier: GPL-2.0-only
3 define libgnat-template
6 additional-dirs += $$(obj)/libgnat-$(1)/adainclude
7 additional-dirs += $$(obj)/libgnat-$(1)/adalib
9 ADAFLAGS_libgnat-$(1) := \
10 --RTS=$$(obj)/libgnat-$(1)/ \
14 $$(GCC_ADAFLAGS_$(1)) \
18 libgnat-$(1)-y += a-unccon.ads
19 libgnat-$(1)-y += ada.ads
20 libgnat-$(1)-y += g-souinf.ads
21 libgnat-$(1)-y += gnat.ads
22 libgnat-$(1)-y += i-c.adb
23 libgnat-$(1)-y += i-c.ads
24 libgnat-$(1)-y += interfac.ads
25 libgnat-$(1)-y += s-atacco.ads
26 libgnat-$(1)-y += s-imenne.adb
27 libgnat-$(1)-y += s-imenne.ads
28 libgnat-$(1)-y += s-maccod.ads
29 libgnat-$(1)-y += s-parame.ads
30 libgnat-$(1)-y += s-stoele.adb
31 libgnat-$(1)-y += s-stoele.ads
32 libgnat-$(1)-y += s-unstyp.ads
33 libgnat-$(1)-y += system.ads
35 # Copy bodies too for inlining
36 $$(obj)/libgnat-$(1)/libgnat.a: $$$$(libgnat-$(1)-objs)
37 cp $$(libgnat-$(1)-srcs) $$(libgnat-$(1)-extra-specs) \
38 $$(obj)/libgnat-$(1)/adainclude/
39 cp $$(libgnat-$(1)-alis) \
40 $$(obj)/libgnat-$(1)/adalib/
42 @printf " AR $$(subst $$(obj)/,,$$(@))\n"
43 $$(AR_libgnat-$(1)) cr $$@ $$^
48 $(foreach arch,$(standard-archs), \
49 $(eval $(call define_class,libgnat-$(arch),$(arch))))
51 $(foreach arch,$(standard-archs), \
52 $(eval $(call libgnat-template,$(arch))))
54 ifeq ($(CONFIG_ROMSTAGE_ADA),y)
55 romstage-libs += $(obj)/libgnat-$(ARCH-romstage-y)/libgnat.a
57 ifeq ($(CONFIG_RAMSTAGE_ADA),y)
58 ramstage-libs += $(obj)/libgnat-$(ARCH-ramstage-y)/libgnat.a