mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 02:24:18 +00:00
Remove vpath usage in makefiles
Remove all usage of the vpath keyword in makefiles as it was prone to mistakes. Specify the relative paths to source files instead. Also reorder source files in makefiles alphabetically. Fixes ARM-software/tf-issues#121 Change-Id: Id15f60655444bae60e0e2165259efac71a50928b
This commit is contained in:
parent
35e98e5588
commit
bee8241711
8 changed files with 86 additions and 188 deletions
23
Makefile
23
Makefile
|
@ -59,14 +59,14 @@ else
|
||||||
BUILD_TYPE := release
|
BUILD_TYPE := release
|
||||||
endif
|
endif
|
||||||
|
|
||||||
BL_COMMON_SOURCES := misc_helpers.S \
|
BL_COMMON_SOURCES := common/bl_common.c \
|
||||||
cache_helpers.S \
|
lib/aarch64/cache_helpers.S \
|
||||||
tlb_helpers.S \
|
lib/aarch64/misc_helpers.S \
|
||||||
xlat_helpers.c \
|
lib/aarch64/tlb_helpers.S \
|
||||||
std.c \
|
lib/aarch64/xlat_helpers.c \
|
||||||
bl_common.c \
|
lib/stdlib/std.c \
|
||||||
platform_helpers.S \
|
lib/io_storage.c \
|
||||||
io_storage.c
|
plat/common/aarch64/platform_helpers.S
|
||||||
|
|
||||||
ARCH ?= aarch64
|
ARCH ?= aarch64
|
||||||
|
|
||||||
|
@ -161,13 +161,6 @@ LDFLAGS += --fatal-warnings -O1
|
||||||
LDFLAGS += --gc-sections
|
LDFLAGS += --gc-sections
|
||||||
|
|
||||||
|
|
||||||
vpath %.ld.S bl1:bl2:bl31
|
|
||||||
vpath %.c bl1:bl2:bl31
|
|
||||||
vpath %.c bl1/${ARCH}:bl2/${ARCH}:bl31/${ARCH}
|
|
||||||
vpath %.S bl1/${ARCH}:bl2/${ARCH}:bl31/${ARCH}
|
|
||||||
vpath %.c lib/arch/${ARCH} # One of the missing paths needed for BL_COMMON_SOURCES
|
|
||||||
|
|
||||||
|
|
||||||
ifneq (${DEBUG}, 0)
|
ifneq (${DEBUG}, 0)
|
||||||
#CFLAGS += -g -O0
|
#CFLAGS += -g -O0
|
||||||
CFLAGS += -g
|
CFLAGS += -g
|
||||||
|
|
24
bl1/bl1.mk
24
bl1/bl1.mk
|
@ -28,22 +28,10 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
vpath %.c plat/${PLAT} \
|
BL1_SOURCES += bl1/bl1_main.c \
|
||||||
plat/${PLAT}/${ARCH} \
|
bl1/aarch64/bl1_arch_setup.c \
|
||||||
common \
|
bl1/aarch64/bl1_entrypoint.S \
|
||||||
lib \
|
bl1/aarch64/bl1_exceptions.S \
|
||||||
lib/${ARCH} \
|
lib/aarch64/cpu_helpers.S
|
||||||
${PLAT_BL1_C_VPATH}
|
|
||||||
|
|
||||||
vpath %.S plat/common/${ARCH} \
|
BL1_LINKERFILE := bl1/bl1.ld.S
|
||||||
plat/${PLAT}/${ARCH} \
|
|
||||||
lib/${ARCH} \
|
|
||||||
${PLAT_BL1_S_VPATH}
|
|
||||||
|
|
||||||
BL1_SOURCES += bl1_arch_setup.c \
|
|
||||||
bl1_entrypoint.S \
|
|
||||||
bl1_exceptions.S \
|
|
||||||
bl1_main.c \
|
|
||||||
cpu_helpers.S
|
|
||||||
|
|
||||||
BL1_LINKERFILE := bl1.ld.S
|
|
||||||
|
|
25
bl2/bl2.mk
25
bl2/bl2.mk
|
@ -28,23 +28,10 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
vpath %.c common \
|
BL2_SOURCES += bl2/bl2_main.c \
|
||||||
lib \
|
bl2/aarch64/bl2_entrypoint.S \
|
||||||
plat/${PLAT} \
|
bl2/aarch64/bl2_arch_setup.c \
|
||||||
plat/${PLAT}/${ARCH} \
|
common/aarch64/early_exceptions.S \
|
||||||
${PLAT_BL2_C_VPATH}
|
lib/locks/exclusive/spinlock.S
|
||||||
|
|
||||||
vpath %.S lib/${ARCH} \
|
BL2_LINKERFILE := bl2/bl2.ld.S
|
||||||
lib/locks/exclusive \
|
|
||||||
common/${ARCH} \
|
|
||||||
${PLAT_BL2_S_VPATH}
|
|
||||||
|
|
||||||
BL2_SOURCES += bl2_entrypoint.S \
|
|
||||||
bl2_arch_setup.c \
|
|
||||||
bl2_main.c \
|
|
||||||
spinlock.S \
|
|
||||||
early_exceptions.S
|
|
||||||
|
|
||||||
BL2_LINKERFILE := bl2.ld.S
|
|
||||||
|
|
||||||
CFLAGS += $(DEFINES)
|
|
||||||
|
|
59
bl31/bl31.mk
59
bl31/bl31.mk
|
@ -28,44 +28,23 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
vpath %.c common \
|
BL31_SOURCES += bl31/bl31_main.c \
|
||||||
lib \
|
bl31/context_mgmt.c \
|
||||||
drivers/arm/gic \
|
bl31/runtime_svc.c \
|
||||||
plat/${PLAT} \
|
bl31/aarch64/bl31_arch_setup.c \
|
||||||
services/std_svc \
|
bl31/aarch64/bl31_entrypoint.S \
|
||||||
services/std_svc/psci \
|
bl31/aarch64/context.S \
|
||||||
lib/locks/bakery \
|
bl31/aarch64/runtime_exceptions.S \
|
||||||
plat/${PLAT}/${ARCH} \
|
common/aarch64/early_exceptions.S \
|
||||||
${PLAT_BL31_C_VPATH}
|
lib/locks/bakery/bakery_lock.c \
|
||||||
|
lib/locks/exclusive/spinlock.S \
|
||||||
|
services/std_svc/std_svc_setup.c \
|
||||||
|
services/std_svc/psci/psci_afflvl_off.c \
|
||||||
|
services/std_svc/psci/psci_afflvl_on.c \
|
||||||
|
services/std_svc/psci/psci_afflvl_suspend.c \
|
||||||
|
services/std_svc/psci/psci_common.c \
|
||||||
|
services/std_svc/psci/psci_entry.S \
|
||||||
|
services/std_svc/psci/psci_main.c \
|
||||||
|
services/std_svc/psci/psci_setup.c
|
||||||
|
|
||||||
vpath %.S lib/${ARCH} \
|
BL31_LINKERFILE := bl31/bl31.ld.S
|
||||||
services/std_svc \
|
|
||||||
services/std_svc/psci \
|
|
||||||
plat/${PLAT}/${ARCH} \
|
|
||||||
lib/locks/exclusive \
|
|
||||||
plat/common/${ARCH} \
|
|
||||||
drivers/arm/gic/${ARCH} \
|
|
||||||
common/${ARCH} \
|
|
||||||
${PLAT_BL31_S_VPATH}
|
|
||||||
|
|
||||||
BL31_SOURCES += bl31_arch_setup.c \
|
|
||||||
bl31_entrypoint.S \
|
|
||||||
runtime_exceptions.S \
|
|
||||||
bl31_main.c \
|
|
||||||
std_svc_setup.c \
|
|
||||||
psci_entry.S \
|
|
||||||
psci_setup.c \
|
|
||||||
psci_common.c \
|
|
||||||
psci_afflvl_on.c \
|
|
||||||
psci_main.c \
|
|
||||||
psci_afflvl_off.c \
|
|
||||||
psci_afflvl_suspend.c \
|
|
||||||
spinlock.S \
|
|
||||||
gic_v3_sysregs.S \
|
|
||||||
bakery_lock.c \
|
|
||||||
runtime_svc.c \
|
|
||||||
early_exceptions.S \
|
|
||||||
context_mgmt.c \
|
|
||||||
context.S
|
|
||||||
|
|
||||||
BL31_LINKERFILE := bl31.ld.S
|
|
||||||
|
|
|
@ -28,11 +28,7 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
vpath %.c ${PLAT_BL2_C_VPATH}
|
|
||||||
vpath %.S ${PLAT_BL2_S_VPATH}
|
|
||||||
|
|
||||||
# TSP source files specific to FVP platform
|
# TSP source files specific to FVP platform
|
||||||
BL32_SOURCES += bl32_plat_setup.c \
|
BL32_SOURCES += plat/common/aarch64/platform_mp_stack.S \
|
||||||
platform_mp_stack.S \
|
plat/fvp/bl32_plat_setup.c \
|
||||||
plat_common.c
|
plat/fvp/aarch64/plat_common.c
|
||||||
|
|
|
@ -28,27 +28,13 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
vpath %.c common \
|
BL32_SOURCES += bl32/tsp/tsp_main.c \
|
||||||
lib \
|
bl32/tsp/aarch64/tsp_entrypoint.S \
|
||||||
plat/${PLAT} \
|
bl32/tsp/aarch64/tsp_request.S \
|
||||||
plat/${PLAT}/${ARCH} \
|
common/aarch64/early_exceptions.S \
|
||||||
|
lib/locks/exclusive/spinlock.S
|
||||||
|
|
||||||
vpath %.S lib/${ARCH} \
|
BL32_LINKERFILE := bl32/tsp/tsp.ld.S
|
||||||
lib/locks/exclusive \
|
|
||||||
common/${ARCH}
|
|
||||||
|
|
||||||
BL32_SOURCES += tsp_entrypoint.S \
|
|
||||||
tsp_main.c \
|
|
||||||
tsp_request.S \
|
|
||||||
spinlock.S \
|
|
||||||
early_exceptions.S
|
|
||||||
|
|
||||||
BL32_LINKERFILE := tsp.ld.S
|
|
||||||
|
|
||||||
vpath %.ld.S ${BL32_ROOT}
|
|
||||||
vpath %.c ${BL32_ROOT}
|
|
||||||
vpath %.c ${BL32_ROOT}/${ARCH}
|
|
||||||
vpath %.S ${BL32_ROOT}/${ARCH}
|
|
||||||
|
|
||||||
# Include the platform-specific TSP Makefile
|
# Include the platform-specific TSP Makefile
|
||||||
# If no platform-specific TSP Makefile exists, it means TSP is not supported
|
# If no platform-specific TSP Makefile exists, it means TSP is not supported
|
||||||
|
|
|
@ -33,68 +33,40 @@
|
||||||
#
|
#
|
||||||
# PLAT_INCLUDES :=
|
# PLAT_INCLUDES :=
|
||||||
|
|
||||||
PLAT_BL1_C_VPATH := drivers/arm/cci400 \
|
PLAT_BL_COMMON_SOURCES := drivers/arm/pl011/pl011.c \
|
||||||
drivers/arm/pl011 \
|
drivers/arm/pl011/pl011_console.c \
|
||||||
lib/${ARCH} \
|
drivers/io/io_fip.c \
|
||||||
lib/semihosting \
|
drivers/io/io_memmap.c \
|
||||||
lib/stdlib \
|
drivers/io/io_semihosting.c \
|
||||||
drivers/io
|
lib/mmio.c \
|
||||||
|
lib/aarch64/sysreg_helpers.S \
|
||||||
|
lib/aarch64/xlat_tables.c \
|
||||||
|
lib/semihosting/semihosting.c \
|
||||||
|
lib/semihosting/aarch64/semihosting_call.S \
|
||||||
|
plat/fvp/plat_io_storage.c
|
||||||
|
|
||||||
PLAT_BL1_S_VPATH := lib/semihosting/${ARCH}
|
BL1_SOURCES += drivers/arm/cci400/cci400.c \
|
||||||
|
plat/common/aarch64/platform_up_stack.S \
|
||||||
|
plat/fvp/bl1_plat_setup.c \
|
||||||
|
plat/fvp/aarch64/bl1_plat_helpers.S \
|
||||||
|
plat/fvp/aarch64/plat_common.c \
|
||||||
|
plat/fvp/aarch64/plat_helpers.S
|
||||||
|
|
||||||
PLAT_BL2_C_VPATH := drivers/arm/cci400 \
|
BL2_SOURCES += drivers/arm/tzc400/tzc400.c \
|
||||||
drivers/arm/pl011 \
|
plat/common/aarch64/platform_up_stack.S \
|
||||||
drivers/arm/tzc400 \
|
plat/fvp/bl2_plat_setup.c \
|
||||||
lib/${ARCH} \
|
plat/fvp/plat_security.c \
|
||||||
lib/stdlib \
|
plat/fvp/aarch64/plat_common.c
|
||||||
lib/semihosting \
|
|
||||||
drivers/io
|
|
||||||
|
|
||||||
PLAT_BL2_S_VPATH := lib/semihosting/${ARCH}
|
BL31_SOURCES += drivers/arm/gic/gic_v2.c \
|
||||||
|
drivers/arm/gic/gic_v3.c \
|
||||||
PLAT_BL31_C_VPATH := drivers/arm/cci-400 \
|
drivers/arm/gic/aarch64/gic_v3_sysregs.S \
|
||||||
drivers/arm/pl011 \
|
drivers/arm/cci400/cci400.c \
|
||||||
lib/${ARCH} \
|
plat/common/aarch64/platform_mp_stack.S \
|
||||||
lib/semihosting \
|
plat/fvp/bl31_plat_setup.c \
|
||||||
lib/stdlib \
|
plat/fvp/plat_gic.c \
|
||||||
drivers/io \
|
plat/fvp/plat_pm.c \
|
||||||
plat/fvp/drivers/pwrc
|
plat/fvp/plat_topology.c \
|
||||||
|
plat/fvp/aarch64/plat_helpers.S \
|
||||||
PLAT_BL31_S_VPATH := lib/semihosting/${ARCH}
|
plat/fvp/aarch64/plat_common.c \
|
||||||
|
plat/fvp/drivers/pwrc/fvp_pwrc.c
|
||||||
PLAT_BL_COMMON_SOURCES := semihosting_call.S \
|
|
||||||
mmio.c \
|
|
||||||
pl011_console.c \
|
|
||||||
pl011.c \
|
|
||||||
semihosting.c \
|
|
||||||
sysreg_helpers.S \
|
|
||||||
plat_io_storage.c \
|
|
||||||
io_semihosting.c \
|
|
||||||
io_fip.c \
|
|
||||||
io_memmap.c \
|
|
||||||
xlat_tables.c
|
|
||||||
|
|
||||||
BL1_SOURCES += bl1_plat_setup.c \
|
|
||||||
bl1_plat_helpers.S \
|
|
||||||
plat_helpers.S \
|
|
||||||
platform_up_stack.S \
|
|
||||||
plat_common.c \
|
|
||||||
cci400.c
|
|
||||||
|
|
||||||
BL2_SOURCES += bl2_plat_setup.c \
|
|
||||||
platform_up_stack.S \
|
|
||||||
plat_common.c \
|
|
||||||
plat_security.c \
|
|
||||||
tzc400.c
|
|
||||||
|
|
||||||
BL31_SOURCES += bl31_plat_setup.c \
|
|
||||||
plat_helpers.S \
|
|
||||||
platform_mp_stack.S \
|
|
||||||
plat_common.c \
|
|
||||||
plat_pm.c \
|
|
||||||
plat_topology.c \
|
|
||||||
plat_gic.c \
|
|
||||||
fvp_pwrc.c \
|
|
||||||
cci400.c \
|
|
||||||
gic_v2.c \
|
|
||||||
gic_v3.c
|
|
||||||
|
|
|
@ -31,13 +31,10 @@
|
||||||
TSPD_DIR := services/spd/tspd
|
TSPD_DIR := services/spd/tspd
|
||||||
SPD_INCLUDES := -Iinclude/bl32/payloads
|
SPD_INCLUDES := -Iinclude/bl32/payloads
|
||||||
|
|
||||||
SPD_SOURCES := tspd_common.c \
|
SPD_SOURCES := services/spd/tspd/tspd_common.c \
|
||||||
tspd_main.c \
|
services/spd/tspd/tspd_helpers.S \
|
||||||
tspd_pm.c \
|
services/spd/tspd/tspd_main.c \
|
||||||
tspd_helpers.S
|
services/spd/tspd/tspd_pm.c
|
||||||
|
|
||||||
vpath %.c ${TSPD_DIR}
|
|
||||||
vpath %.S ${TSPD_DIR}
|
|
||||||
|
|
||||||
# This dispatcher is paired with a Test Secure Payload source and we intend to
|
# This dispatcher is paired with a Test Secure Payload source and we intend to
|
||||||
# build the Test Secure Payload along with this dispatcher.
|
# build the Test Secure Payload along with this dispatcher.
|
||||||
|
|
Loading…
Add table
Reference in a new issue