Back CLANG availlable and some other corection
This commit is contained in:
parent
30084776e0
commit
0410d3665f
@ -16,33 +16,30 @@ SHELL := /bin/bash
|
|||||||
# Turns off suffix rules built into make
|
# Turns off suffix rules built into make
|
||||||
.SUFFIXES:
|
.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
|
# Overridable settings
|
||||||
V := 0
|
V := 0
|
||||||
W := 0
|
W := 0
|
||||||
DEBUG := 0
|
DEBUG := 0
|
||||||
USE_CLANG := 0
|
CLANG := 0
|
||||||
USE_CCACHE := 0
|
|
||||||
|
|
||||||
# Quiet command if V is 0
|
# Quiet command if V is 0
|
||||||
ifeq ("$(V)","0")
|
ifeq ("$(V)","0")
|
||||||
Q := @
|
Q := @
|
||||||
endif
|
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.
|
# This is the default target. It must be the first declared target.
|
||||||
all:
|
all:
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ endif
|
|||||||
|
|
||||||
# To be able to use ccache with pre-complied headers, some env variables are required
|
# To be able to use ccache with pre-complied headers, some env variables are required
|
||||||
CCACHE :=
|
CCACHE :=
|
||||||
ifeq ("$(USE_CCACHE)","1")
|
ifeq ("$(CCACHE)","1")
|
||||||
ifneq ("$(shell which ccache)","")
|
ifneq ("$(shell which ccache)","")
|
||||||
CCACHE := CCACHE_SLOPPINESS=time_macros ccache
|
CCACHE := CCACHE_SLOPPINESS=time_macros ccache
|
||||||
TARGET_GLOBAL_CFLAGS += -fpch-preprocess
|
TARGET_GLOBAL_CFLAGS += -fpch-preprocess
|
||||||
@ -65,7 +65,7 @@ ifeq ("$(USE_CCACHE)","1")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Pre-compiled header generation flag
|
# Pre-compiled header generation flag
|
||||||
ifneq ("$(USE_CLANG)","1")
|
ifneq ("$(CLANG)","1")
|
||||||
TARGET_PCH_FLAGS := -c
|
TARGET_PCH_FLAGS := -c
|
||||||
else
|
else
|
||||||
TARGET_PCH_FLAGS := -x c++-header
|
TARGET_PCH_FLAGS := -x c++-header
|
||||||
@ -108,8 +108,8 @@ endif
|
|||||||
|
|
||||||
GCC_PATH := $(shell which $(GCC))
|
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/")
|
GCC_VERSION := $(shell $(GCC) --version | head -1 | sed "s/.*\([0-9]\.[0-9]\.[0-9]\).*/\1/")
|
||||||
else
|
else
|
||||||
GCC_VERSION := 0.0.0
|
GCC_VERSION := $(shell $(GCC) --version | head -1 | sed "s/.*\([0-9]\.[0-9]-[0-9]\).*/\1/")
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user