Package: bbee
bbeeVery simple C - C++ BuilderI 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 scriptsthus 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 StartSimple 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 acapul.jsonfile already configured. You can create your main.c inside source directory and start by callingbbeecommand to compile and run.bbee --createOr run the command below to create an empty C++ projectbbee --create++Parameters:Field NameOptionTypeDescriptionExamplenamestrName of the project"sample"builderstrBuilder command"gcc" or "/usr/bin/gcc-7"sourceslistList of sources (directory or files)["./source", "main.c"]includeslistList of includes (dir or files)["./include", "/usr/local/includes"]librarieslistList of libraries to link["pthread", "GL", "m"]frameworkslistList of frameworks to link (MacOS)["OpenGL", "GLUT"]library_search_pathslistList of library directories["./libs", "/usr/local/lib"]outputlibrary / binarystrOutput format, binary exec. or a lib"binary"output_dirstrWhere to put the output file(s)"build"output_namestrOutput file name"hello_world" or "libmylib.a"cflagsstrgcc extra flags"-std=gnu99 -Wall -Werror -O3 -g"debugtrue / falseboolBBee Debug Mode on / offfalsesource_extensionstrExtension to crawl for compiling".c"run_after_buildboolRun the binary output file afterfalseinstalllistList of installation directivesSee below at "how to make install"How to make installCreating 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.