Makefile: Delay expansion of `$(ADAFLAGS)`
This allows users of this library to extend `ADAFLAGS` from within their
Makefile. The added flexibility makes this a very well spent dollar :-)
Change-Id: I873d3eea48549e6945c4229b50c2318a3711bc4d
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/libhwbase/+/43557
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/Makefile b/Makefile
index 14a7d4f..01e2aae 100644
--- a/Makefile
+++ b/Makefile
@@ -238,7 +238,7 @@
$(2) $(3)%.o: %.$(1)
@printf " COMPILE $$(subst $(obj)/,,$$@)\n"
$(CC) \
- $(if $(4),$(4),$(ADAFLAGS)) \
+ $(if $(4),$(4),$$(ADAFLAGS)) \
$(addprefix -I,$($(name)-ada-dirs) $($(name)-extra-incs)) \
-c -o $$@ $$<
endef