Use clang as the default C compiler

Clang compiles faster than GCC and is supposed to give more meaningful
error messages, so let's use it at least for development.

OwlPS Positioner does not compile with clang++, so we are stuck with g++
(or colorgcc).
This commit is contained in:
Matteo Cypriani 2012-05-23 18:44:37 +02:00
parent 437c5fec8c
commit 24a07f9e01
1 changed files with 8 additions and 3 deletions

View File

@ -53,9 +53,14 @@ SYMLINK := ln -sf
# C compiler
ifeq "$(origin CC)" "default"
COLORGCC := $(shell which colorgcc >/dev/null 2>&1 ; echo $$?)
ifeq "$(COLORGCC)" "0"
CC := colorgcc
CLANG := $(shell command -v clang >/dev/null ; echo $$?)
ifeq "$(CLANG)" "0"
CC := clang
else
COLORGCC := $(shell command -v colorgcc >/dev/null ; echo $$?)
ifeq "$(COLORGCC)" "0"
CC := colorgcc
endif
endif
endif