|Luna Catkins 9672c22303||2 weeks ago|
|example||2 weeks ago|
|include||2 weeks ago|
|src||2 weeks ago|
|.gitignore||2 weeks ago|
|CHANGELOG.md||2 weeks ago|
|LICENSE.txt||2 weeks ago|
|README.md||2 weeks ago|
|premake5.lua||2 weeks ago|
Adopt is a small, cross-platform argument parsing library for C programs. While mainly targeting Unix-like systems, it should build fine with any C99-compatible C compiler.
It aims to be explicit, having no hidden state or features.
It is also modular, each file has one source file and one header. You can simply discard what you don't need.
The API is fairly compact, with names being kept short without becoming obfuscated.
Adopt also doesn't try to be a comprehensive solution.
No automatic string conversions will be done for you, nor will it check that arguments are semantically sensible.
While Adopt is mainly meant to simply be dropped into your existing code, it can be built as a static library.
To do so, you will need Premake 5.
A typical Linux build will look like this:
premake5 gmake2 make -C build config=release
With the built
libadopt.a being placed in
Premake doesn't currently feature a convenient way to handle
If you really want to install Adopt globally, you can run a few shell commands after building:
PREFIX="/usr/local" cp "build/bin/Release/libadopt.a" "$PREFIX/lib/" cp -r "include" "$PREFIX/"
example/main.c for now.
This project is licensed under the MIT license. See LICENSE.txt for more information.