binji / binjgb

Gameboy emulator implemented in C, that also runs in the browser
https://binji.github.io/binjgb/
MIT License
550 stars 62 forks source link

Allow passing cmake flags to make #48

Closed avivace closed 1 year ago

avivace commented 1 year ago

Hey,

I was trying to find a way to pass the new RGBDS_LIVE flag but I couldn't figure out how without modifying the Makefile (or calling cmake directly).

This is a simple modification allowing to pass additional flags to the EMSCRIPTEN_BUILD rule.

E.g., it makes this possible:

make wasm CMAKEFLAGS="-DRGBDS_LIVE=ON" EMSCRIPTEN_DIR=${EMSDK}/upstream/emscripten

Not passing any CMAKEFLAGS variable will also work so I don't think it's breaking anything.

Only thing I was wondering if the same should be done to the standard build rule (BUILD).

Thanks to @ISSOtm for the help on this

binji commented 1 year ago

Discussed on discord, it's easier to use the CMake build directly for this.