|
|
@@ -4,6 +4,7 @@ |
|
|
|
# Created by falkTX |
|
|
|
# |
|
|
|
|
|
|
|
AR ?= ar |
|
|
|
CC ?= gcc |
|
|
|
CXX ?= g++ |
|
|
|
|
|
|
@@ -19,38 +20,41 @@ endif |
|
|
|
endif |
|
|
|
|
|
|
|
# -------------------------------------------------------------- |
|
|
|
# Common build and link flags |
|
|
|
# Set build and link flags |
|
|
|
|
|
|
|
BASE_FLAGS = -Wall -Wextra -pipe |
|
|
|
BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections |
|
|
|
ifneq ($(NOOPT),true) |
|
|
|
BASE_OPTS += -mtune=generic -msse -msse2 -mfpmath=sse |
|
|
|
BASE_FLAGS = -Wall -Wextra -pipe -MD -MP |
|
|
|
BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections |
|
|
|
|
|
|
|
ifneq ($(MACOS),true) |
|
|
|
# MacOS doesn't support this |
|
|
|
BASE_OPTS += -mfpmath=sse |
|
|
|
endif |
|
|
|
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -Wl,--strip-all |
|
|
|
|
|
|
|
ifeq ($(MACOS),true) |
|
|
|
# MacOS linker flags |
|
|
|
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs |
|
|
|
else |
|
|
|
# Common linker flags |
|
|
|
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-O1 -Wl,--as-needed -Wl,--strip-all |
|
|
|
endif |
|
|
|
|
|
|
|
ifeq ($(RASPPI),true) |
|
|
|
# Raspberry-Pi flags |
|
|
|
BASE_OPTS = -O2 -ffast-math |
|
|
|
ifneq ($(NOOPT),true) |
|
|
|
BASE_OPTS += -march=armv6 -mfpu=vfp -mfloat-abi=hard |
|
|
|
endif |
|
|
|
# Raspberry-Pi optimization flags |
|
|
|
BASE_OPTS = -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard |
|
|
|
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all |
|
|
|
endif |
|
|
|
|
|
|
|
ifeq ($(PANDORA),true) |
|
|
|
# OpenPandora flags |
|
|
|
BASE_OPTS = -O2 -ffast-math |
|
|
|
ifneq ($(NOOPT),true) |
|
|
|
BASE_OPTS += -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp |
|
|
|
endif |
|
|
|
# OpenPandora optimization flags |
|
|
|
BASE_OPTS = -O2 -ffast-math -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp |
|
|
|
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all |
|
|
|
endif |
|
|
|
|
|
|
|
ifneq ($(NOOPT),true) |
|
|
|
# No optimization flags |
|
|
|
BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections |
|
|
|
endif |
|
|
|
|
|
|
|
ifneq ($(WIN32),true) |
|
|
|
# not needed for Windows |
|
|
|
BASE_FLAGS += -fPIC -DPIC |
|
|
|