Giter VIP home page Giter VIP logo

xbuild's Introduction

X's Build System

This is a simple Make build system for Windows.

Prerequisites

Operating System

xbuild only support following operating systems:

  • Windows 10 (64 bits) and above. (Currently xbuild only support 64 bits Windows.)

Visual Studio

This build system requires Visual Studio 2019 or above

Python

This build system requires Python 3.10 or above

Git

Latest version of Git is required. GitBash should be installed to execute build command and scripts.

Windows Terminal (optional)

Windows Terminal is optional, but it is a good console, recommended.

Installation and Initialization

Clone

Use following command to get xbuild:

git clone --recurse-submodules [email protected]:realxye/xbuild.git

Initialization

Before use xbuild, execute following command in Git Bash to initialize xbuild and generate proper profiles.

cd <xbuild-root-dir>
python xbuild.py

After xbuild get initialized, restart bash or run command to launch xbuild to current bash environment:

source xbuild.bashrc

Update XBUILD Profiles

When system environment is changed, execute following command to update xbuild profile.

cdx
source xbuild.bashrc

Create Project

Project

A project includes project Makefile and one or more modules.

    PROJECT ROOT
    |---- Makefile
    |---- Module1
            |---- ...
    |---- Module2
            |---- ...
    |---- Module3
            |---- ...
    |---- Tests
            |---- TestModule1
            |---- TestModule2

To create a project, use following command:

xbuild-create project <PROJECT-NAME> [--force]

The --force option will force to create project even the folder or file with the same name already exist.

Check xbuild/samples for more information

Module

Every single module must follow a specific folder structure:

    MODULE ROOT
    |---- Makefile
    |---- src/
    |---- [include]/

To create a module for existing project, execute following command at project root directory:

xbuild-create module <MODULE-NAME>

Check xbuild/samples for more information

Build

To build target project, run following command in project's root directory:

xmake config=<release|debug> arch=<x86|x64|arm|arm64> [target=PATH-TO-SUB-MODULE]
Options Description
config Build configuration should be debug or release
arch Build architecture should be x86, x64, arm or arm64
target The sub-module target path, if target present, only specified sub-module will be built

Clean

To clean project, run following command:

xbuild clean config=<release|debug> arch=<x86|x64|arm|arm64> [target=PATH-TO-SUB-MODULE]
Options Description
config Build configuration should be debug or release
arch Build architecture should be x86, x64, arm or arm64
target The sub-module target path, if target present, only specified sub-module will be cleaned

Commands Reference

TBD

xbuild's People

Contributors

realxye avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.