Build tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.9KB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Boxberry: A build system which scales down
  2. Boxberry is a build system which aims to be usable for tiny projects,
  3. all the way down to single source files.
  4. Not all projects need a big Makefile or a huge CMakeLists.txt.
  5. However, almost all projects grow to the size where they need some library,
  6. or some compiler flag, maybe an optimization option.
  7. Boxberry aims to make the path from running `cc file.c` to running
  8. `cc -lpthread file.c` to `cc file.c $(pkg-config --libs --cflags libfoo) -lpthread`
  9. as easy as possible.
  10. * Source files are automatically discovered (by default).
  11. * Dependencies can be specified in the source file: `//#bx pkgs := libfoo`
  12. * Linker and compiler flags can be specified in the source file:
  13. `//#bx ldlibs := -lpthread ldflags := -fsanitize=address cflags := -fsanitize=address`
  14. * A source file is automatically recompiled if it has changed, or if any
  15. included header files have changed.
  16. * If your project grows, you can put global configs in a `build.bx` file.
  17. Each directory can have a build.bx file, and each directory inherits the
  18. configuration of its parent.
  19. * Files can be specified instead of discovered automatically by setting the
  20. `files` variable in a `build.bx` file.
  21. ## Building
  22. This project can be built by running either `make` or `box`.
  23. The only dependency is `pthreads`.
  24. ## TODO
  25. * ~~Add `--print-compile-commands`~~
  26. * ~~Consider changing the config file format name from BBB to BB~~
  27. * Support different build configurations (requires conditionals in the parser)
  28. * ~~Re-work the command-line interface~~
  29. * ~~Save build configuration in the output dir~~
  30. * ~~Support one "main" build.bx file which specifies things like the target name~~
  31. * Support creating shared/static libraries too, not just binaries
  32. * Implement recursive mkdir in C++ instead of shelling out to mkdir
  33. * Support subprojects
  34. * ~~Look into saving the result of `$(CC) -MM` to make recompiles faster when
  35. little has changed~~