avoid -fPIC if not really needed, no need for a performance hit
ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
CFLAGS += -DREARMED
-CFLAGS += -ggdb -Wall -fPIC -O2 -ffast-math
+CFLAGS += -ggdb -Wall -O3 -ffast-math
SRC_STANDALONE += gpu.cpp
SRC_GPULIB += gpulib_if.cpp
ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
-CFLAGS += -ggdb -Wall -fPIC -O2
+CFLAGS += -ggdb -Wall
+ifndef DEBUG
+CFLAGS += -O2
+endif
OBJS += gpu.o
ifeq "$(ARCH)" "arm"
ARM_CORTEXA8 ?= 1
ifeq "$(ARM_CORTEXA8)" "1"
-CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
+CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fPIC
ASFLAGS += -mcpu=cortex-a8 -mfpu=neon
OBJS += cspace_neon.o
else
ifeq "$(ARCH)" "arm"
ARM_CORTEXA8 ?= 1
ifeq "$(ARM_CORTEXA8)" "1"
- CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
+ CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon \
+ -fPIC -mfloat-abi=softfp
ASFLAGS += -mcpu=cortex-a8 -mfpu=neon
else
CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s