base-hw: eliminate the need to $(BASE_HW_DIR)

Instead of introducing a $(BASE_HW_DIR) variable that has to be defined in each
core makefile for the different base-hw targets, this commit replaces the
$(REP_DIR) variable usage in core.inc files with $(BASE_DIR)/../base-hw.

Ref #1955
This commit is contained in:
Stefan Kalkowski 2016-05-12 08:35:18 +02:00 committed by Christian Helmuth
parent 54b47535f8
commit 964e9e91c7
25 changed files with 31 additions and 80 deletions

View File

@ -11,8 +11,10 @@ LIBS += core-perf_counter
LIBS += base-common
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include $(BASE_DIR)/src/core/include
INC_DIR += $(BASE_HW_DIR)/src/include $(BASE_DIR)/src/include
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include
INC_DIR += $(BASE_DIR)/src/core/include
INC_DIR += $(BASE_DIR)/../base-hw/src/include
INC_DIR += $(BASE_DIR)/src/include
# add C++ sources
SRC_CC += console.cc
@ -73,11 +75,11 @@ ifneq ($(wildcard $(BUILD_BASE_DIR)/boot_modules.s),)
INC_DIR += $(BOOT_MODULES_VPATH)
else
# use dummy boot-modules per default
BOOT_MODULES_VPATH = $(BASE_HW_DIR)/src/core/
BOOT_MODULES_VPATH = $(BASE_DIR)/../base-hw/src/core/
endif
vpath boot_modules.s $(BOOT_MODULES_VPATH)
# declare source locations
vpath % $(BASE_HW_DIR)/src/core
vpath % $(BASE_DIR)/../base-hw/src/core
vpath % $(BASE_DIR)/src/core
vpath % $(BASE_DIR)/src/lib/startup

View File

@ -5,7 +5,7 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/arm
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/arm
# add C++ sources
SRC_CC += spec/arm/kernel/thread.cc
@ -18,4 +18,4 @@ SRC_S += spec/arm/kernel/crt0.s
SRC_S += spec/arm/crt0.s
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/core.inc

View File

@ -6,7 +6,7 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/arm_v6
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/arm_v6
# add C++ sources
SRC_CC += spec/arm_v6/cpu.cc
@ -20,4 +20,4 @@ SRC_CC += kernel/kernel.cc
SRC_S += spec/arm_v6/mode_transition.s
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/arm/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/arm/core.inc

View File

@ -5,7 +5,7 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/arm_v7
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/arm_v7
# add C++ sources
SRC_CC += spec/arm_v7/cpu.cc
@ -14,4 +14,4 @@ SRC_CC += spec/arm_v7/cpu.cc
SRC_S += spec/arm_v7/mode_transition.s
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/arm/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/arm/core.inc

View File

@ -20,9 +20,5 @@ SRC_CC += spec/arm_v7/virtualization/vm_session_component.cc
# add assembly sources
SRC_S += spec/arm_v7/virtualization/mode_transition.s
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/exynos5/core.inc

View File

@ -5,8 +5,8 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/cortex_a15
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/arm_gic
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/cortex_a15
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/arm_gic
# add C++ sources
SRC_CC += spec/cortex_a15/cpu.cc
@ -18,5 +18,5 @@ SRC_CC += spec/arm/smp/kernel/cpu.cc
SRC_S += spec/arm/smp/kernel/crt0.s
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/smp/core.inc
include $(BASE_HW_DIR)/lib/mk/spec/arm_v7/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/smp/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/arm_v7/core.inc

View File

@ -5,7 +5,7 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/cortex_a8
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/cortex_a8
# add C++ sources
SRC_CC += spec/cortex_a8/cpu.cc
@ -15,4 +15,4 @@ SRC_CC += spec/arm/kernel/thread_update_pd.cc
SRC_CC += kernel/kernel.cc
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/arm_v7/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/arm_v7/core.inc

View File

@ -5,8 +5,8 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/cortex_a9
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/arm_gic
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/cortex_a9
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/arm_gic
# add C++ sources
SRC_CC += spec/cortex_a9/kernel/cpu.cc
@ -22,5 +22,5 @@ SRC_CC += kernel/vm_thread.cc
SRC_S += spec/arm/smp/kernel/crt0.s
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/smp/core.inc
include $(BASE_HW_DIR)/lib/mk/spec/arm_v7/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/smp/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/arm_v7/core.inc

View File

@ -5,11 +5,11 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/exynos5
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/exynos5
# add C++ sources
SRC_CC += spec/exynos5/platform_support.cc
SRC_CC += spec/exynos5/cpu.cc
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/cortex_a15/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/cortex_a15/core.inc

View File

@ -11,10 +11,6 @@ SRC_CC += spec/imx53/platform_support.cc
SRC_CC += spec/imx53/pic.cc
SRC_CC += platform_services.cc
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/imx53/core-trustzone.inc
include $(REP_DIR)/lib/mk/core-trustzone.inc

View File

@ -7,9 +7,5 @@
# add include paths
INC_DIR += $(REP_DIR)/src/core/include/spec/imx53_qsb/trustzone
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/imx53/core-trustzone_on.inc

View File

@ -14,9 +14,5 @@ INC_DIR += $(REP_DIR)/src/core/include/spec/imx
SRC_CC += platform_services.cc
SRC_CC += spec/imx6/platform_support.cc
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a9/core.inc

View File

@ -11,9 +11,5 @@ SRC_CC += spec/arm_gic/pic.cc
SRC_CC += kernel/vm_thread.cc
SRC_CC += platform_services.cc
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/exynos5/core.inc

View File

@ -13,9 +13,5 @@ INC_DIR += $(REP_DIR)/src/core/include/spec/tl16c750
SRC_CC += platform_services.cc
SRC_CC += spec/panda/platform_support.cc
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a9/core.inc

View File

@ -14,9 +14,5 @@ SRC_CC += platform_services.cc
SRC_CC += spec/pbxa9/platform_support.cc
SRC_CC += spec/pbxa9/board.cc
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a9/core.inc

View File

@ -18,9 +18,6 @@ SRC_S += spec/riscv/mode_transition.s
SRC_S += spec/riscv/kernel/crt0.s
SRC_S += spec/riscv/crt0.s
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/core.inc

View File

@ -12,9 +12,5 @@ INC_DIR += $(REP_DIR)/src/core/include/spec/pl011
SRC_CC += platform_services.cc
SRC_CC += spec/rpi/platform_support.cc
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/arm_v6/core.inc

View File

@ -5,7 +5,7 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/smp
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/smp
# add C++ sources
SRC_CC += spec/smp/kernel/kernel.cc

View File

@ -7,9 +7,5 @@
# add include paths
INC_DIR += $(REP_DIR)/src/core/include/spec/usb_armory
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/imx53/core-trustzone_on.inc

View File

@ -6,7 +6,7 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/x86
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/x86
# add C++ sources
SRC_CC += kernel/kernel.cc
@ -22,4 +22,4 @@ SRC_CC += spec/x86/io_port_session_component.cc
SRC_CC += spec/x86/platform_services.cc
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/core.inc

View File

@ -13,9 +13,5 @@ SRC_CC += spec/x86/kernel/cpu_exception.cc
SRC_CC += spec/x86/kernel/thread_exception.cc
SRC_CC += spec/x86_64/platform_support.cc
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/x86_64/core.inc

View File

@ -18,9 +18,5 @@ SRC_CC += spec/x86_64/muen/kernel/thread_exception.cc
SRC_CC += spec/x86_64/muen/platform_support.cc
SRC_CC += spec/x86_64/muen/sinfo.cc
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/x86_64/core.inc

View File

@ -6,7 +6,7 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/x86_64
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/x86_64
# add assembly sources
SRC_S += spec/x86_64/mode_transition.s
@ -20,4 +20,4 @@ SRC_CC += spec/x86_64/tss.cc
SRC_CC += spec/x86_64/kernel/cpu_context.cc
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/x86/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/x86/core.inc

View File

@ -5,11 +5,11 @@
#
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/include/spec/zynq
INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/zynq
# add C++ sources
SRC_CC += platform_services.cc
SRC_CC += spec/zynq/platform_support.cc
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/cortex_a9/core.inc
include $(BASE_DIR)/../base-hw/lib/mk/spec/cortex_a9/core.inc

View File

@ -8,9 +8,5 @@
INC_DIR += $(REP_DIR)/src/core/include/spec/xilinx_uartps_0
INC_DIR += $(REP_DIR)/src/core/include/spec/zynq_qemu
# core.inc files use BASE_HW_DIR in order to allow
# including these files from other repositories
BASE_HW_DIR := $(REP_DIR)
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/zynq/core.inc