Skip to main content

A hassle free C (gcc) JSON build system.

Project description

Ceasium

A hassle free JSON based C build system.

I have developed this on 2023-10-15 by myself. I have only minimally used it myself. It most likely still does not support some critical features for serious C development

Introduction

I like programming in C, but I hate Makefiles and CMake. It takes an effort to learn and they do not have an intuitive syntax so I keep having to look up how to use them. In addition to this, they are quite time consuming to setup. I do admit, they are extremely configurable and portable. However, rarely do I need anything complicated. So I created Ceasium, which is very simple C uild system.

It works by creating compiler commands and running them in console. It uses pkg-config to add the correct flags for libraries you list in the build file.

Installation

pip install ceasium

Prerequisites

  • Python
  • C compiler
  • pkg-config (usually installed by default on all Linux distros, incase of Windows MSYS2 should have it for MACs brew install pkg-config).

Usage

Ceasium provides these commands:

ceasium init // Creates an empty c project
ceasium install // installs libraries defined in build.json
ceasium build // Builds .exe (default), .a or .dll based on configuration
ceasium run // Runs the built exe file
ceasium clean // Removes entire build directory

Arguments

All commands:

--path=<project-root-path>

Path to project root.

Configuration

Example config:

{
  "name": "myapp",
  "type": "exe",
  "compiler": "gcc",
  "libraries": ["opengl32", "glew32", "glfw3", "SDL2"],
  "package-manager": "pacman",
  "WarningsAsErrors": false,
  "OptimizationLevel": 3,
  "packages": {
    "pacman": [
      "pacman -S --needed --noconfirm mingw-w64-ucrt-x86_64-glew",
      "pacman -S --needed --noconfirm mingw-w64-ucrt-x86_64-SDL2",
      "pacman -S --needed --noconfirm mingw-w64-ucrt-x86_64-glfw"
    ],
    "apt": [
      "sudo apt-get install -y libglew-dev",
      "sudo apt-get install -y libglfw3",
      "sudo apt-get install -y libglfw3-dev",
      "sudo apt-get install -y libglfw3"
    ]
  }
}

Future Improvements

Thinking about what could ceasium use to be better a few things come to mind:

  • Package management. Adding pacman, apt lines might get tedious. Something like ceasium install glew32 would be nice. For this an index would need to be maintained which maps the name glew32 to a valid apt or pacman package.
  • Time for usage. I will be frank here - I have developed this on 2023-10-15, this needs to get more usage before I can know what is bad what is good and what needs to change.

Support

If you would like to support here's a link for that.

"Buy Me A Coffee"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ceasium-0.6.0.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

ceasium-0.6.0-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page