Hi, awesome project and awesome work on the emulator!
I noticed you use a classic Makefile with some convoluted logic to build the executable and the cross-compilation is not the best experience so far.
I put together a quick Meson build file that works great on Linux (will test on Windows and macOS tomorrow), and will also download SDL2 from WrapDB if not available on the system.
In theory, compilation on all systems will become as simple as running these commands:
# creates and initializes the build directory, to be run only the first time
$ meson build
# builds the executable, also reloads the project if changes were made to the meson.build file
$ ninja -C build
On Windows Meson is also able to leverage the standard MS Build and Visual Studio toolchain, without the need for MinGW.
It also speeds up build quite significantly, as it uses ninja which is a much faster build tool than Make.
Quick unscientific benchmark using package time on Arch Linux, on an Intel i7 8750H with 16 GB of RAM and an NVMe SSD. Times are in seconds:
$ time -f e ninja -C build
0.48
$ time -f e make
2.24
I can open a PR after testing on other operating systems proves successful, if you want. Let me know if I can help in any way!
Hi, awesome project and awesome work on the emulator!
I noticed you use a classic Makefile with some convoluted logic to build the executable and the cross-compilation is not the best experience so far.
I put together a quick Meson build file that works great on Linux (will test on Windows and macOS tomorrow), and will also download SDL2 from WrapDB if not available on the system. In theory, compilation on all systems will become as simple as running these commands:
On Windows Meson is also able to leverage the standard MS Build and Visual Studio toolchain, without the need for MinGW.
It also speeds up build quite significantly, as it uses ninja which is a much faster build tool than Make.
Quick unscientific benchmark using package
time
on Arch Linux, on an Intel i7 8750H with 16 GB of RAM and an NVMe SSD. Times are in seconds:I can open a PR after testing on other operating systems proves successful, if you want. Let me know if I can help in any way!