Set C compiler properly on Windows
commitb232e3cb2b48796865b6816084cea9146883d6f4
authorEcho Nolan <echo@echonolan.net>
dateMon 7 Mar 2016, 22:51 (11 years ago)
parent7412545
config.mk+9−1
@@ -1,4 +1,12 @@
1−CC ?=cc
1+ifneq (, $(findstring MSYS, $(shell uname -a)))
2+ ifeq (cc,$(CC))
3+ # In MSYS2, when using the mingw version of gcc, there is no cc -> gcc
4+ # symlink. We can't use ?= here because CC is set implicitly to cc.
5+ # Cross compiling users can set CC to their cross compiler.
6+ CC =gcc
7+ endif
8+endif
9+
210AR ?=ar
311RANLIB ?=ranlib
412