1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
diff --git a/Makefile b/Makefile
index e42d169..a1f8794 100644
--- a/Makefile
+++ b/Makefile
@@ -244,6 +244,23 @@ else ifeq ($(platform), gcw0)
CFLAGS += -fno-builtin -fno-exceptions
CFLAGS += -DPATH_MAX=256 -DFAST_LSB_WORD_ACCESS
+else ifeq ($(platform), trimui)
+ TARGET := $(TARGET_NAME)_libretro.so
+ CC = $(CROSS_COMPILE)gcc
+ AR = $(CROSS_COMPILE)ar
+ SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined
+ CFLAGS += -fsingle-precision-constant -fno-PIC -flto
+ CFLAGS += -DLSB_FIRST -DRIGHTSHIFT_IS_SAR
+ CFLAGS += -std=c99 -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s -mtune=arm926ej-s
+ LDFLAGS += -flto
+ OFLAGS += -Ofast -DNDEBUG=1
+ ARM_ASM = 1
+ ASM_CPU = 0
+ ASM_SPC700 = 0
+ ifeq (,$(DEBUG))
+ LDFLAGS += -s
+ endif
+
# Windows MSVC 2010 x64
else ifeq ($(platform), windows_msvc2010_x64)
CC = cl.exe
@@ -381,12 +398,21 @@ LIBRETRO_DIR := ./libretro
ifeq ($(DEBUG), 1)
DEFINES += -O0 -g
+else ifneq (,$(OFLAGS))
+DEFINES += $(OFLAGS)
else ifneq (,$(findstring msvc,$(platform)))
DEFINES += -O2 -DNDEBUG=1
else
DEFINES += -O3 -DNDEBUG=1
endif
+ifeq ($(PROFILE), GENERATE)
+ CFLAGS += -fprofile-generate=./profile/snes9x2002
+ LDFLAGS += -lgcov
+else ifeq ($(PROFILE), APPLY)
+ CFLAGS += -fprofile-use -fprofile-dir=../profile/snes9x2002 -fbranch-probabilities
+endif
+
ifneq (,$(findstring msvc,$(platform)))
ifeq ($(DEBUG),1)
DEFINES += -MTd
|