From c893e2132333cda81e03b6227904a691857e3659 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 28 Apr 2015 23:32:44 +0200 Subject: [PATCH] Makefile.rules: Always use linker script from build directory This is to ensure that external applications like rpp-test-sw build even when they include Makefile.config copied to the rpp-lib root directory. --- build/Makefile.rules.arm | 2 +- build/rm48_hdk/Makefile.config | 4 +--- build/tms570_hdk/Makefile.config | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/build/Makefile.rules.arm b/build/Makefile.rules.arm index a7eb8b1..8c09347 100644 --- a/build/Makefile.rules.arm +++ b/build/Makefile.rules.arm @@ -63,7 +63,7 @@ RPP_LDFLAGS = \ --generate_dead_funcs_list=$(@:%=%.deadfuncs.xml) \ --stack_size=0x800 -RPP_LDLIBS = $(TARGET_LDCMD) -l$(RPP_LIB_DIR)/rpp-lib.lib $(TARGET_LDLIBS) +RPP_LDLIBS = $(makefile_rules_arm_dir)/$(TARGET)/$(TARGET_LDCMD) -l$(RPP_LIB_DIR)/rpp-lib.lib $(TARGET_LDLIBS) $(RPP_LIB_DIR)/rpp-lib.lib: $(MAKE) -C $(dir $@) diff --git a/build/rm48_hdk/Makefile.config b/build/rm48_hdk/Makefile.config index 823daac..1fa7b8d 100644 --- a/build/rm48_hdk/Makefile.config +++ b/build/rm48_hdk/Makefile.config @@ -1,6 +1,4 @@ -makefile_config_dir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) - TARGET = rm48_hdk TARGET_CFLAGS = -mv7R4 --code_state=32 --float_support=VFPv3D16 --abi=eabi -me -DTARGET_RM48_HDK -TARGET_LDCMD = $(makefile_config_dir)/RM48L952FlashLnk.cmd +TARGET_LDCMD = RM48L952FlashLnk.cmd TARGET_LDLIBS = --library=rtsv7R4_T_le_v3D16_eabi.lib diff --git a/build/tms570_hdk/Makefile.config b/build/tms570_hdk/Makefile.config index e7cd766..82cff5e 100644 --- a/build/tms570_hdk/Makefile.config +++ b/build/tms570_hdk/Makefile.config @@ -1,6 +1,4 @@ -makefile_config_dir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) - TARGET = tms570_hdk TARGET_CFLAGS = -mv7R4 --code_state=32 --float_support=VFPv3D16 --abi=eabi -DTARGET_TMS570_HDK -TARGET_LDCMD = $(makefile_config_dir)/TMS570LS313xFlashLnk.cmd +TARGET_LDCMD = TMS570LS313xFlashLnk.cmd TARGET_LDLIBS = --library="rtsv7R4_T_be_v3D16_eabi.lib" -- 2.39.2