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项目的主配置文件,用于...
本研究主要探讨的是如何利用模块化组件构建开源大数据ETL工具,以提升数据处理的效率和可扩展性。 一、模块化设计的优势 模块化组件构建技术的核心思想是将复杂系统拆分为多个独立的、可重用的模块,每个模块专注于...
本文详细探讨了开源大数据ETL(Extract-Transform-Load)工具中模块化组件构建的技术方法,并以Kettle这个开源ETL软件作为案例,分析了其模块化组件构建的实践应用。Kettle是Pentaho数据集成(PDI)系统的一个重要...
总的来说,Move_Certificates-v1.9模块通过自动化证书的导入过程,提高了用户在Android设备上管理安全连接的效率。用户只需在Magisk环境中安装此模块并重启设备,就可以享受更加便捷的证书管理体验。然而,值得注意...
3. **模块化工具与框架** - **Webpack**:强大的模块打包工具,可以处理各种静态资源,并提供模块热替换、代码分割等功能。 - **Rollup**:轻量级的模块打包工具,专注于优化JavaScript库的构建。 - **Browserify...
"swift-iOS模块化构建方案模块间解耦路由中心设计方案"正是针对这一问题提出的解决方案,它旨在通过模块化设计和路由中心来实现应用组件间的高效解耦。 模块化构建方案的核心思想是将一个大型的项目拆分成多个小型...
【标签】:“JavaScript开发-构建工具”表明这套构建工具的核心是JavaScript,它主要服务于JavaScript开发者,通过自动化工具帮助开发者解决项目构建中的各种问题,例如代码转换、优化、打包等,使开发者可以专注于...
《嵌入式系统的微模块化程序设计:实用状态图C_C++实现》是一本专为嵌入式系统设计人员及计算机科学和电气工程领域的学生编写的教程书。本书由美籍波兰裔博士Miro Samek撰写,中文版由三万钧翻译,详细介绍了量子...
- 数据可视化工具 - 图形工具(SVG、Canvas、WebGL) - 前端数据存储工具 - HTTP/网络工具 - 代码编辑工具 - HTML/CSS/JavaScript工具 - 静态网页构建工具 - 无障碍访问工具 - 渐进式Web应用工具 - 脚手架...
使用Jenkins、GitLab CI/CD等工具,自动化构建、测试和部署各个模块,确保整个流程的高效和稳定。 通过以上对SpringBoot模块化框架的分析,我们可以看出其在提高开发效率、增强代码可维护性和扩展性方面的优势。在...
原版的nf-hipac需要为内核打patch,且只支持较低版本的内核,构建起来相对比较...模块化后的nf-hipac可以直接作为内核可加载模块编译,且适配了高版本的Linux内核。为了移植工作简化,去掉了和iptables模块的联动支持!
微信小程序模块化组件开发“框架” 更新日志:Changelog 简介 使小程序开发可以采用模块化的开发方式。没有任何构建相关的骨架或者约束。在运行阶段自动通过getter/setter,将你的“模块化组件”的数据和方法的...
总结,基于Vue的模块化、组件化和工程化编码应用例子展示了如何利用Vue.js构建高效、可维护的前端应用。通过模块化组织代码,组件化构建UI,以及Vue CLI带来的工程化实践,开发者能够更好地应对复杂项目的需求。
编译思想和组件设计方案借鉴了Vben框架,旨在构建高效、可维护、模块化的前端应用。 ## 项目的主要特性和功能 1. 模块化设计功能模块职责边界清晰,方便独立开发、测试和维护。 2. 灵活的服务配置通过环境变量可...
在QT中,我们可以利用pri子工程来实现模块化的概念。本文将详细介绍如何在QT环境中创建和使用pri子工程,以及与pro工程的配合。 首先,让我们理解一下 pri 文件和 pro 文件。`pro`文件是QT项目的基本配置文件,它...
QPT - Python程序模块化封装工具(Py转EXE),快速将Python打包为EXE并添加CUDA、NoAVX等支持。QPT是一款可以“模拟”开发环境的多功能封装工具,最短只需一行命令即可将普通的Python脚本打包成EXE可执行程序,并...
在构建模块化项目时,可以使用现有的构建工具如Maven或Gradle,这些工具能够处理模块化项目中的依赖关系、包的导出和模块的组织。构建工具可以帮助自动化构建过程,确保模块间的依赖关系被正确处理,并且能够生成...
8. **持续集成/持续部署(CI/CD)**:多模块项目通常配合Jenkins、GitLab CI/CD等工具实现自动化构建和部署,确保每次代码提交后都能快速验证代码的正确性和部署到测试或生产环境。 总之,"maven多模块项目工程-已...
**Psake:基于.NET的构建自动化工具** Psake是一款强大的构建自动化工具,它利用PowerShell脚本语言进行构建过程的管理。在.NET开发环境中,构建自动化对于提高开发效率、确保代码质量和简化部署流程至关重要。...