4 ms·
Supporting custom compilers and cross‐compilation is as simple as using ${CC} in the Makefile instead of gcc…
by anjbe 10y ago
Supporting custom compilers and cross‐compilation is as simple as using ${CC} in the Makefile instead of gcc…
- revelation 10y agoThis is how we got into this mess in the first place. "Surely it can't be very difficult, let me just add this.."
- anjbe 10y agoPerhaps, but I suspect writing a portable Makefile is not as difficult as you think. Speaking as a packager, I have to patch many CMake build systems for portability issues. And don’t even get me started on SCons. Autotools is better in that regard, but has many flaws of its own. Here’s an example of a portable Makefile I’ve contributed to a project which handles the common packaging issues (staging directories, cross‐compilation, parallel builds): https://github.com/sinamas/gambatte/pull/6/commits/8d6fffc2b3614f3753aae30bf78e66626a88d428 https://github.com/sinamas/gambatte/pull/6/commits/8d6fffc2b... Compared to the original build system (two SConstructs): https://github.com/sinamas/gambatte/blob/master/gambatte_sdl/SConstruct https://github.com/sinamas/gambatte/blob/master/gambatte_sdl... https://github.com/sinamas/gambatte/blob/master/libgambatte/SConstruct https://github.com/sinamas/gambatte/blob/master/libgambatte/...