An open API service indexing awesome lists of open source software.

https://github.com/averms/ccombine

Bundles a C/C++ source file, recursively inlining any local includes.
https://github.com/averms/ccombine

Last synced: about 1 month ago
JSON representation

Bundles a C/C++ source file, recursively inlining any local includes.

Awesome Lists containing this project

README

          

# ccombine

`ccombine` is based on a script in the Zstd source called [`combine.sh`][csh].
I rewrote it in Python because the original is very slow (see
[the benchmark][bnh]). The only change is a better command-line interface.

It can be used to create an amalgamated distribution of your library for easy
embedding into another source tree. Some reasons to do this are outlined in
[nothings/stb][sfl] and ["SQLite is really easy to compile"][je].

You can install it by cloning and running `pip install .`. This will install a
script called `ccombine` into your Python environment. Alternatively, you can
simply download [`ccombine.py`][ccom]. The only requirement is Python 3.7 and
its standard library.

If you need 3.6 compatibility see the python36-compat branch. Note that it is
often rebased and force-pushed.

[sfl]: https://github.com/nothings/stb#why-single-file-headers
[je]: https://jvns.ca/blog/2019/10/28/sqlite-is-really-easy-to-compile/
[csh]: https://github.com/facebook/zstd/blob/69b8361b0c92b0f2cc145eea17b7ff930166ea9d/contrib/single_file_libs/combine.sh
[ccom]: https://github.com/averms/ccombine/raw/master/source/ccombine.py
[bnh]: benchmark/README.md