summarylogtreecommitdiffstats
path: root/target-optimizing.patch
blob: b1014a6daede8845195955f5403fe1c4ab3ca000 (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
--- onscripter-jh/Makefile.Linux	2021-02-12 13:19:35.333287357 +0800
+++ onscripter-jh.new/Makefile.Linux	2021-02-12 13:18:28.066124344 +0800
@@ -55,6 +55,18 @@
 LIBS += -llua5.1
 EXT_OBJS += LUAHandler$(OBJSUFFIX)
 
+# optional: SIMD optimizing
+ARCH = $(shell uname -m)
+DEFS += -DUSE_SIMD
+ifneq ($(filter i686 x86_64,$(ARCH)),)
+DEFS += -DUSE_SIMD_X86_SSE2
+else
+ifneq ($(filter armv7h armv7l,$(ARCH)),)
+DEFS += -DUSE_SIMD_ARM_NEON
+EXT_FLAGS += -mfpu=neon
+endif
+endif
+
 # optional: force screen width for PDA
 #DEFS += -DPDA_WIDTH=640cd
 
diff --color --unified --recursive --text onscripter-jh/Makefile.Linux onscripter-jh.new/Makefile.Linux
--- onscripter-jh/Makefile.Linux	2021-02-22 18:12:31.623850620 +0800
+++ onscripter-jh.new/Makefile.Linux	2021-02-22 18:13:09.442802982 +0800
@@ -61,7 +61,7 @@
 ifneq ($(filter i686 x86_64,$(ARCH)),)
 DEFS += -DUSE_SIMD_X86_SSE2
 else
-ifneq ($(filter armv7h armv7l,$(ARCH)),)
+ifneq ($(filter armv7h armv7l aarch64,$(ARCH)),)
 DEFS += -DUSE_SIMD_ARM_NEON
 EXT_FLAGS += -mfpu=neon
 endif