diff --git a/Makefile b/Makefile
index 3064aa4e454e1614f54def4c7eaf79d5d8987d9d..93f89415aece632a8b7f5b7b365fbe300cb1b83e 100644
--- a/Makefile
+++ b/Makefile
@@ -83,6 +83,19 @@ PLATFORMS		:=	$(shell ls -I common plat/)
 SPDS			:=	$(shell ls -I none services/spd)
 HELP_PLATFORMS		:=	$(shell echo ${PLATFORMS} | sed 's/ /|/g')
 
+# Convenience function for adding build definitions
+# $(eval $(call add_define,FOO)) will have:
+# -DFOO if $(FOO) is empty; -DFOO=$(FOO) otherwise
+define add_define
+DEFINES			+=	-D$(1)$(if $(value $(1)),=$(value $(1)),)
+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
+$(and $(patsubst 0,,$(value $(1))),$(patsubst 1,,$(value $(1))),$(error $(1) must be boolean))
+endef
+
 ifeq (${PLAT},)
   $(error "Error: Unknown platform. Please use PLAT=<platform name> to specify the platform.")
 endif
@@ -131,7 +144,6 @@ endif
 .PHONY:			all msg_start clean realclean distclean cscope locate-checkpatch checkcodebase checkpatch fiptool fip
 .SUFFIXES:
 
-
 INCLUDES		+=	-Iinclude/bl1			\
 				-Iinclude/bl2			\
 				-Iinclude/bl31			\