Convenience Makefile variable for building with Clang: make CLANG=1

git-svn-id: https://svn.eduke32.com/eduke32@2459 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2012-03-12 04:49:16 +00:00
parent c5519e3fe8
commit 13fe0618bc

View file

@ -45,6 +45,7 @@ endif
# EFENCE - 1 = compile with Electric Fence for malloc() debugging # EFENCE - 1 = compile with Electric Fence for malloc() debugging
# OPTLEVEL - 0..3 = GCC optimization strategy # OPTLEVEL - 0..3 = GCC optimization strategy
# LTO - 1 = enable link-time optimization, for GCC 4.5 and up # LTO - 1 = enable link-time optimization, for GCC 4.5 and up
# CLANG - 1 = enable the Clang/LLVM compiler
# #
RELEASE?=1 RELEASE?=1
DEBUGANYWAY?=0 DEBUGANYWAY?=0
@ -55,6 +56,7 @@ OPTLEVEL?=2
PROFILER?=0 PROFILER?=0
MUDFLAP?=0 MUDFLAP?=0
LTO?=0 LTO?=0
CLANG?=0
ifneq (0,$(KRANDDEBUG)) ifneq (0,$(KRANDDEBUG))
RELEASE=0 RELEASE=0
@ -73,6 +75,13 @@ RC=windres
RANLIB=ranlib RANLIB=ranlib
STRIP=strip STRIP=strip
ifneq (0,$(CLANG))
CC=clang
CXX=clang++
AR=llvm-ar
RANLIB=llvm-ranlib
endif
# compiler flags etc. # compiler flags etc.
LIBS=-lm LIBS=-lm
ifneq (0,$(USE_LIBPNG)) ifneq (0,$(USE_LIBPNG))