diff --git a/development-tools/build-config-system/SCons.md b/development-tools/build-config-system/SCons.md index 35c8398b8f22f62399afebc7686bf481aebaf1f4..98f8248b5b8d53a312533bcdda80ffba10f66a92 100644 --- a/development-tools/build-config-system/SCons.md +++ b/development-tools/build-config-system/SCons.md @@ -185,6 +185,18 @@ er\inc -ILibraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x -IF:\Project\git\rt-thre ... ``` +### 3.8 scons --buildlib + +使用指令 scons --buildlib=xxx,其中 xxx 为 Group 的名字。 + +以 bsp/qemu-vexpress-a9 为例,在其 applications 目录有定义 Sconsript: + +![Group name](figures/1.png) + +那么就可以输入 scons --buildlib=Applications,就可以将 Applications 这个 group 定义的 C 文件编译打包成一个静态库,输出也是位于 bsp 的目录中。 + +![输出结果](figures/2.png) + ## 4 SCons 函数 本章节将介绍在使用编写 SConscript 脚本中常用的函数,包含 SCons 原生标准函数以及RT-Thread扩展的函数。关于 SCons 原生标准函数,在 [SCons](http://www.scons.org/doc/production/HTML/scons-user/index.html) 的网站上可以找到详细的 SCons 原生函数介绍。 diff --git a/development-tools/build-config-system/figures/1.png b/development-tools/build-config-system/figures/1.png new file mode 100644 index 0000000000000000000000000000000000000000..1487d0b628a34241828db76527d544899a2caa08 Binary files /dev/null and b/development-tools/build-config-system/figures/1.png differ diff --git a/development-tools/build-config-system/figures/2.png b/development-tools/build-config-system/figures/2.png new file mode 100644 index 0000000000000000000000000000000000000000..2dc05bdc1df71bfa1feed59641a59a626ba6a9df Binary files /dev/null and b/development-tools/build-config-system/figures/2.png differ