Back CLANG availlable and some other corection

This commit is contained in:
Edouard Dupin 2012-07-23 09:05:16 +02:00
parent 30084776e0
commit 0410d3665f
2 changed files with 18 additions and 21 deletions

View File

@ -16,33 +16,30 @@ SHELL := /bin/bash
# Turns off suffix rules built into make
.SUFFIXES:
# Tools for target
GCC ?= $(CROSS)gcc
GXX ?= $(CROSS)g++
AR ?= $(CROSS)ar
LD ?= $(CROSS)ld
NM ?= $(CROSS)nm
STRIP ?= $(CROSS)strip
# Tools for host
HOST_GCC ?= gcc
HOST_GXX ?= g++
HOST_AR ?= ar
HOST_LD ?= ld
HOST_STRIP ?= strip
# Overridable settings
V := 0
W := 0
DEBUG := 0
USE_CLANG := 0
USE_CCACHE := 0
CLANG := 0
# Quiet command if V is 0
ifeq ("$(V)","0")
Q := @
endif
# Tools for target
ifneq ("$(CLANG)","1")
GCC ?= $(CROSS)gcc
GXX ?= $(CROSS)g++
else
GCC ?= $(CROSS)clang
GXX ?= $(CROSS)clang++
endif
AR ?= $(CROSS)ar
LD ?= $(CROSS)ld
NM ?= $(CROSS)nm
STRIP ?= $(CROSS)strip
# This is the default target. It must be the first declared target.
all:

View File

@ -57,7 +57,7 @@ endif
# To be able to use ccache with pre-complied headers, some env variables are required
CCACHE :=
ifeq ("$(USE_CCACHE)","1")
ifeq ("$(CCACHE)","1")
ifneq ("$(shell which ccache)","")
CCACHE := CCACHE_SLOPPINESS=time_macros ccache
TARGET_GLOBAL_CFLAGS += -fpch-preprocess
@ -65,7 +65,7 @@ ifeq ("$(USE_CCACHE)","1")
endif
# Pre-compiled header generation flag
ifneq ("$(USE_CLANG)","1")
ifneq ("$(CLANG)","1")
TARGET_PCH_FLAGS := -c
else
TARGET_PCH_FLAGS := -x c++-header
@ -108,8 +108,8 @@ endif
GCC_PATH := $(shell which $(GCC))
ifneq ("$(USE_CLANG)","1")
ifneq ("$(CLANG)","1")
GCC_VERSION := $(shell $(GCC) --version | head -1 | sed "s/.*\([0-9]\.[0-9]\.[0-9]\).*/\1/")
else
GCC_VERSION := 0.0.0
GCC_VERSION := $(shell $(GCC) --version | head -1 | sed "s/.*\([0-9]\.[0-9]-[0-9]\).*/\1/")
endif