libretro / 81-libretro

A port of the EightyOne ZX81 Emulator to libretro
GNU General Public License v3.0
20 stars 31 forks source link

libretro: allow mingw cross compile #18

Closed webgeek1234 closed 5 years ago

leiradel commented 5 years ago

Cross-compilation targetting Windows from a Linux host is achieved with the Makefile.windows_x86 and Makefile.windows_x86_64 makefiles. Is that what this PR is about?

webgeek1234 commented 5 years ago

Yeah, it is. I didn't even look in those makefiles, though. I'd assumed they were msvc or something native only. Mingw is the cross compiler in use. I'll tweak my ci scripts to call into those and close this if it works.

leiradel commented 5 years ago

Yeah, the file names are very misleading. I'll leave it for you to close this PR if those makefiles work for you.

webgeek1234 commented 5 years ago

Yeah, it works. Not entirely a fan of hardcoding all the compiler vars, but it does the job.

leiradel commented 5 years ago

I could define the toolchain with ?=. Do you think its preferable?

webgeek1234 commented 5 years ago

Yeah. I'm pushing changes like that to all the active libretro cores. So cross compile toolchains can pass in their own compilers. Like on Fedora, the mingw packages have mingw{32,64}-make, which define full paths to the right toolchain.

leiradel commented 5 years ago

These makefiles are generated from here, so if you could make the PRs to that repository instead it would be super.

webgeek1234 commented 5 years ago

I'll skip the ones with those style makefiles and look at that later. That's like ten out of the hundred repos I'm going through atm, though.