mirror of
https://github.com/google/brotli.git
synced 2024-12-29 11:11:09 +00:00
5da7e37a06
- Distinguish between CC/CFLAGS, CPP/CPPFLAGS and CXX/CXXFLAGS. Do not store compiler flags in CPPFLAGS, which is for preprocessor, and do not try to link files using a preprocessor. - Use COMMON_FLAGS for flags that are for both C and C++. - Drop -m64 flag which is wrong on 32-bit systems. - Use $(MAKE) instead of make, so that parallel building works.
19 lines
301 B
Makefile
19 lines
301 B
Makefile
OS := $(shell uname)
|
|
|
|
CC ?= gcc
|
|
CXX ?= g++
|
|
|
|
EMCC = emcc
|
|
EMCCFLAGS = -O1 -W -Wall
|
|
|
|
COMMON_FLAGS = -fno-omit-frame-pointer -no-canonical-prefixes
|
|
|
|
ifeq ($(OS), Darwin)
|
|
CPPFLAGS += -DOS_MACOSX
|
|
else
|
|
COMMON_FLAGS += -fno-tree-vrp
|
|
endif
|
|
|
|
CFLAGS += $(COMMON_FLAGS)
|
|
CXXFLAGS += $(COMMON_FLAGS) -std=c++11
|