arm-trusted-firmware/plat/arm/board/common
Masahiro Yamada 3d8256b2a1 Use #ifdef for IMAGE_BL* instead of #if
One nasty part of ATF is some of boolean macros are always defined
as 1 or 0, and the rest of them are only defined under certain
conditions.

For the former group, "#if FOO" or "#if !FOO" must be used because
"#ifdef FOO" is always true.  (Options passed by $(call add_define,)
are the cases.)

For the latter, "#ifdef FOO" or "#ifndef FOO" should be used because
checking the value of an undefined macro is strange.

Here, IMAGE_BL* is handled by make_helpers/build_macro.mk like
follows:

  $(eval IMAGE := IMAGE_BL$(call uppercase,$(3)))

  $(OBJ): $(2)
          @echo "  CC      $$<"
          $$(Q)$$(CC) $$(TF_CFLAGS) $$(CFLAGS) -D$(IMAGE) -c $$< -o $$@

This means, IMAGE_BL* is defined when building the corresponding
image, but *undefined* for the other images.

So, IMAGE_BL* belongs to the latter group where we should use #ifdef
or #ifndef.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-24 01:01:21 +09:00
..
aarch32 AArch32: Common changes needed for BL1/BL2 2016-09-21 16:27:15 +01:00
aarch64 Add common ARM and CSS platform code 2015-04-28 19:50:56 +01:00
drivers/norflash Add basic NOR flash driver for ARM platforms 2015-11-27 09:34:20 +00:00
rotpk TBB: add platform API to read the ROTPK information 2015-06-25 08:53:26 +01:00
board_arm_trusted_boot.c Implement plat_set_nv_ctr for FVP platforms 2016-06-03 11:17:03 +01:00
board_common.mk AArch32: Common changes needed for BL1/BL2 2016-09-21 16:27:15 +01:00
board_css.mk TBB: add platform API to read the ROTPK information 2015-06-25 08:53:26 +01:00
board_css_common.c Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00