Skip to main content

bbee

Very simple C - C++ Builder

I wrote this little script to help me out with little C or C++ codes.

It basically crawls for sources, compiles and links the objects either to executable binary or to static library. (I love static libraries)

Sometimes I do not want to spend time writing Makefile scripts

thus while sending some sample codes to ppl, I include this.

This has a little convention so as long as you keep the convention, things will be successfully built.

Please note that, I did not wrote this little tiny script for big and complex projects, stick to cmake or autotools if you are planning to write sth complex.

Other than that, this script would do the job for you as well;

Quick Start

Simple run the command below to create an empty C project. This will create an empty directory tree with includes, build and source directory as well as a capul.json file already configured. You can create your main.c inside source directory and start by calling bbee command to compile and run.

bbee --create

Or run the command below to create an empty C++ project

bbee --create++

Parameters:

Field Name Option Type Description Example
name str Name of the project "sample"
builder str Builder command "gcc" or "/usr/bin/gcc-7"
sources list List of sources (directory or files) ["./source", "main.c"]
includes list List of includes (dir or files) ["./include", "/usr/local/includes"]
libraries list List of libraries to link ["pthread", "GL", "m"]
frameworks list List of frameworks to link (MacOS) ["OpenGL", "GLUT"]
library_search_paths list List of library directories ["./libs", "/usr/local/lib"]
output library / binary str Output format, binary exec. or a lib "binary"
output_dir str Where to put the output file(s) "build"
output_name str Output file name "hello_world" or "libmylib.a"
cflags str gcc extra flags "-std=gnu99 -Wall -Werror -O3 -g"
debug true / false bool BBee Debug Mode on / off false
source_extension str Extension to crawl for compiling ".c"
run_after_build bool Run the binary output file after false
install list List of installation directives See below at "how to make install"

How to make install

Creating an installation directive is quite easy, just tell what to copy and where to copy it.

If target directory name starts with ! then it will be created with "mkdir -p" command

# This example will copy build/hello_world to /usr/local/bin
[
    ["build/hello_world", "/usr/local/bin"]
]


# This example will try to copy build/hello_world to first directory it can verify
# if the directory does not exists, it will try the next directory in the list
[
    ["build/hello_world", ["/usr/local/bin", "/usr/bin"]]
]


# This will copy the headers include folder to includes and copy the library to libs
[
    ["./includes", "!/usr/local/includes/mylib"],
    ["build/libmylib.a", ["/usr/local/lib", "/usr/lib"]]
]

Here is a sample capul.json file

{
    "name": "Hello World",
    "builder": "gcc",
    "sources": [
        "./src"
    ],
    "includes": [
        "./include"
    ],
    "libraries": [
        "pthread"
    ],
    "library_search_paths": [
        "/usr/local/lib"
    ],
    "frameworks": [
        "OpenGL",
        "GLUT"
    ],
    "output": "binary",
    "output_dir": "build",
    "output_name": "hello_world",
    "cflags": "",
    "debug": true,
    "source_extension": ".c",
    "run_after_build": False
}

Note: just "sources", "output" fields are mandatory, others are optional.

If you want to contribute, please keep the code a single file and pep8 should pass without errors or warnings .

Metadata

Release files for bbee 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bbee 0.0.5
File Size Uploaded
bbee-0.0.5.tar.gz 6.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for bbee 0.0.5
File Interpreter ABI Platform
bbee-0.0.5-py3.6.egg Legacy Egg format - - Details
bbee-0.0.5-py3-none-any.whl Python 3 none any Details
bbee-0.0.5-py2-none-any.whl Python 2 none any Details

Total release size: 25.0 kB

Release files / bbee-0.0.5.tar.gz

Download URL bbee-0.0.5.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
43356f5ca844e34d8f693ce07299a01e0c20f7e39729ba6f0154987513645af0
BLAKE2b-256 checksum
How to use checksums
5fc506d688a4cb5a480561f16a73e75f4efd4b0d55640fedbf90150db7ab1485
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

Release files / bbee-0.0.5-py3.6.egg

Download URL bbee-0.0.5-py3.6.egg
Size 6.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
d309579abd39bb4effd7aa87ac6fd3482a2d40580e1fd8098d9cfc85ec529887
BLAKE2b-256 checksum
How to use checksums
d143f28bb5db7eb042598f801daa95980c401ecd20e107b376396185cf0c65b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

Release files / bbee-0.0.5-py3-none-any.whl

Download URL bbee-0.0.5-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d590463c85d552f3a72be04189884bd7a18391cccc9956a8831aa7b7fb798d3
BLAKE2b-256 checksum
How to use checksums
ea5b5d80821fe095045a3903a3b90ad3ec4a565f974e3767420f2c55de3eb426
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

Release files / bbee-0.0.5-py2-none-any.whl

Download URL bbee-0.0.5-py2-none-any.whl
Size 6.3 kB
Tags Python 2
SHA-256 checksum
How to use checksums
01931cb65c974117a9758eb2f4382aff6e24ab89429b399c4d7df2dce4e5a193
BLAKE2b-256 checksum
How to use checksums
b264232f10a217e8817d69ae91670f2747dcb6bafdafe0fac5488d27732a5382
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

Release history Release notifications | RSS feed

0.1.0

2 release files

0.0.9

3 release files

0.0.8

3 release files

0.0.7

3 release files

0.0.6

3 release files

This release

0.0.5 This release

4 release files

0.0.4

4 release files

0.0.3

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page