diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index 5171ff00641181b3d007194f1cd59e755e63b5b7..19b88ad5369c0b8f316401bb7b25b1ba55365c09 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -68,6 +68,13 @@ define add_define DEFINES += -D$(1)$(if $(value $(1)),=$(value $(1)),) endef +# Convenience function for adding build definitions +# $(eval $(call add_define_val,FOO,BAR)) will have: +# -DFOO=BAR +define add_define_val + DEFINES += -D$(1)=$(2) +endef + # Convenience function for verifying option has a boolean value # $(eval $(call assert_boolean,FOO)) will assert FOO is 0 or 1 define assert_boolean