4 ms·
Makefiles are great for *nix systems. But, Go is a first class language on Windows. For open source projects who want to have contributors cross platform... how
by mfer 9y ago
Makefiles are great for *nix systems. But, Go is a first class language on Windows. For open source projects who want to have contributors cross platform... how can they use Makefiles effectively?
- asveikau 9y agoInstall gnu make. I personally typically go with msys since it is slightly less intrusive and more windows friendly than cygwin. There is also the new Linux subsystem...
- wtetzner 9y agoIf you build under the new Linux subsystem, you'll get a Linux binary. That's not a good solution if you want to build a Windows binary.
- asveikau 9y agoNote I didn't say anything about what compiler will be used or commands actually run. Make just calls the shell. If the shell runs stuff that produces Windows binaries you get Windows binaries. (Assuming they fixed the Linux subsystem in a way that execve(2) works on Windows binaries, which I heard in the first version they didn't have working, then there should be no problems.)
- rcarmo 9y agoYou can cross-compile, and I’ve done it a couple of times without any issues: https://github.com/golang/go/wiki/WindowsCrossCompiling https://github.com/golang/go/wiki/WindowsCrossCompiling