arm-trusted-firmware/plat/qemu
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
..
aarch64 Add support for QEMU virt ARMv8-A target 2016-06-09 11:23:28 +02:00
include qemu: remove unused BL32_SIZE 2017-01-18 19:33:41 +09:00
dt.c Add support for QEMU virt ARMv8-A target 2016-06-09 11:23:28 +02:00
platform.mk Migrate platform makefile to new console driver location 2016-08-09 17:33:57 +01:00
qemu_bl1_setup.c Move BL_COHERENT_RAM_BASE/END defines to common_def.h 2017-01-18 19:33:41 +09:00
qemu_bl2_setup.c Move BL_COHERENT_RAM_BASE/END defines to common_def.h 2017-01-18 19:33:41 +09:00
qemu_bl31_setup.c Move BL_COHERENT_RAM_BASE/END defines to common_def.h 2017-01-18 19:33:41 +09:00
qemu_common.c Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00
qemu_gic.c Add support for QEMU virt ARMv8-A target 2016-06-09 11:23:28 +02:00
qemu_io_storage.c Add support for QEMU virt ARMv8-A target 2016-06-09 11:23:28 +02:00
qemu_pm.c Add support for QEMU virt ARMv8-A target 2016-06-09 11:23:28 +02:00
qemu_private.h Add support for QEMU virt ARMv8-A target 2016-06-09 11:23:28 +02:00
topology.c Add support for QEMU virt ARMv8-A target 2016-06-09 11:23:28 +02:00