소스 검색

readme

feature/dependency-graph
Martin Dørum 4 년 전
부모
커밋
8251de9f42
1개의 변경된 파일40개의 추가작업 그리고 0개의 파일을 삭제
  1. 40
    0
      README.md

+ 40
- 0
README.md 파일 보기

@@ -0,0 +1,40 @@
# BBBuild: A build system which scales down

BBBuild is a build system which aims to be usable for tiny projects,
all the way down to single source files.

Not all projects need a big Makefile or a huge CMakeLists.txt.
However, almost all projects grow to the size where they need some library,
or some compiler flag, maybe an optimization option.
BBBuild aims to make the path from running `cc file.c` to running
`cc -lpthread file.c` to `cc file.c $(pkg-config --libs --cflags libfoo) -lpthread`
as easy as possible.

* Source files are automatically discovered (by default).
* Dependencies can be specified in the source file: `//#bb pkgs := libfoo`
* Linker and compiler flags can be specified in the source file:
`//#bb ldlibs := -lpthread ldflags := -fsanitize=address cflags := -fsanitize=address`
* A source file is automatically recompiled if it has changed, or if any
included header files have changed.
* If your project grows, you can put global configs in a `build.bbb` file.
Each directory can have a build.bbb file, and each directory inherits the
configuration of its parent.
* Files can be specified instead of discovered automatically by setting the
`files` variable in a `build.bbb` file.

## Building

This project can be built by running either `make` or `bbbuild`.
The only dependency is `pthreads`.

## TODO

* Add `--print-compile-commands`
* Consider changing the config file format name from BBB to BB
* Support different build configurations (requires conditionals in the BBB parser)
* Re-work the command-line interface
* Save build configuration in the output dir
* Support one "main" build.bbb file which specifies things like the target name
* Support creating shared/static libraries too, not just binaries
* Implement recursive mkdir in C++ instead of shelling out to mkdir
* Support subprojects

Loading…
취소
저장