summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-03-27 09:55:23 +0800
committerGitHub <[email protected]>2019-03-27 09:55:23 +0800
commit95beb80b1e2758c33c6f59fe1012b26cc64494b5 (patch)
tree47ea8a1d46fbab339b3c835bc497a290c3246fa1
parentedcf8dacda386cc3494e348ae0ebde7077a097fd (diff)
parent47ca1c2ff4d5b58abeda01e4b0e36676c83ea3b2 (diff)
Merge pull request #2513 from BernardXiong/branch_tools
[Tools] Remove Makefile from BSP
-rw-r--r--bsp/qemu-vexpress-a9/Makefile13
-rw-r--r--tools/makefile.py19
2 files changed, 19 insertions, 13 deletions
diff --git a/bsp/qemu-vexpress-a9/Makefile b/bsp/qemu-vexpress-a9/Makefile
deleted file mode 100644
index f2efa4a561..0000000000
--- a/bsp/qemu-vexpress-a9/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-phony := all
-all:
-
-include config.mk
-
-ifneq ($(MAKE_LIB),1)
-TARGET := rtthread.elf
-include src.mk
-endif
-
-$(if $(strip $(RTT_ROOT)),,$(error RTT_ROOT not defined))
-
-include $(RTT_ROOT)/tools/rtthread.mk
diff --git a/tools/makefile.py b/tools/makefile.py
index 9292233601..53e1d493a0 100644
--- a/tools/makefile.py
+++ b/tools/makefile.py
@@ -5,6 +5,21 @@ from utils import *
from utils import _make_path_relative
import rtconfig
+makefile = '''phony := all
+all:
+
+include config.mk
+
+ifneq ($(MAKE_LIB),1)
+TARGET := rtthread.elf
+include src.mk
+endif
+
+$(if $(strip $(RTT_ROOT)),,$(error RTT_ROOT not defined))
+
+include $(RTT_ROOT)/tools/rtthread.mk
+'''
+
def TargetMakefile(env):
project = ProjectInfo(env)
@@ -104,4 +119,8 @@ def TargetMakefile(env):
for item in files:
src.write('SRC_FILES +=%s\n' % item)
+ make = open('Makefile', 'w')
+ make.write(makefile)
+ make.close()
+
return