Allow JSMESS to compile with -Werror (nw)

This commit is contained in:
Justin Kerk 2014-03-12 16:22:04 +00:00
parent 35c14d7114
commit 446ac03dd9
3 changed files with 16 additions and 9 deletions

View File

@ -1,15 +1,16 @@
ifneq ($(TARGETOS),emscripten)
ifneq (,$(findstring clang,$(CC)))
include $(SRC)/build/flags_clang.mak
else
TEST_GCC = $(shell gcc --version)
# is it Clang symlinked/renamed to GCC (Xcode 5.0 on OS X)?
ifeq ($(findstring clang,$(TEST_GCC)),clang)
ifneq (,$(findstring emcc,$(CC)))
# Emscripten compiler is based on clang
include $(SRC)/build/flags_clang.mak
else
include $(SRC)/build/flags_gcc.mak
TEST_GCC = $(shell gcc --version)
# is it Clang symlinked/renamed to GCC (Xcode 5.0 on OS X)?
ifeq ($(findstring clang,$(TEST_GCC)),clang)
include $(SRC)/build/flags_clang.mak
else
include $(SRC)/build/flags_gcc.mak
endif
endif
endif
endif

View File

@ -11,4 +11,8 @@ TEST_CLANG := $(shell clang --version)
ifeq ($(findstring 3.4,$(TEST_CLANG)),3.4)
CCOMFLAGS += -Wno-inline-new-delete
endif
endif
ifeq ($(TARGETOS),emscripten)
CCOMFLAGS += -Qunused-arguments
endif

View File

@ -356,8 +356,10 @@ else
FLACOPTS += -DVERSION=\"1.2.1\"
endif
ifneq (,$(findstring clang,$(CC)))
ifneq (,$(findstring emcc,$(CC)))
FLACOPTS += -Wno-unused-const-variable
endif
endif
LIBFLACOBJS = \
$(LIBOBJ)/libflac/bitmath.o \