From: duplo Date: Mon, 2 Feb 2009 10:34:24 +0000 (+0000) Subject: Move the mk template in the templates dir in wizard source tree X-Git-Tag: 2.1.0~434 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=4bd6a37ba9ce30f09fb73d7006c77524c558993b;p=bertos.git Move the mk template in the templates dir in wizard source tree git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2248 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/template.mk b/template.mk deleted file mode 100644 index 281b772a..00000000 --- a/template.mk +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2009 Develer S.r.l. (http://www.develer.com/) -# All rights reserved. -# -# Makefile template for BeRTOS wizard. -# -# Author: Lorenzo Berni -# -# - -# Set to 1 for debug builds -pname_DEBUG = 1 - -# Our target application -TRG += pname -CPU = cpuname -BOOT_ADDR_START = 0x1E000 - -pname_PREFIX = prefix - -pname_SUFFIX = suffix - -pname_MCU = $(CPU) - -pname_CSRC = \ - csrc - # - -pname_PCSRC += pcsrc - - -pname_CFLAGS = cflags -pname_LDFLAGS = ldflags diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index f0089b4a..6fbd254a 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -59,9 +59,9 @@ def createBertosProject(projectInfos): f.write(string) f.close() ## Destinatio mk file - makefile = open(sourcesDir + "/" + "template.mk", "r").read() + makefile = open("mktemplates/template.mk", "r").read() makefile = mkGenerator(projectInfos, makefile) - open(prjdir + "/" + "template.km", "w").write(makefile) + open(prjdir + "/" + "template.mk", "w").write(makefile) def mkGenerator(projectInfos, makefile): """ @@ -73,7 +73,6 @@ def mkGenerator(projectInfos, makefile): mkData["cflags"] = " ".join(projectInfos.info("CPU_INFOS")["C_FLAGS"]) mkData["ldflags"] = " ".join(projectInfos.info("CPU_INFOS")["LD_FLAGS"]) for key in mkData: - print key, mkData[key] while makefile.find(key) != -1: makefile = makefile.replace(key, mkData[key]) return makefile diff --git a/wizard/mktemplates/template.mk b/wizard/mktemplates/template.mk new file mode 100644 index 00000000..281b772a --- /dev/null +++ b/wizard/mktemplates/template.mk @@ -0,0 +1,33 @@ +# +# Copyright 2009 Develer S.r.l. (http://www.develer.com/) +# All rights reserved. +# +# Makefile template for BeRTOS wizard. +# +# Author: Lorenzo Berni +# +# + +# Set to 1 for debug builds +pname_DEBUG = 1 + +# Our target application +TRG += pname +CPU = cpuname +BOOT_ADDR_START = 0x1E000 + +pname_PREFIX = prefix + +pname_SUFFIX = suffix + +pname_MCU = $(CPU) + +pname_CSRC = \ + csrc + # + +pname_PCSRC += pcsrc + + +pname_CFLAGS = cflags +pname_LDFLAGS = ldflags