Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 1 | subdirs-$(CONFIG_CPU_AMD_AGESA_FAMILY16_KB) += f16kb |
Kyösti Mälkki | 82171ea | 2016-05-12 12:25:08 +0300 | [diff] [blame] | 2 | |
| 3 | ifeq ($(CONFIG_CPU_AMD_AGESA),y) |
| 4 | |
Kyösti Mälkki | 08311f5 | 2016-04-19 07:17:59 +0300 | [diff] [blame] | 5 | subdirs-y += common |
| 6 | |
Kyösti Mälkki | 82171ea | 2016-05-12 12:25:08 +0300 | [diff] [blame] | 7 | classes-y += libagesa |
| 8 | libagesa-y = |
Kyösti Mälkki | a405a58 | 2017-03-02 13:01:58 +0200 | [diff] [blame] | 9 | libagesa-generic-ccopts += -D__LIBAGESA__ |
Kyösti Mälkki | 1210026 | 2017-09-10 08:48:11 +0300 | [diff] [blame] | 10 | libagesa-generic-ccopts += $(AGESA_INC) $(AGESA_AUTOINCLUDES) |
Arthur Heymans | a24bcce | 2022-03-23 21:32:13 +0100 | [diff] [blame] | 11 | libagesa-generic-ccopts += -Wno-pragma-pack -Wno-unused-but-set-variable |
| 12 | libagesa-generic-ccopts += -Wno-implicit-fallthrough |
| 13 | |
| 14 | romstage-generic-ccopts += -Wno-pragma-pack |
| 15 | ramstage-generic-ccopts += -Wno-pragma-pack |
Kyösti Mälkki | 82171ea | 2016-05-12 12:25:08 +0300 | [diff] [blame] | 16 | |
Kyösti Mälkki | a23a038 | 2019-03-20 08:05:42 +0200 | [diff] [blame] | 17 | AGESA_CFLAGS := -march=k8-sse3 -mtune=k8-sse3 -fno-strict-aliasing |
Kyösti Mälkki | dad1cef | 2019-03-18 17:13:48 +0200 | [diff] [blame] | 18 | |
| 19 | CFLAGS_x86_32 += $(AGESA_CFLAGS) |
| 20 | CFLAGS_x86_64 += $(AGESA_CFLAGS) |
| 21 | |
Kyösti Mälkki | 82171ea | 2016-05-12 12:25:08 +0300 | [diff] [blame] | 22 | ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32),y) |
| 23 | $(eval $(call create_class_compiler,libagesa,x86_32)) |
| 24 | else |
| 25 | $(eval $(call create_class_compiler,libagesa,x86_64)) |
| 26 | endif |
| 27 | |
Kyösti Mälkki | 47b9e45 | 2019-02-14 09:05:02 +0200 | [diff] [blame] | 28 | $(obj)/libagesa.a: $$(libagesa-objs) |
| 29 | @printf " AGESA $(subst $(obj)/,,$(@))\n" |
| 30 | $(AR_libagesa) rcsDT $@ $+ |
| 31 | |
| 32 | romstage-libs += $(obj)/libagesa.a |
| 33 | ramstage-libs += $(obj)/libagesa.a |
| 34 | |
Kyösti Mälkki | 1210026 | 2017-09-10 08:48:11 +0300 | [diff] [blame] | 35 | # buildOpts should be in libagesa |
Kyösti Mälkki | c8e4742 | 2017-08-31 08:52:12 +0300 | [diff] [blame] | 36 | $(obj)/romstage/mainboard/$(MAINBOARDDIR)/buildOpts.o: CPPFLAGS_x86_32 += $(BUILDOPTS_INCLUDES) |
| 37 | $(obj)/ramstage/mainboard/$(MAINBOARDDIR)/buildOpts.o: CPPFLAGS_x86_32 += $(BUILDOPTS_INCLUDES) |
| 38 | |
Kyösti Mälkki | 1210026 | 2017-09-10 08:48:11 +0300 | [diff] [blame] | 39 | $(obj)/romstage/vendorcode/amd/agesa/common/agesa-entry.o: CPPFLAGS_x86_32 += $(BUILDOPTS_INCLUDES) |
| 40 | $(obj)/ramstage/vendorcode/amd/agesa/common/agesa-entry.o: CPPFLAGS_x86_32 += $(BUILDOPTS_INCLUDES) |
| 41 | |
Kyösti Mälkki | 82171ea | 2016-05-12 12:25:08 +0300 | [diff] [blame] | 42 | endif |