hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md67
1 files changed, 67 insertions, 0 deletions
diff --git a/README.md b/README.md
index dd9d25d..ab3d0ae 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,68 @@
# mkproj
+Just a dumb bullshit utility that generates build system boilerplate and gets the fuck out of your way.
+
+Like, imagine you want to start a new project. Maybe it's something scalable, maybe it's just some stupid scratch program to test an idea. Either way, before you've written a single line of the thing you actually want to make, you have to pick a build system, because project management in C is fucking cancer. Then you have to go out of your way to write a `Makefile`, or a `CMakeLists.txt`, or whatever other configuration file your build system decided it needed, instead of just actually writing whatever the fuck it is you wanted to write.
+
+`mkproj` fixes that. It makes a directory, generates the boilerplate for the build system you picked — currently `make`, `cmake`, `meson`, and `premake` — and that's it. You get a project you can immediately build, and you never use `mkproj` again.
+
+There are a couple of things you can customize: whether it initializes a git repository, the language (`c`, `cpp`, or, god forbid, `objc`), the language standard, where your build output goes, and whether you want a separate intermediate directory for object files. But most of the time, you shouldn't have to think about any of that.
+
+```sh
+$ mkproj hello
+```
+
+That's a C project using `make`. `cd hello && make` and you're off.
+
+## Usage
+```text
+$ mkproj --help
+mkproj 0.1.0 - dumb project generator
+
+generates boilerplate for make, cmake, meson or premake so you can stop
+writing the same fucking build files every time you start a project.
+
+usage: mkproj [-l lang] [-s std] [-b system] [--no-git] [--intermediate]
+ [--bin dir] [--bin-int dir] [--no-clangd] <name>
+ mkproj [-v | -h]
+
+options:
+ -l, --lang LANG language: c, cpp, objc (default c)
+ -s, --std STD language standard (default per language)
+ -b, --build SYSTEM build system: make, cmake, meson, premake (default make)
+ --no-git don't initialize a git repository
+ --intermediate use a separate intermediate object directory
+ --bin DIR build directory (default per build system)
+ --bin-int DIR separate object dir for make/premake; implies --intermediate
+ --no-clangd don't ignore clangd files in .gitignore
+ -v, --version print version and bail
+ -h, --help print this and bail
+
+by hachem <im@hachem.wtf>
+```
+
+```sh
+$ mkproj hello # C + make, the default
+$ mkproj -l cpp -s c++20 -b cmake app # C++20 + cmake
+$ mkproj -l objc -b meson gui # Objective-C + meson
+$ mkproj -b make --bin-int obj tool # objects in obj/, binary in bin/
+$ mkproj --no-git scratch # don't bother with git
+```
+
+## Build
+
+Needs a C compiler. Nothing else.
+
+```sh
+$ sudo make install # -> /usr/local/bin + man page
+$ make install PREFIX=~/.local # or somewhere without sudo
+```
+
+It really is one file, so if you don't want the Makefile:
+
+```sh
+$ cc -O2 mkproj.c -o mkproj
+```
+
+## License
+
+`mkproj` is licensed under the MIT License. See [LICENSE](LICENSE) for more.