mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-18 18:34:20 +08:00
[libcpu] Add SConscript in libcpu.
This commit is contained in:
@@ -1,38 +1,15 @@
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
# RT-Thread building script for bridge
|
||||
|
||||
import os
|
||||
from building import *
|
||||
|
||||
arch = rtconfig.ARCH
|
||||
comm = rtconfig.ARCH + '/common'
|
||||
path = rtconfig.ARCH + '/' + rtconfig.CPU
|
||||
src = []
|
||||
ASFLAGS = ''
|
||||
Import('rtconfig')
|
||||
|
||||
# The set of source files associated with this SConscript file.
|
||||
if rtconfig.PLATFORM == 'armcc':
|
||||
src += Glob(path + '/*.c') + Glob(path + '/*_rvds.S')
|
||||
src += Glob(comm + '/*.c') + Glob(comm + '/*_rvds.S')
|
||||
cwd = GetCurrentDir()
|
||||
group = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
if rtconfig.PLATFORM == 'gcc':
|
||||
src += Glob(path + '/*_init.S')
|
||||
src += Glob(path + '/*.c') + Glob(path + '/*_gcc.S')
|
||||
src += Glob(comm + '/*.c') + Glob(comm + '/*_gcc.S')
|
||||
|
||||
if rtconfig.PLATFORM == 'iar':
|
||||
src += Glob(path + '/*.c') + Glob(path + '/*_iar.S')
|
||||
src += Glob(comm + '/*.c') + Glob(comm + '/*_iar.S')
|
||||
|
||||
if rtconfig.PLATFORM == 'cl':
|
||||
src = Glob(path + '/*.c')
|
||||
|
||||
if rtconfig.PLATFORM == 'mingw':
|
||||
src = Glob(path + '/*.c')
|
||||
|
||||
if rtconfig.PLATFORM == 'armcc' and rtconfig.ARCH == 'arm' and rtconfig.CPU == 'arm926':
|
||||
ASFLAGS = ' --cpreproc'
|
||||
|
||||
CPPPATH = [RTT_ROOT + '/libcpu/' + arch + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + arch + '/common']
|
||||
|
||||
group = DefineGroup(rtconfig.CPU.upper(), src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS)
|
||||
if rtconfig.ARCH in list:
|
||||
group = group + SConscript(os.path.join(cwd, rtconfig.ARCH, 'SConscript'))
|
||||
|
||||
Return('group')
|
||||
|
Reference in New Issue
Block a user