tsoding / musializer

Music Visualizer
MIT License
953 stars 100 forks source link

Add option for user to define their own CFLAGS and CC #93

Open LainLayer opened 8 months ago

LainLayer commented 8 months ago

CFLAGS

I didn't want to make a PR since I don't know how you would prefer to implement this. If you're fine with this in nob.c and handling it in every src/nob_*.c file then I'd be happy to make a PR.

#define CFLAGS "-O3", "-march=native"

I don't know however what flags msvc accepts, I do not own a windows device, and having a define sort of implies needing a set of default CFLAGS i.e -O0 -ggdb or something.

Another option is defining it in build/config.h but that sort of requires you to run nob once to generate the config.h if you don't know what should be in there.

Either way, this feature would be pretty useful since package managers like emerge and makepkg want to pass CFLAGS to build scripts.

CC

On windows, it is also possible to use clang, and if someone wants to cross-compile musializer, passing a cross-compilation gcc on linux would be useful