aboutsummaryrefslogtreecommitdiff
path: root/patches/gme/1000-trimui-build.patch
blob: 0c20db3b8517070ff90d746c540b078cf40f0ff6 (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
diff --git a/Makefile b/Makefile
index fa45fb3..9e20a41 100644
--- a/Makefile
+++ b/Makefile
@@ -39,6 +39,7 @@ ifeq ($(platform), unix)
 	ifneq ($(findstring Haiku,$(shell uname -a)),)
 		LIBM :=
 	endif
+	CFLAGS += -D_GNU_SOURCE
 
 # OS X
 else ifeq ($(platform), osx)
@@ -214,6 +215,19 @@ else ifeq ($(platform), switch)
         include $(LIBTRANSISTOR_HOME)/libtransistor.mk
         STATIC_LINKING=1
 
+else ifeq ($(platform), trimui)
+	TARGET := $(TARGET_NAME)_libretro.so
+	CC = $(CROSS_COMPILE)gcc
+	CXX = $(CROSS_COMPILE)g++
+	AR = $(CROSS_COMPILE)ar
+	SHARED := -shared -Wl,--version-script=link.T
+	CFLAGS += -fomit-frame-pointer -march=armv5te -mtune=arm926ej-s -ffast-math -fno-PIC -flto -D_GNU_SOURCE
+	CXXFLAGS += -fomit-frame-pointer -march=armv5te -mtune=arm926ej-s -ffast-math -fno-PIC -flto -D_GNU_SOURCE
+	LDFLAGS += -flto
+	ifeq (,$(DEBUG))
+		LDFLAGS += -s
+	endif
+
 # ARM
 else ifneq (,$(findstring armv,$(platform)))
 	TARGET := $(TARGET_NAME)_libretro.so