{"id":18644320,"url":"https://github.com/rphii/bd","last_synced_at":"2026-05-08T01:41:48.395Z","repository":{"id":153524429,"uuid":"560031861","full_name":"rphii/bd","owner":"rphii","description":"simple C/C++ build tool","archived":false,"fork":false,"pushed_at":"2022-12-08T17:52:10.000Z","size":153,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T11:23:07.572Z","etag":null,"topics":["build-tool","build-tools","c","cpp","cygwin","windows"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rphii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-31T15:44:14.000Z","updated_at":"2022-11-10T16:49:42.000Z","dependencies_parsed_at":"2023-05-28T08:00:36.053Z","dependency_job_id":null,"html_url":"https://github.com/rphii/bd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphii%2Fbd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphii%2Fbd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphii%2Fbd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphii%2Fbd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rphii","download_url":"https://codeload.github.com/rphii/bd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449539,"owners_count":19640532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool","build-tools","c","cpp","cygwin","windows"],"created_at":"2024-11-07T06:11:30.441Z","updated_at":"2025-11-05T02:30:24.092Z","avatar_url":"https://github.com/rphii.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BD\nSimple (to use), one-file **b**uil**d** tool for C/C++ projects.\n\n## What does it do?\n- It's a simple build tool for C/C++ projects\n- Its instructions on what to build are directly stored within the source code itself (included as a [header file](bd.conf)), making it compact\n- You can choose between four different [build types](#types-of-projects-prjtype)\n- It makes sure to recompile a file if their dependency (either header file or library) was modified\n\n## How to use\n1. Clone this repository into a folder\n2. Add that folder to your PATH [(what's that?)](https://gist.github.com/nex3/c395b2f8fd4b02068be37c961301caa7)\n3. (Optional) In your project, create a [`bd.conf`](bd.conf) (see [configuration](#how-to-configure))\n4. Run `bd` in your project\n\n## Help / command line interface\nTo see a list of all available commands and their description, run `./bd -h`. Most important commands:\n- `build` build the projects (providing no arguments defaults to this)\n- `clean` clean the mess\n- `clean build` basically rebuild\n\n## Colors\nFollowing colors were picked depending on the action:\n- blue = compiling\n- yellow = linking\n- green = up to date\n- magenta = cleaning\n\n## How to configure\nHave a [`bd.conf`](bd.conf) file in your root project, where you would normally put your Makefiles.\n- **This file should / will be included in [`bd.c`](bd.c) as `CONFIG`.**\n- If you use [`bd.bat (Windows)`](bd.bat) or [`bd (Linux etc.)`](bd) the above is handled automatically.\n### Types of projects (`Prj::type`)\n- `BUILD_APP` builds an executable\n- `BUILD_STATIC` builds a static library\n- `BUILD_SHARED` builds a shared library\n- `BUILD_EXAMPLES` same as app, but it links each specified file\n### Name of the project (`Prj::name`)\nString of your output file (without extension).\n- **If you're building a library**, precede the name with `lib`\n- If you're building examples, the name is treated as a folder name instead\n- For applications, if it's `null` it defaults to `a`\n### Object directory (`Prj::objd`)\nIn this folder all the object (`.o`) and dependency (`.d`) files will be dumped.\n### Source files (`Prj::srcf`)\nString-array of source files necessary to successfully compile and link the project together. It's recommended to only use `*` and `?` when pattern matching to support all operating systems.\n### C compile flags (`Prj::cflgs`)\nString with your own flags. It's recommended to always at least include `-Wall`.\n### Linker options (`Prj::lopts`)\nString with your own linker options.\n### Linker libraries (`Prj::llibs`)\nString with your own linker libraries.\n- **Precede paths** with the `-L=` flag. (make sure to include the equals sign)\n- **precede names** with the `-l=` flag. (make sure to include the equals sign)\n### C compiler (`Prj::cc`)\nString specifying C compiler to use.\n- If it's `null` it defaults to `gcc`\n### C++ compiler (`Prj::cxx`)\nString specifying C++ compiler to use.\n- If it's `null` it defaults to `g++`\n\n## Minimum Recommended Configuration\n### C\n```c\n/* file: `bd.conf` */\n{\n    .type = BUILD_APP,\n    .name = \"app_name\",\n    .objd = \"obj\",\n    .srcf = D(\"src/*.c\"),\n    .cflgs = \"-Wall -O2\",\n}\n```\n### C++\n```c\n/* file: `bd.conf` */\n{\n    .type = BUILD_APP,\n    .name = \"app_name\",\n    .objd = \"obj\",\n    .srcf = D(\"src/*.cpp\"), /* .cpp or .cc both work */\n    .cflgs = \"-Wall -O2\",\n}\n```\n\n### Multiple different files\nSee https://github.com/rphii/Rlib where I created a library and used it to link with examples.\n\n## Minimum Possible Configuration\n### C\n```c\n{.srcf = D(\"*.c\")}\n```\n\n## Tested platforms\n- Windows\n- Cygwin\n- Linux\n- (...missing verification for the rest...)\n\n## General Notice\n- Don't have any spaces in any of the files having any business with this build tool\n- If you use subfolders in the config, always use `/` and not `\\`, even on Windows\n- Among others, `Prj::name` and `Prj::obj` can be a sequence of subfolders\n\n## Planned\n- maybe multithreading\n- verify if it works other platforms\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frphii%2Fbd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frphii%2Fbd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frphii%2Fbd/lists"}