2014-10-30 12:59:37 +00:00
|
|
|
OS := $(shell uname)
|
|
|
|
|
2015-03-13 15:00:28 +00:00
|
|
|
CC ?= gcc
|
|
|
|
CXX ?= g++
|
2014-10-30 12:59:37 +00:00
|
|
|
|
2015-01-13 15:42:35 +00:00
|
|
|
EMCC = emcc
|
|
|
|
EMCCFLAGS = -O1 -W -Wall
|
|
|
|
|
2015-07-30 16:08:40 +00:00
|
|
|
COMMON_FLAGS = -fno-omit-frame-pointer -no-canonical-prefixes -O2
|
2015-03-13 15:00:28 +00:00
|
|
|
|
2014-10-30 12:59:37 +00:00
|
|
|
ifeq ($(OS), Darwin)
|
|
|
|
CPPFLAGS += -DOS_MACOSX
|
|
|
|
else
|
2015-03-13 15:00:28 +00:00
|
|
|
COMMON_FLAGS += -fno-tree-vrp
|
2014-10-30 12:59:37 +00:00
|
|
|
endif
|
|
|
|
|
2015-03-13 15:00:28 +00:00
|
|
|
CFLAGS += $(COMMON_FLAGS)
|
|
|
|
CXXFLAGS += $(COMMON_FLAGS) -std=c++11
|