Broken Mouse Studios' build solution
Go to file
ever 3023d612d5 v2023.05.0-BETA0 2023-05-01 12:55:47 +02:00
bmgen v2023.05.0-BETA0 2023-05-01 12:55:47 +02:00
tests Added tests 2023-04-21 19:43:25 +02:00
.gitignore Initial commit 2023-04-17 19:33:58 +02:00
.markdownlint.json Added markdownlint 2023-04-21 20:05:17 +02:00
LICENSE Initial commit 2023-04-17 19:33:58 +02:00
README.md Added markdownlint 2023-04-21 20:05:17 +02:00
setup.py Initial commit 2023-04-17 19:33:58 +02:00

README.md

bmgen - Broken Mouse Studios' build solution

DISCLAIMER

This project is currently in it's beta phase!

It needs to be cleaned up and does not yet have it's full set of features. You may quickly hit it's limits.

You should expect API changes and are welcome to give feedback via https://git.brokenmouse.studio/bms/bmgen/issues

Features

  • build scripts written in Python
  • incremental builds
  • temporary build directories
  • colorful and easy to read output
  • simple build commands

Installation

  • Install bmgen via pip install bmgen or python3 -m pip install bmgen

Building a simple C project

This example shows a script which builds two files named main.c and game.c into a binary named mygame with SDL2.

The directory structure created by bmgen will look like this:

- bin/
  - dbg/
    - obj/
      - main.o
      - game.o
    - mygame

The following is a breakdown of the script.

  1. First import the clang command:
from bmgen.commands.clang import clang
  1. Then set the base output directory and tell bmgen to create the base, variant and the clang command's object directory:
inst.base_output_dir = 'bin'
inst.update_output_dir()
clang.update_object_dir()
  1. Build the program via clang:
clang('mygame', ['main.c', 'game.c'], ['sdl2'])

The final bmgen.py looks like this:

from bmgen.commands.clang import clang

inst.base_output_dir = 'bin'
inst.update_output_dir()
clang.update_object_dir()

clang('mygame', ['main.c', 'game.c'], ['sdl2'])

Building the program is now as easy as running bmgen in your terminal!

License

© Broken Mouse Studios 2023
https://brokenmouse.studio

This software and it's accompanying files are licensed under the Mozilla Public License Version 2.0.

For the license's contents, see LICENSE or go to https://mozilla.org/MPL/2.0/.

By submitting patches or merge/pull requests, you grant Broken Mouse Studios the permission to use, copy, modify, distribute, publish and/or relicense the contributions you have made to the project.