Commit: fe52568043b82e6b31bc94440cd5d45f37efcf39 Parent: d3faee9cc5af8c6dc07c2aaa8666f268c9e2bcfb Author: Randy Palamar Date: Wed, 12 Jun 2024 06:39:26 -0600 add a README Diffstat:
A | README.md | | | 19 | +++++++++++++++++++ |
M | build.sh | | | 6 | +++--- |
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md @@ -0,0 +1,19 @@ +# Colour Picker + +A basic colour picker written in C and [raylib][]. + +## Requirements +* raylib > v5 (Current release has a bug in mouse button code). + +## Installation + +Run `build.sh` and copy `colourpicker` where you want it. + +## Debug Hot Reloading + +Add `-D_DEBUG` to the cflags and build. The program will load +`libcolourpicker.so` at runtime and reload it when it is updated. +This is meant solely for development and is not guaranteed to be +working everywhere. + +[raylib]: https://www.raylib.com/ diff --git a/build.sh b/build.sh @@ -1,12 +1,12 @@ #!/bin/sh -cflags="-march=native -ggdb -O0 -Wall" +cflags="-march=native -ggdb -O3 -Wall" ldflags="-lraylib" # Hot Reloading/Debugging -cflags="$cflags -D_DEBUG" +#cflags="$cflags -D_DEBUG" -libcflags="$cflags -fPIC" +libcflags="$cflags -fPIC -flto" libldflags="$ldflags -shared" cc $libcflags colourpicker.c -o libcolourpicker.so $libldflags