aboutsummaryrefslogtreecommitdiff
path: root/patches/snes9x2002/1000-trimui-support.patch
blob: f7084d0823e8fef52770d4ab71061a9295ef266e (plain)
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 a3ef5e2..a7ef5e4 100644
--- a/Makefile
+++ b/Makefile
@@ -258,6 +258,23 @@ else ifeq ($(platform), miyoo)
    CFLAGS += -fomit-frame-pointer -ffast-math -fno-unroll-loops -flto -mcpu=arm926ej-s
    CFLAGS += -DFAST_ALIGNED_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
@@ -395,12 +412,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/$(TARGET_NAME)
+	LDFLAGS	+= -lgcov
+else ifeq ($(PROFILE), APPLY)
+	CFLAGS	+= -fprofile-use -fprofile-dir=../profile/$(TARGET_NAME) -fbranch-probabilities
+endif
+
 ifneq (,$(findstring msvc,$(platform)))
 ifeq ($(DEBUG),1)
 DEFINES += -MTd