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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
--- a/iortcw-1.51c/SP/Makefile 2019-03-16 18:09:48.000000000 +0000
+++ b/iortcw-1.51c/SP/Makefile 2021-03-08 17:23:21.000000000 +0000
@@ -5,7 +5,7 @@
#
COMPILE_PLATFORM=$(shell uname | sed -e 's/_.*//' | tr '[:upper:]' '[:lower:]' | sed -e 's/\//_/g')
-COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')
+COMPILE_ARCH=$(shell grep -Eo '^CARCH="[^"]+' /etc/makepkg.conf | sed s/'CARCH="'//)
ARM_VER_CHECK=$(shell uname -m)
ifeq ($(COMPILE_PLATFORM),sunos)
@@ -151,7 +151,7 @@
endif
ifndef COPYDIR
-COPYDIR="/usr/local/games/wolf"
+COPYDIR="/opt/return_to_castle_wolfenstein"
endif
ifndef COPYBINDIR
@@ -266,7 +266,11 @@
USE_BLOOM=1
endif
-ifndef USE_OPENGLES
+ifeq ($(ARCH),armv7h)
+USE_OPENGLES=1
+else ifeq ($(ARCH),aarch64)
+USE_OPENGLES=1
+else
USE_OPENGLES=0
endif
@@ -375,8 +379,12 @@
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
endif
- ifeq ($(ARCH),x86)
- OPTIMIZEVM = -O3 -march=i586
+ ifeq ($(ARCH),i686)
+ OPTIMIZEVM = -O3
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+ endif
+ ifeq ($(ARCH),pentium4)
+ OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
endif
ifeq ($(ARCH),ppc)
@@ -412,7 +420,11 @@
ifeq ($(USE_INTERNAL_LIBS),1)
ifeq ($(CROSS_COMPILING),1)
- ifeq ($(ARCH),x86)
+ ifeq ($(ARCH),pentium4)
+ SDL_LIBS = $(LIBSDIR)/linux32/libSDL2main.a \
+ $(LIBSDIR)/linux32/libSDL2-2.0.so.0.9.0
+ endif
+ ifeq ($(ARCH),i686)
SDL_LIBS = $(LIBSDIR)/linux32/libSDL2main.a \
$(LIBSDIR)/linux32/libSDL2-2.0.so.0.9.0
endif
@@ -911,7 +923,10 @@
RANLIB=ranlib
endif
-ifeq ($(ARCH),x86)
+ifeq ($(ARCH),i686)
+ BASE_CFLAGS += -m32
+endif
+ifeq ($(ARCH),pentium4)
BASE_CFLAGS += -m32
endif
ifeq ($(ARCH),x86_64)
@@ -929,12 +944,18 @@
ifeq ($(ARCH),sparc64)
BASE_CFLAGS += -m64
endif
+ifeq ($(ARCH),armv7h)
+ BASE_CFLAGS += -m32
+endif
+ifeq ($(ARCH),aarch64)
+ BASE_CFLAGS += -m64
+endif
ifndef HAVE_VM_COMPILED
HAVE_VM_COMPILED=false
endif
-ifneq ($(findstring $(ARCH),x86 x86_64 ppc ppc64 sparc sparc64),)
+ifneq ($(findstring $(ARCH),i686 pentium4 x86_64 armv7h aarch64 ppc ppc64 sparc sparc64),)
HAVE_VM_COMPILED=true
endif
@@ -1908,7 +1929,13 @@
endif
endif
-ifeq ($(ARCH),x86)
+ifeq ($(ARCH),i686)
+ Q3OBJ += \
+ $(B)/client/snd_mixa.o \
+ $(B)/client/matha.o \
+ $(B)/client/snapvector.o \
+ $(B)/client/ftola.o
+else ifeq ($(ARCH),pentium4)
Q3OBJ += \
$(B)/client/snd_mixa.o \
$(B)/client/matha.o \
@@ -2120,7 +2147,7 @@
endif
ifeq ($(HAVE_VM_COMPILED),true)
- ifneq ($(findstring $(ARCH),x86 x86_64),)
+ ifneq ($(findstring $(ARCH),i686 pentium4 x86_64),)
Q3OBJ += $(B)/client/vm_x86.o
endif
ifneq ($(findstring $(ARCH),ppc ppc64),)
@@ -2129,7 +2156,7 @@
ifneq ($(findstring $(ARCH),sparc sparc64),)
Q3OBJ += $(B)/client/vm_sparc.o
endif
- ifeq ($(ARM_VER_CHECK),armv7l)
+ ifneq ($(findstring $(ARCH),armv7h aarch64),)
Q3OBJ += $(B)/client/vm_armv7l.o
endif
endif
@@ -2268,7 +2295,12 @@
$(B)/ded/con_log.o \
$(B)/ded/sys_main.o
-ifeq ($(ARCH),x86)
+ifeq ($(ARCH),i686)
+ Q3DOBJ += \
+ $(B)/ded/matha.o \
+ $(B)/ded/snapvector.o \
+ $(B)/ded/ftola.o
+else ifeq ($(ARCH),pentium4)
Q3DOBJ += \
$(B)/ded/matha.o \
$(B)/ded/snapvector.o \
@@ -2291,7 +2323,7 @@
endif
ifeq ($(HAVE_VM_COMPILED),true)
- ifneq ($(findstring $(ARCH),x86 x86_64),)
+ ifneq ($(findstring $(ARCH),i686 pentium4 x86_64),)
Q3DOBJ += $(B)/ded/vm_x86.o
endif
ifneq ($(findstring $(ARCH),ppc ppc64),)
@@ -2300,7 +2332,7 @@
ifneq ($(findstring $(ARCH),sparc sparc64),)
Q3DOBJ += $(B)/ded/vm_sparc.o
endif
- ifeq ($(ARM_VER_CHECK),armv7l)
+ ifneq ($(findstring $(ARCH),armv7h aarch64),)
Q3DOBJ += $(B)/ded/vm_armv7l.o
endif
endif
|