aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 07d5368..acaf28c 100644
--- a/Makefile
+++ b/Makefile
@@ -288,6 +288,22 @@ else ifeq ($(platform), miyoo)
FLAGS += -fomit-frame-pointer -ffast-math -march=armv5te -mtune=arm926ej-s
FLAGS += -DFAST_ALIGNED_LSB_WORD_ACCESS -fno-unroll-loops
+else ifeq ($(platform), trimui)
+ TARGET := $(TARGET_NAME)_libretro.so
+ CC = $(CROSS_COMPILE)gcc
+ AR = $(CROSS_COMPILE)ar
+ SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
+ CFLAGS += -fsingle-precision-constant -fno-PIC -flto
+ CFLAGS += -DLSB_FIRST -DFAST_ALIGNED_LSB_WORD_ACCESS -DRIGHTSHIFT_IS_SAR
+ CFLAGS += -std=c99 -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s -mtune=arm926ej-s
+ LDFLAGS += -flto
+ifeq ($(DEBUG),1)
+ LDFLAGS += -g
+else
+ LDFLAGS += -s
+endif
+ OPTIMIZE += -Ofast -DNDEBUG=1
+
# (armv7 a7, hard point, neon based) ###
# NESC, SNESC, C64 mini
else ifeq ($(platform), classic_armv7_a7)
@@ -577,10 +593,20 @@ endif
ifeq ($(DEBUG),1)
FLAGS += -O0 -g
+else ifneq (,$(OPTIMIZE))
+ FLAGS += $(OPTIMIZE)
else
FLAGS += -O2 -DNDEBUG
endif
+
+ifeq ($(PROFILE), GENERATE)
+ CFLAGS += -fprofile-generate=./profile/$(TARGET_NAME)
+ LIBS += -lgcov
+else ifeq ($(PROFILE), APPLY)
+ CFLAGS += -fprofile-use -fprofile-dir=../profile/$(TARGET_NAME) -fbranch-probabilities
+endif
+
ifneq (,$(findstring msvc,$(platform)))
ifeq ($(DEBUG),1)
FLAGS += -MTd