Initial commit
This commit is contained in:
48
BuildConfig/DetectCompiler.rules
Normal file
48
BuildConfig/DetectCompiler.rules
Normal file
@@ -0,0 +1,48 @@
|
||||
# BuildConfig/DetectCompiler.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 4/3/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Check for common compilers and sets flags for them
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# =================
|
||||
# Detect "gcc"
|
||||
# =================
|
||||
CC := $(shell which $(CC))
|
||||
|
||||
#Check if $CC filename has "gcc" in it, but don't be fooled if path has "gcc"
|
||||
ifeq ($(findstring gcc,$(notdir $(realpath $(CC)))),gcc)
|
||||
IS_GCC := 1
|
||||
else
|
||||
IS_GCC := 0
|
||||
endif
|
||||
|
||||
# =================
|
||||
# Detect "icc"
|
||||
# =================
|
||||
#Check if $CC filename has "icc" in it, but don't be fooled if path has "icc"
|
||||
ifeq ($(findstring icc,$(notdir $(realpath $(CC)))),icc)
|
||||
IS_ICC := 1
|
||||
else
|
||||
IS_ICC := 0
|
||||
endif
|
||||
|
||||
# =================
|
||||
# Detect plain "cc"
|
||||
# =================
|
||||
#Check if $CC filename /is/ "cc", but don't be fooled if path has "cc"
|
||||
ifeq ($(notdir $(realpath $(CC))),cc)
|
||||
IS_CC := 1
|
||||
else
|
||||
IS_CC := 0
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user