Merge pull request #2513 from BernardXiong/branch_tools

[Tools] Remove Makefile from BSP
This commit is contained in:
Bernard Xiong 2019-03-27 09:55:23 +08:00 committed by GitHub
commit 95beb80b1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 13 deletions

View File

@ -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

View File

@ -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