mirror of https://github.com/axmolengine/axmol.git
Added clang support for linux.
This commit is contained in:
parent
15081f5616
commit
524b6903a5
|
@ -1,14 +1,36 @@
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# LINUX MAKEFILE
|
||||||
|
#
|
||||||
|
# Available options are:
|
||||||
|
# - CLANG=1 : Compiles with clang instead of gcc. Clang must be in your PATH.
|
||||||
|
# - V=1 : Enables the verbose mode.
|
||||||
|
# - DEBUG=1 : Enables the debug mode, disable compiler optimizations.
|
||||||
|
# - OPENAL=1 : Uses OpenAL instead of FMOD as sound engine.
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
CXX = g++
|
|
||||||
# Remove -Wall, because it enables -Wunused-function, and this warning exists in webp.h
|
# Remove -Wall, because it enables -Wunused-function, and this warning exists in webp.h
|
||||||
# when enable c++11. I don't know why.
|
# when enable c++11. I don't know why.
|
||||||
# GCC 4.6 is primary platform for cocos2d v.3, because it's default compiler for Android,
|
# GCC 4.6 is primary platform for cocos2d v.3, because it's default compiler for Android,
|
||||||
# Blackberry, some Linux distributions.It supports all important features of c++11, but have
|
# Blackberry, some Linux distributions.It supports all important features of c++11, but have
|
||||||
# no flag "-std=c++11" (which was turned on in version 4.7).
|
# no flag "-std=c++11" (which was turned on in version 4.7).
|
||||||
CCFLAGS += -MMD -Werror -Wno-deprecated-declarations -fPIC
|
CCFLAGS += -MMD -Wno-deprecated-declarations -fPIC
|
||||||
CXXFLAGS += -MMD -Werror -Wno-deprecated-declarations -fPIC -std=gnu++0x
|
CXXFLAGS += -MMD -Wno-deprecated-declarations -fPIC -std=gnu++0x
|
||||||
|
|
||||||
|
ifeq ($(CLANG), 1)
|
||||||
|
CC := clang
|
||||||
|
CXX := clang++
|
||||||
|
DEFINES += -D__STRICT_ANSI__ # Allows clang 3.3 to use __float128
|
||||||
|
else
|
||||||
|
CC = gcc
|
||||||
|
CXX = g++
|
||||||
|
CCFLAGS += -Werror
|
||||||
|
CXXFLAGS += -Werror
|
||||||
|
endif
|
||||||
|
|
||||||
ARFLAGS = cr
|
ARFLAGS = cr
|
||||||
|
|
||||||
DEFINES += -DLINUX -DCC_KEYBOARD_SUPPORT
|
DEFINES += -DLINUX -DCC_KEYBOARD_SUPPORT
|
||||||
|
|
Loading…
Reference in New Issue