YMake is a simple, lightweight build tool for C and C++ projects, written in C++. Its goal is to provide an easy-to-use and fast alternative to more complex build systems.
- Simple syntax: Easy to set up and configure for small to medium C/C++ projects.
- Cross-platform: Designed to work on major operating systems.
- Written in C++: Fast, with minimal overhead.
- Supports SWIG: Enables C/C++ projects with SWIG interfaces.
- Python Integration: (if applicable, based on repo composition)
- Highly customizable via TOML: Build configuration is managed through a TOML file, with practical examples in the
YMakeTestsdirectory.
- C++ compiler (GCC, Clang, MSVC, etc.)
- SWIG (if using SWIG interfaces)
- (Optional) Python 3.x if integrating Python modules
Clone the repository:
git clone https://github.com/DeltaY0/YMake.git
cd YMakeBuild using the provided scripts for your platform:
- On Windows:
build.bat
- On Linux/macOS:
./build.sh
Basic usage example:
./ymake [options] [target]- Use
-hor--helpto see available options. - Use
-vor--versionto show version information.
YMake uses a TOML configuration file to define build targets and settings.
You can find practical and advanced TOML configuration examples in the YMakeTests directory.
Customize your build process by editing this TOML file to suit your project's needs.
Suppose you have a simple C++ project with a ymake.toml in your root directory:
./ymake buildBelow is an example TOML configuration file (as found in a typical project within YMakeTests):
[project]
name = "SampleProject"
version = "1.0"
[build]
sources = ["main.cpp", "utils.cpp"]
include_dirs = ["include"]
cflags = ["-O2", "-Wall"]
ldflags = []
output = "sample_project"
[[target]]
name = "run"
cmd = "./sample_project"How to use it:
- Place the TOML configuration file (e.g.,
ymake.toml) in your project root. - Edit the
[project]section to specify your project's name and version. - List your source files and include directories under
[build]. - Optionally, add custom compiler (
cflags) and linker flags (ldflags). - Specify the output binary name with
output. - Define custom build or run targets under
[[target]]as needed. - Run
./ymake buildto build your project according to this configuration. - Execute custom targets (like
run) using./ymake run.
For more complex configurations, refer to the examples in YMakeTests.
src/— Main source codeYMakeTests/— Example TOML build files and test projectsscripts/— Helper scripts for building or installing (if available)
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page to get started.
- Fork this repository
- Create your feature branch:
git checkout -b my-feature - Commit your changes
- Push to the branch:
git push origin my-feature - Open a pull request
This project is licensed under the MIT License. See the LICENSE file for details.
YMake — Simple C/C++ Build Tool