From d008cbf09f7cf399657716e5733a2950b5fcae03 Mon Sep 17 00:00:00 2001 From: chunyexixiaoyu <834670833@qq.com> Date: Fri, 24 Sep 2021 16:01:00 +0800 Subject: [PATCH] APP_Framework/Applications/:add list function base on rt-thread. --- .../Applications/general_functions/SConscript | 14 ++++++++++++++ .../Applications/general_functions/list/SConscript | 11 +++++++++++ .../Applications/general_functions/list/list.h | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 APP_Framework/Applications/general_functions/SConscript create mode 100644 APP_Framework/Applications/general_functions/list/SConscript diff --git a/APP_Framework/Applications/general_functions/SConscript b/APP_Framework/Applications/general_functions/SConscript new file mode 100644 index 00000000..f307e3f7 --- /dev/null +++ b/APP_Framework/Applications/general_functions/SConscript @@ -0,0 +1,14 @@ +import os +Import('RTT_ROOT') +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(path, 'SConscript')) + +Return('objs') diff --git a/APP_Framework/Applications/general_functions/list/SConscript b/APP_Framework/Applications/general_functions/list/SConscript new file mode 100644 index 00000000..e1ff73e1 --- /dev/null +++ b/APP_Framework/Applications/general_functions/list/SConscript @@ -0,0 +1,11 @@ +import os +from building import * +Import('RTT_ROOT') +Import('rtconfig') +cwd = GetCurrentDir() +DEPENDS = [""] + +SOURCES = ['double_list.c'] + ['single_list.c'] +path = [cwd] +objs = DefineGroup('list', src = SOURCES, depend = DEPENDS,CPPPATH = path) +Return("objs") \ No newline at end of file diff --git a/APP_Framework/Applications/general_functions/list/list.h b/APP_Framework/Applications/general_functions/list/list.h index ebc0c9c1..3eeca237 100644 --- a/APP_Framework/Applications/general_functions/list/list.h +++ b/APP_Framework/Applications/general_functions/list/list.h @@ -23,7 +23,7 @@ #define __LIST_H__ #include "libc.h" - +#include #ifdef __cplusplus extern "C" { #endif