3 ms·
Have you made a cross-build system that compiles to all three on a single machine, or that works when run on each of the three? I've been working on a system ba
by vortico 9y ago
Have you made a cross-build system that compiles to all three on a single machine, or that works when run on each of the three? I've been working on a system based on gcc, MinGW64, and osxcross, but if that fails I'll use docker with crossbuild.
- analogwzrd 9y agoI'm taking a grad school embedded systems class where we have to maintain a makefile that cross compiles to two different embedded platforms as well as compiles on the host machine. We're doing it by calling a PLATFORM and using an IF statement in the makefile: make PLATFORM=HOST for example. The makefile then replaces the compiler variable, compiler flags, linker, flags, etc.
- gkya 9y agoLinux's makefile is fairly easy to read, and has a very smart way of doing cross platform builds w/ gcc.
- xoroshiro 9y agoThe Stockfish Makefile is probably the best example of this I've seen. It also does some advanced stuff I'm not sure I understand yet. Profiling, setting flags for CPU instructions and making profile builds, all with support for different C++ compilers. Pretty neat stuff from one of the best chess engines. https://github.com/official-stockfish/Stockfish/blob/master/src/Makefile https://github.com/official-stockfish/Stockfish/blob/master/...