Add CPPASRC to the mk file
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 26 Mar 2009 10:28:47 +0000 (10:28 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 26 Mar 2009 10:28:47 +0000 (10:28 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2437 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py
wizard/mktemplates/template.mk

index ceb82c718eac5fa1887fd0b96438a1c9d8973b08..1c8caaa74adde5ffb9d37c3f8dda7f1ca648b005 100644 (file)
@@ -89,7 +89,7 @@ def mkGenerator(project_info, makefile):
     mk_data["$cpuname"] = project_info.info("CPU_INFOS")["CORE_CPU"]
     mk_data["$cflags"] = " ".join(project_info.info("CPU_INFOS")["C_FLAGS"])
     mk_data["$ldflags"] = " ".join(project_info.info("CPU_INFOS")["LD_FLAGS"])
-    mk_data["$csrc"], mk_data["$pcsrc"], mk_data["$constants"] = csrcGenerator(project_info)
+    mk_data["$csrc"], mk_data["$pcsrc"], mk_data["$asrc"], mk_data["$constants"] = csrcGenerator(project_info)
     mk_data["$prefix"] = project_info.info("TOOLCHAIN")["path"].split("gcc")[0]
     mk_data["$suffix"] = project_info.info("TOOLCHAIN")["path"].split("gcc")[1]
     mk_data["$cross"] = project_info.info("TOOLCHAIN")["path"].split("gcc")[0]
@@ -119,6 +119,8 @@ def csrcGenerator(project_info):
     csrc = []
     ## file to be included in PCSRC variable
     pcsrc = []
+    ## files to be included in CPPASRC variable
+    asrc = []
     ## constants to be included at the beginning of the makefile
     constants = {}
     for module, information in modules.items():
@@ -144,10 +146,13 @@ def csrcGenerator(project_info):
                     pcsrc.append(file)
             for file in dependency_files:
                 csrc.append(file)
+            for file in asm_files:
+                asrc.append(file)
     csrc = " \\\n\t".join(csrc) + " \\"
     pcsrc = " \\\n\t".join(pcsrc) + " \\"
+    asrc = " \\\n\t".join(asrc) + " \\"
     constants = "\n".join([os.path.basename(project_info.info("PROJECT_PATH")) + "_" + key + " = " + str(value) for key, value in constants.items()])
-    return csrc, pcsrc, constants
+    return csrc, pcsrc, asrc, constants
     
 def findModuleFiles(module, project_info):
     ## Find the files related to the selected module
index 4c3b886c3a7a17698e8aab61ac6cc773e4e60498..8c2f31b8a4c3645f6077d2e7e9549cdfaa6f50b6 100644 (file)
@@ -31,6 +31,9 @@ $pname_PCSRC += \
        $pcsrc
        #
 
+$pname_CPPASRC += \
+       $asrc
+       #
 
 $pname_CFLAGS = $cflags
 $pname_LDFLAGS = $ldflags