From 80e2a191cbb7412a8d7da7f73c91ed68d0a08c01 Mon Sep 17 00:00:00 2001 From: duplo Date: Fri, 28 Aug 2009 13:08:05 +0000 Subject: [PATCH] Attempt to automatize the creation of the mk files git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2809 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/bertos_utils.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 8ad1568b..e8f35842 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -215,16 +215,13 @@ def mkGenerator(project_info, makefile): """ mk_data = {} mk_data["$pname"] = os.path.basename(project_info.info("PROJECT_PATH")) - mk_data["$cpuflag"] = project_info.info("CPU_INFOS")["CPU_FLAG_NAME"] - mk_data["$cpuname"] = project_info.info("CPU_INFOS")["CORE_CPU"] mk_data["$cpuclockfreq"] = project_info.info("SELECTED_FREQ") - mk_data["$cflags"] = " ".join(project_info.info("CPU_INFOS")["C_FLAGS"]) - mk_data["$ldflags"] = " ".join(project_info.info("CPU_INFOS")["LD_FLAGS"]) - mk_data["$cppflags"] = " ".join(project_info.info("CPU_INFOS")["CPP_FLAGS"]) - mk_data["$cppaflags"] = " ".join(project_info.info("CPU_INFOS")["CPPA_FLAGS"]) - mk_data["$cxxflags"] = " ".join(project_info.info("CPU_INFOS")["CXX_FLAGS"]) - mk_data["$asflags"] = " ".join(project_info.info("CPU_INFOS")["AS_FLAGS"]) - mk_data["$arflags"] = " ".join(project_info.info("CPU_INFOS")["AR_FLAGS"]) + + cpu_mk_parameters = [] + for key, value in project_info.info("CPU_INFOS").items(): + if key.startswith("MK_"): + cpu_mk_parameters.append("%s = %s" %(key.replace("MK_", mk_data["$pname"]), value) + mk_data["$cpuparameters"] = "\n".join(cpu_mk_parameters) mk_data["$csrc"], mk_data["$pcsrc"], mk_data["$cppasrc"], mk_data["$cxxsrc"], mk_data["$asrc"], mk_data["$constants"] = csrcGenerator(project_info) mk_data["$prefix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[0]) mk_data["$suffix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[1]) -- 2.25.1