Commit 8eadeb4a authored by Soren Brinkmann's avatar Soren Brinkmann
Browse files

build_macros: Add 'add_define_val' macro



Add a convenience macro to add a build definition with a value.
Signed-off-by: default avatarSoren Brinkmann <soren.brinkmann@xilinx.com>
parent 2ba68959
...@@ -68,6 +68,13 @@ define add_define ...@@ -68,6 +68,13 @@ define add_define
DEFINES += -D$(1)$(if $(value $(1)),=$(value $(1)),) DEFINES += -D$(1)$(if $(value $(1)),=$(value $(1)),)
endef 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 # Convenience function for verifying option has a boolean value
# $(eval $(call assert_boolean,FOO)) will assert FOO is 0 or 1 # $(eval $(call assert_boolean,FOO)) will assert FOO is 0 or 1
define assert_boolean define assert_boolean
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment