diff --git a/components/drivers/SConscript b/components/drivers/SConscript new file mode 100644 index 0000000000..1cb7618499 --- /dev/null +++ b/components/drivers/SConscript @@ -0,0 +1,14 @@ +# for module compiling +import os +from building import * + +cwd = GetCurrentDir() +objs = [] +list = os.listdir(cwd) + +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(d, 'SConscript')) + +Return('objs') diff --git a/components/usb/SConscript b/components/drivers/usb/SConscript similarity index 76% rename from components/usb/SConscript rename to components/drivers/usb/SConscript index 5199a9bdd4..5a6486ef44 100644 --- a/components/usb/SConscript +++ b/components/drivers/usb/SConscript @@ -1,8 +1,9 @@ Import('RTT_ROOT') from building import * +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [RTT_ROOT + '/components/usb'] +CPPPATH = [cwd] group = DefineGroup('USB', src, depend = ['RT_USING_USB_DEVICE'], CPPPATH = CPPPATH) Return('group')