Nico Huber | be5492a | 2015-09-29 16:41:19 +0200 | [diff] [blame] | 1 | ## |
| 2 | ## This file is part of the coreboot project. |
| 3 | ## |
| 4 | ## Copyright (C) 2016 Nico Huber <nico.h@gmx.de> |
| 5 | ## |
| 6 | ## This program is free software; you can redistribute it and/or modify |
| 7 | ## it under the terms of the GNU General Public License as published by |
| 8 | ## the Free Software Foundation; version 2 of the License. |
| 9 | ## |
| 10 | ## This program is distributed in the hope that it will be useful, |
| 11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | ## GNU General Public License for more details. |
| 14 | ## |
| 15 | |
| 16 | define libgnat-template |
| 17 | # $1 arch |
| 18 | |
| 19 | additional-dirs += $$(obj)/libgnat-$(1)/adainclude |
| 20 | additional-dirs += $$(obj)/libgnat-$(1)/adalib |
| 21 | |
| 22 | ADAFLAGS_libgnat-$(1) := \ |
| 23 | --RTS=$$(obj)/libgnat-$(1)/ \ |
| 24 | -gnatg \ |
| 25 | -gnatpg \ |
| 26 | -I$$(src)/lib/gnat/ \ |
| 27 | |
| 28 | libgnat-$(1)-y += a-unccon.ads |
| 29 | libgnat-$(1)-y += ada.ads |
| 30 | libgnat-$(1)-y += g-souinf.ads |
| 31 | libgnat-$(1)-y += gnat.ads |
| 32 | libgnat-$(1)-y += i-c.adb |
| 33 | libgnat-$(1)-y += i-c.ads |
| 34 | libgnat-$(1)-y += interfac.ads |
| 35 | libgnat-$(1)-y += s-atacco.ads |
| 36 | libgnat-$(1)-y += s-imenne.adb |
| 37 | libgnat-$(1)-y += s-imenne.ads |
| 38 | libgnat-$(1)-y += s-maccod.ads |
| 39 | libgnat-$(1)-y += s-parame.ads |
| 40 | libgnat-$(1)-y += s-stoele.adb |
| 41 | libgnat-$(1)-y += s-stoele.ads |
| 42 | libgnat-$(1)-y += s-unstyp.ads |
| 43 | libgnat-$(1)-y += system.ads |
| 44 | |
| 45 | # Copy bodies too for inlining |
| 46 | $$(obj)/libgnat-$(1)/libgnat.a: $$$$(libgnat-$(1)-objs) |
| 47 | cp $$(libgnat-$(1)-srcs) $$(libgnat-$(1)-extra-specs) \ |
| 48 | $$(obj)/libgnat-$(1)/adainclude/ |
| 49 | cp $$(libgnat-$(1)-alis) \ |
| 50 | $$(obj)/libgnat-$(1)/adalib/ |
| 51 | rm -f $$@ |
| 52 | @printf " AR $$(subst $$(obj)/,,$$(@))\n" |
| 53 | $$(AR_libgnat-$(1)) cr $$@ $$^ |
| 54 | |
| 55 | endef |
| 56 | |
| 57 | |
| 58 | $(foreach arch,$(standard-archs), \ |
| 59 | $(eval $(call define_class,libgnat-$(arch),$(arch)))) |
| 60 | |
| 61 | $(foreach arch,$(standard-archs), \ |
| 62 | $(eval $(call libgnat-template,$(arch)))) |
Nico Huber | e0ed902 | 2016-10-07 12:58:17 +0200 | [diff] [blame] | 63 | |
| 64 | ifeq ($(CONFIG_RAMSTAGE_ADA),y) |
| 65 | ramstage-libs += $$(obj)/libgnat-$(ARCH-ramstage-y)/libgnat.a |
| 66 | endif |