Xbuild is project auto build tool, it's just a simple wrapper of GNUMake. The home page is
https://sourceforge.net/projects/xbuild/
1.How to install
----------------
tar -xzvf xbuild-<version>.tar.gz -C /usr/local/sbin
2.Syntax specificatio of build.mk file
--------------------------------------
- Overview
An build.mk file is written to describe your sources to the build system. More
specifically:
o The file is really a tiny GNU Makefile fragment that will be parsed one or
more times by the build system. As such, you should try to minimize the
variables you declare there and do not assume that anything is not defined
during parsing.
o The file syntax is designed to allow you to group your sources into
'modules'. A module is one of the following:
* a static library
* a shared library
* a executable
You can define one or more modules in each build.mk file, and you can use
the same source file in several modules.
o The build system handles many details for you. For example, you don't need
to list header files or explicit dependencies between generated files in
your build.mk. The build system will compute these automatically for you.
This also means that, when updating to newer releases of the XBuild, you
should be able to benefit from new toolchain/platform support without having
to touch your build.mk files.
- Simple example:
Before describing the syntax in details, let's consider the simple "hello"
example, assume the structure of "hello" project is following:
hello
├─include
│ └─hello.h
├─src
│ ├─build.mk
│ └─hello.c
└─build.mk
Here, we can see:
o The 'src' directory containing the c source for the sample project.
o The 'include' directory containing the c header file for the sample project.
o The 'hello/build.mk' file that describles the sub diretory to build system.
Its content is:
---------- cut here ----------
include $(all-subdir-makefiles)
---------- cut here ----------
o The 'src/build.mk' file that describles the shared library to build system.
Its content is:
---------- cut here ----------
$(call prepare-build)
MODULE := hello
INCLUDES := ../include
CFLAGS := -O3 -Wall -ggdb -D_DEBUG
CPPFLAGS :=
CXXFLAGS := $(CPPFLAGS)
LDFLAGS := -L/usr/local/lib -L/usr/lib
LDLIBS :=
SHARED_LIBS :=
STATIC_LIBS :=
SOURCES := hello.c
$(call build-shared-library)
---------- cut here ----------
- Xbuild provided evironment variables
o ARCH
The architecture of the CPU
o XBUILD_PROJECT
The absolute path of project
- Xbuild provided variables
o MODULE
This variable is required, it's describled the module name.
o INCLUDES
A set of C/C++ header file include directory, for example:
INCLUDES := ../include
INCLUDES += ../../include
o CFLAGS
A set of compile flags for .c source file, for example:
CFLAGS := -O3 -Wall -ggdb -D_DEBUG
o CPPFLAGS
A set of compile flags for .cpp source file, for example:
CPPFLAGS := -O3 -Wall -ggdb -D_DEBUG -std=gnu++0x
o CXXFLAGS
A set of compile flags for .cxx and .cc source file, for example:
CXXFLAGS := -O3 -Wall -ggdb -D_DEBUG -std++
o LDFLAGS
A set of link flags for build shared library, static library orcutable,
for example:
LDFLAGS := -L/usr/local/lib -L/usr/lib -L$(call pwd)/../lib
NOTE: If the path is relative, should use the function $(call pwd) to locate
current directory.
o LDLIBS
A set of external library to link, for example:
LDLIBS := -lrt -lpthr
o SHARED_LIBS
A set of shared library module name that dependencied by current module,
for example:
SHARED_LIBS := module-foo module-bar
If the SHARED_LIBS is defined, the module linked after all of dependency
module linked success.
o STATIC_LIBS
A set of static library module name that dependencied by current module,
it's the same of SHARED_LIBS.
o SOURCES
A set of source file to compile.
- Xbuild provided functions & macros
o add-suffix
o build-shared-library
o build-static-library
o build-executable
o pwd
o all-subdir-makefiles
About the details, please see '$Xbuild/core/definitions.mk'
4.Build project
---------------
Usage of xbuild command:
cd <project-directory>
xbuild all
or
xbuild r[ebuild]
分享到:
相关推荐
Vue-multipage 就是针对Vue.js 应用的多页面模块化构建工具。它结合了Webpack等现代前端构建工具,使得在Vue.js应用中实现多页面开发变得更为简单。 Webpack 是一个模块打包器,它能够将JavaScript、CSS、图片等...
QT模块化编程是一种高效组织大型项目的方式,它允许我们将复杂的应用程序分解为多个独立的、可重用的模块或子工程。在QT中,我们通常使用`.pro`和`.pri`文件来管理这些模块。`.pro`文件是QT项目的主配置文件,用于...
# 基于Webpack的模块化构建工具 ## 项目简介 本项目是一个基于Webpack的模块化构建工具。Webpack是一个强大的模块打包工具,能够处理JavaScript、CSS、SCSS、图片、模板等多种类型的文件,并将它们打包成浏览器可...
`Browserify` 是一个用于解决在浏览器中使用 CommonJS 规范的模块化开发问题的工具。它允许开发者将Node.js风格的`require()`语法应用于前端代码,使得代码可以按照模块化的方式组织,便于复用和管理。`Browserify`...
本文详细探讨了开源大数据ETL(Extract-Transform-Load)工具中模块化组件构建的技术方法,并以Kettle这个开源ETL软件作为案例,分析了其模块化组件构建的实践应用。Kettle是Pentaho数据集成(PDI)系统的一个重要...
3. **模块化工具与框架** - **Webpack**:强大的模块打包工具,可以处理各种静态资源,并提供模块热替换、代码分割等功能。 - **Rollup**:轻量级的模块打包工具,专注于优化JavaScript库的构建。 - **Browserify...
"swift-iOS模块化构建方案模块间解耦路由中心设计方案"正是针对这一问题提出的解决方案,它旨在通过模块化设计和路由中心来实现应用组件间的高效解耦。 模块化构建方案的核心思想是将一个大型的项目拆分成多个小型...
【标签】:“JavaScript开发-构建工具”表明这套构建工具的核心是JavaScript,它主要服务于JavaScript开发者,通过自动化工具帮助开发者解决项目构建中的各种问题,例如代码转换、优化、打包等,使开发者可以专注于...
《嵌入式系统的微模块化程序设计:实用状态图C_C++实现》是一本专为嵌入式系统设计人员及计算机科学和电气工程领域的学生编写的教程书。本书由美籍波兰裔博士Miro Samek撰写,中文版由三万钧翻译,详细介绍了量子...
使用Jenkins、GitLab CI/CD等工具,自动化构建、测试和部署各个模块,确保整个流程的高效和稳定。 通过以上对SpringBoot模块化框架的分析,我们可以看出其在提高开发效率、增强代码可维护性和扩展性方面的优势。在...
原版的nf-hipac需要为内核打patch,且只支持较低版本的内核,构建起来相对比较...模块化后的nf-hipac可以直接作为内核可加载模块编译,且适配了高版本的Linux内核。为了移植工作简化,去掉了和iptables模块的联动支持!
微信小程序模块化组件开发“框架” 更新日志:Changelog 简介 使小程序开发可以采用模块化的开发方式。没有任何构建相关的骨架或者约束。在运行阶段自动通过getter/setter,将你的“模块化组件”的数据和方法的...
总结,基于Vue的模块化、组件化和工程化编码应用例子展示了如何利用Vue.js构建高效、可维护的前端应用。通过模块化组织代码,组件化构建UI,以及Vue CLI带来的工程化实践,开发者能够更好地应对复杂项目的需求。
编译思想和组件设计方案借鉴了Vben框架,旨在构建高效、可维护、模块化的前端应用。 ## 项目的主要特性和功能 1. 模块化设计功能模块职责边界清晰,方便独立开发、测试和维护。 2. 灵活的服务配置通过环境变量可...
【摘要】:本文探讨了在校企合作背景下,如何构建电子信息工程技术专业的模块化课程体系,以适应社会和企业发展的需求。作者提出,构建这样的课程体系需要一个适应社会和企业发展需求的教师团队,一个科学合理的模块...
iOS工程模块化实践是指将iOS应用软件的开发过程按照模块化的方法来组织,每个模块作为独立的开发单元来构建、测试和维护。优化则是指在此基础上,通过各种技术手段提升模块的性能、质量和开发效率。 描述“B站-iOS...
在构建模块化项目时,可以使用现有的构建工具如Maven或Gradle,这些工具能够处理模块化项目中的依赖关系、包的导出和模块的组织。构建工具可以帮助自动化构建过程,确保模块间的依赖关系被正确处理,并且能够生成...
8. **持续集成/持续部署(CI/CD)**:多模块项目通常配合Jenkins、GitLab CI/CD等工具实现自动化构建和部署,确保每次代码提交后都能快速验证代码的正确性和部署到测试或生产环境。 总之,"maven多模块项目工程-已...
**Psake:基于.NET的构建自动化工具** Psake是一款强大的构建自动化工具,它利用PowerShell脚本语言进行构建过程的管理。在.NET开发环境中,构建自动化对于提高开发效率、确保代码质量和简化部署流程至关重要。...
【电子信息工程专业实践教学体系构建】模块化教学体系在电子信息工程专业的实践教学中扮演着重要角色,旨在培养具有高素质、强工程意识和实践能力的应用型本科人才。这种教学模式强调以能力为导向,以模块化课程为...