abld命令分析

来源:互联网 发布:凯聪sip1018软件下载 编辑:程序博客网 时间:2024/05/16 12:03

1.       bldmake bldfiles
 
这条语句使用.INF文件和.MMP文件来生成abld.bat. 和.INF于.MMP文件不同, 所生成的abld.bat在不同的IDE之间不可移植, 不能手工编辑.
 
下面看一下bldmake命令还有什么参数, 单独运行bldmake可以得到下面的信息:
 
BLDMAKE - Project building Utility (Build 227)
 
BLDMAKE {options} [<command>] [<platform>]
 
<command>: (case insensitive)
 BLDFILES - create build batch files
 CLEAN    - remove all files bldmake creates
 INF      - display basic BLD.INF syntax
 PLAT     - display platform macros
 
<platform>: (case insensitive)
 if not specified, defaults to "ALL"
 
Options: (case insensitive)
 -v   -> verbose mode
 -k   -> keep going even if files are missing

 
 
2.       abld build armi urel
 
同样, 先运行abld help command看一下abld的用法.
Commands (case-insensitive):
BUILD               Combines commands EXPORT,MAKEFILE,LIBRARY,RESOURCE,TARGET,FINAL
CLEAN              Removes everything built with ABLD TARGET
CLEANEXPORT   Removes files created by ABLD EXPORT
EXPORT              Copies the exported files to their destinations
FINAL                 Allows extension makefiles to execute final commands
FREEZE               Freezes exported functions in a .DEF file
HELP                  Displays commands, options or help about a particular command
LIBRARY              Creates import libraries from the frozen .DEF files
LISTING              Creates assembler listing file for corresponding source file
MAKEFILE           Creates makefiles or IDE workspaces
REALLYCLEAN     As CLEAN, but also removes exported files and makefiles
RESOURCE         Creates resource files, bitmaps and AIFs
TARGET              Creates the main executable and also the resources
TIDY                  Removes executables which need not be released

 
先说一下BUILD这个参数.
 
首先看一下我们之前的例子:
abld build armi urel
 
上面的命令很容易想到第三个参数和目标设备有关, 而最后一个参数则是确定是Debug版本还是Release版本的.
 
看看其它的用法:
 
abld build wins udeb          (对于VC, 生成Debug版本的文件)
abld build wins urel           (对于VC, 生成Release版本的文件)
 
 
abld build winsb udeb         (对于Borland C++, 生成Debug版本的文件)
abld build winsb urel          (对于Borland C++, 生成Release版本的文件)
 
abld build winscw udeb (对于CodeWarrior, 生成Debug版本的文件)
abld build winscw urel       (对于CodeWarrior, 生成Release版本的文件)
 
abld build armi udeb          (目标设备为ARMV4i架构, 生成Debug版本的文件)
abld build armi urel           (目标设备为ARMV4i架构, 生成Release版本的文件)
 
abld build arm4 udeb         (目标设备为ARMV4架构, 生成Debug版本的文件)
abld build arm4 urel          (目标设备为ARMV4架构, 生成Release版本的文件)
 
abld build thumb udeb        (目标设备为ARM Thumb架构, 生成Debug版本的文件)
abld build thumb urel       (目标设备为ARM Thumb架构, 生成Release版本的文件)
 
对于后三种命令, 要搞明白的是armi, arm4和Thumb的区别. 这其实是ARM架构的三种版本. ARMI架构下面的文件可在另外两种架构的系统中运行, 这种架构的特点是最大程度上实现对设备的兼容性. ARM4则以增加代码大小为代价, 获得了最佳的性能. 而Thumb则以稍微降低程序的执行速度为代价来减小代码的大小.
 
接下来要看的参数是makefile. 从上面的信息可知这个参数是用来生成IDE所用的项目文件的, 同样举例说明:
abld makefile vc6       (对于VC,)
abld makefile cw_ide   (对于CodeWarrior)
 
目前会用到的参数就是这些, CLEAN也有可能用到, 其他在需要的再说明.

原创粉丝点击