Add asrc, csrc, cxxsrc, cppasrc taken from the cpu definition in the makefile
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 10 Apr 2009 16:07:44 +0000 (16:07 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 10 Apr 2009 16:07:44 +0000 (16:07 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2487 38d2e660-2303-0410-9eaa-f027e97ec537

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

index 2c84468a9f0aee681a764a227ce45c1a412b8eba..5d3edd6900b8ea1aabdf1b34fae233649bb1568d 100644 (file)
@@ -94,7 +94,7 @@ def mkGenerator(project_info, makefile):
     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"])
-    mk_data["$csrc"], mk_data["$pcsrc"], mk_data["$asrc"], mk_data["$constants"] = csrcGenerator(project_info)
+    mk_data["$csrc"], mk_data["$pcsrc"], mk_data["$cppasrc"], mk_data["$cxxsrc"], 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["$main"] = os.path.basename(project_info.info("PROJECT_PATH")) + "/main.c"
@@ -124,6 +124,10 @@ def csrcGenerator(project_info):
     # file to be included in PCSRC variable
     pcsrc = []
     # files to be included in CPPASRC variable
+    cppasrc = []
+    # files to be included in CXXSRC variable
+    cxxsrc = []
+    # files to be included in ASRC variable
     asrc = []
     # constants to be included at the beginning of the makefile
     constants = {}
@@ -150,13 +154,25 @@ def csrcGenerator(project_info):
                     pcsrc.append(file)
             for file in dependency_files:
                 csrc.append(file)
+            for file in project_info.info("CPU_INFOS")["C_SRC"]:
+                csrc.append(file)
+            for file in project_info.info("CPU_INFOS")["PC_SRC"]:
+                pcsrc.append(file)
             for file in asm_files:
-                asrc.append(file)
+                cppasrc.append(file)
+    for file in project_info.info("CPU_INFOS")["CPPA_SRC"]:
+        cppasrc.append(file)
+    for file in project_info.info("CPU_INFOS")["CXX_SRC"]:
+        cxxsrc.append(file)
+    for file in project_info.info("CPU_INFOS")["ASRC"]:
+        asrc.append(file)
     csrc = " \\\n\t".join(csrc) + " \\"
     pcsrc = " \\\n\t".join(pcsrc) + " \\"
+    cppasrc = " \\\n\t".join(cppasrc) + " \\"
+    cxxsrc = " \\\n\t".join(cxxsrc) + " \\"
     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, asrc, constants
+    return csrc, pcsrc, cppasrc, cxxsrc, asrc, constants
 
 def findModuleFiles(module, project_info):
     # Find the files related to the selected module
index 8fd71619192baf26eeaae3328130152d5cda3fdd..34873fdf7e27be8f8ebaf386f0ea40a1f61801e5 100644 (file)
@@ -29,6 +29,9 @@ CPU_DEF = {
     "AR_FLAGS": [],
     "LD_FLAGS" : [],
     "CPPA_SRC" : [],
+    "CXX_SRC": [],
+    "ASRC": [],
+    "C_SRC": [],
     "SUPPORTED_DRV" : [],
     "PC_SRC" : [],
     "CPU_DESC" : []
index 402df258630e12b5c96a19b14b6a22c184bbc7de..51688df446486a65b31ca943fb056b743e7926b8 100644 (file)
@@ -47,7 +47,7 @@ $pname_PCSRC = $($pname_WIZARD_PCSRC) $($pname_USER_PCSRC)
 
 # Files automatically generated by the wizard. DO NOT EDIT, USE $pname_USER_CPPASRC INSTEAD!
 $pname_WIZARD_CPPASRC = \
-       $asrc
+       $cppasrc
        #
 
 # Files included by the user.
@@ -57,6 +57,30 @@ $pname_USER_CPPASRC = \
 # Automatically generated by the wizard. PLEASE DO NOT EDIT!
 $pname_CPPASRC = $($pname_WIZARD_CPPASRC) $($pname_USER_CPPASRC)
 
+# Files automatically generated by the wizard. DO NOT EDIT, USE $pname_USER_CXXSRC INSTEAD!
+$pname_WIZARD_CXXSRC = \
+       $cxxsrc
+       #
+
+# Files included by the user.
+$pname_USER_CXXSRC = \
+       #
+
+# Automatically generated by the wizard. PLEASE DO NOT EDIT!
+$pname_CXXSRC = $($pname_WIZARD_CXXSRC) $($pname_USER_CXXSRC)
+
+# Files automatically generated by the wizard. DO NOT EDIT, USE $pname_USER_ASRC INSTEAD!
+$pname_WIZARD_ASRC = \
+       $asrc
+       #
+
+# Files included by the user.
+$pname_USER_ASRC = \
+       #
+
+# Automatically generated by the wizard. PLEASE DO NOT EDIT!
+$pname_ASRC = $($pname_WIZARD_ASRC) $($pname_USER_ASRC)
+
 $pname_CFLAGS = $cflags
 $pname_LDFLAGS = $ldflags
 $pname_CPPFLAGS = $cppflags