Browse Source

mesonify octacore

Daniel Kolesa 7 months ago
parent
commit
8c8a344d33
10 changed files with 197 additions and 576 deletions
  1. 2
    0
      .gitignore
  2. 9
    0
      meson.build
  3. 0
    504
      src/Makefile
  4. 71
    0
      src/client/meson.build
  5. 0
    22
      src/enet/Makefile
  6. 0
    50
      src/enet/check_cflags.sh
  7. 62
    0
      src/enet/meson.build
  8. 21
    0
      src/master/meson.build
  9. 8
    0
      src/meson.build
  10. 24
    0
      src/server/meson.build

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
1
+bin_unix/native_*
2
+build

+ 9
- 0
meson.build View File

@@ -0,0 +1,9 @@
1
+project('octacore', ['cpp'],
2
+    version: '0.0.1',
3
+    default_options: ['buildtype=debugoptimized', 'cpp_std=c++17'],
4
+    meson_version: '>=0.46'
5
+)
6
+
7
+bin_path = join_paths(meson.source_root(), 'bin_unix')
8
+
9
+subdir('src')

+ 0
- 504
src/Makefile View File

@@ -1,504 +0,0 @@
1
-CXXFLAGS= -O3 -fomit-frame-pointer -ffast-math
2
-override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti
3
-
4
-PLATFORM= $(shell uname -s)
5
-PLATFORM_ARCH= $(shell uname -m)
6
-PLATFORM_PREFIX= native
7
-
8
-INCLUDES= -Ishared -Iengine -Igame -Ienet/include
9
-
10
-STRIP=
11
-ifeq (,$(findstring -g,$(CXXFLAGS)))
12
-ifeq (,$(findstring -pg,$(CXXFLAGS)))
13
-  STRIP=strip
14
-endif
15
-endif
16
-
17
-MV=mv
18
-
19
-ifneq (,$(findstring MINGW,$(PLATFORM)))
20
-WINDRES= windres
21
-ifneq (,$(findstring 64,$(PLATFORM)))
22
-ifneq (,$(findstring CROSS,$(PLATFORM)))
23
-  CXX=x86_64-w64-mingw32-g++
24
-  WINDRES=x86_64-w64-mingw32-windres
25
-ifneq (,$(STRIP))
26
-  STRIP=x86_64-w64-mingw32-strip
27
-endif
28
-endif
29
-WINLIB=lib64
30
-WINBIN=../bin64
31
-override CXX+= -m64
32
-override WINDRES+= -F pe-x86-64
33
-else
34
-ifneq (,$(findstring CROSS,$(PLATFORM)))
35
-  CXX=i686-w64-mingw32-g++
36
-  WINDRES=i686-w64-mingw32-windres
37
-ifneq (,$(STRIP))
38
-  STRIP=i686-w64-mingw32-strip
39
-endif
40
-endif
41
-WINLIB=lib
42
-WINBIN=../bin
43
-override CXX+= -m32
44
-override WINDRES+= -F pe-i386
45
-endif
46
-CLIENT_INCLUDES= $(INCLUDES) -Iinclude
47
-STD_LIBS= -static-libgcc -static-libstdc++
48
-CLIENT_LIBS= -mwindows $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lSDL2 -lSDL2_image -lSDL2_mixer -lzlib1 -lopengl32 -lenet -lws2_32 -lwinmm
49
-else	
50
-CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl2-config --cflags`
51
-CLIENT_LIBS= -Lenet -lenet -L/usr/X11R6/lib -lX11 `sdl2-config --libs` -lSDL2_image -lSDL2_mixer -lz -lGL
52
-endif
53
-ifeq ($(PLATFORM),Linux)
54
-CLIENT_LIBS+= -lrt
55
-else
56
-ifneq (,$(findstring GNU,$(PLATFORM))) 
57
-CLIENT_LIBS+= -lrt 
58
-endif 
59
-endif
60
-
61
-CLIENT_OBJS= \
62
-	shared/crypto.o \
63
-	shared/geom.o \
64
-	shared/glemu.o \
65
-	shared/stream.o \
66
-	shared/tools.o \
67
-	shared/zip.o \
68
-	engine/aa.o \
69
-	engine/bih.o \
70
-	engine/blend.o \
71
-	engine/client.o	\
72
-	engine/command.o \
73
-	engine/console.o \
74
-	engine/dynlight.o \
75
-	engine/grass.o \
76
-	engine/light.o \
77
-	engine/main.o \
78
-	engine/material.o \
79
-	engine/menus.o \
80
-	engine/movie.o \
81
-	engine/normal.o	\
82
-	engine/octa.o \
83
-	engine/octaedit.o \
84
-	engine/octarender.o \
85
-	engine/physics.o \
86
-	engine/pvs.o \
87
-	engine/rendergl.o \
88
-	engine/renderlights.o \
89
-	engine/rendermodel.o \
90
-	engine/renderparticles.o \
91
-	engine/rendersky.o \
92
-	engine/rendertext.o \
93
-	engine/renderva.o \
94
-	engine/server.o	\
95
-	engine/serverbrowser.o \
96
-	engine/shader.o \
97
-	engine/sound.o \
98
-	engine/stain.o \
99
-	engine/texture.o \
100
-	engine/ui.o \
101
-	engine/water.o \
102
-	engine/world.o \
103
-	engine/worldio.o \
104
-	game/ai.o \
105
-	game/client.o \
106
-	game/entities.o \
107
-	game/game.o \
108
-	game/render.o \
109
-	game/scoreboard.o \
110
-	game/server.o \
111
-	game/waypoint.o \
112
-	game/weapon.o
113
-
114
-CLIENT_PCH= shared/cube.h.gch engine/engine.h.gch game/game.h.gch
115
-
116
-SERVER_INCLUDES= -DSTANDALONE -Istandalone/shared -Istandalone/engine -Istandalone/game $(INCLUDES)
117
-ifneq (,$(findstring MINGW,$(PLATFORM)))
118
-SERVER_INCLUDES+= -Iinclude
119
-SERVER_LIBS= -mwindows $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lzlib1 -lenet -lws2_32 -lwinmm
120
-MASTER_LIBS= $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lzlib1 -lenet -lws2_32 -lwinmm
121
-else
122
-SERVER_LIBS= -Lenet -lenet -lz
123
-MASTER_LIBS= $(SERVER_LIBS)
124
-endif
125
-
126
-SERVER_OBJS= \
127
-	standalone/shared/crypto.o \
128
-	standalone/shared/stream.o \
129
-	standalone/shared/tools.o \
130
-	standalone/engine/command.o \
131
-	standalone/engine/server.o \
132
-	standalone/engine/worldio.o \
133
-	standalone/game/entities.o \
134
-	standalone/game/server.o
135
-
136
-SERVER_PCH= standalone/shared/cube.h.gch standalone/engine/engine.h.gch standalone/game/game.h.gch
137
-
138
-MASTER_OBJS= \
139
-	standalone/shared/crypto.o \
140
-	standalone/shared/stream.o \
141
-	standalone/shared/tools.o \
142
-	standalone/engine/command.o \
143
-	standalone/engine/master.o
144
-
145
-SERVER_MASTER_OBJS= $(SERVER_OBJS) $(filter-out $(SERVER_OBJS),$(MASTER_OBJS))
146
-
147
-default: all
148
-
149
-all: client server
150
-
151
-clean:
152
-	-$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_PCH) $(SERVER_MASTER_OBJS) tess_client tess_server tess_master
153
-
154
-fixspace:
155
-	sed -i 's/[ \t]*$$//; :rep; s/^\([ ]*\)\t/\1    /g; trep' shared/*.c shared/*.cpp shared/*.h engine/*.cpp engine/*.h game/*.cpp game/*.h
156
-
157
-$(filter-out shared/%,$(CLIENT_PCH)): $(filter shared/%,$(CLIENT_PCH))
158
-$(CLIENT_PCH): %.h.gch: %.h
159
-	$(CXX) $(CXXFLAGS) -x c++-header -o $@.tmp $<
160
-	$(MV) $@.tmp $@
161
-
162
-$(CLIENT_OBJS): CXXFLAGS += $(CLIENT_INCLUDES)
163
-$(filter shared/%,$(CLIENT_OBJS)): $(filter shared/%,$(CLIENT_PCH))
164
-$(filter engine/%,$(CLIENT_OBJS)): $(filter engine/%,$(CLIENT_PCH))
165
-$(filter game/%,$(CLIENT_OBJS)): $(filter game/%,$(CLIENT_PCH))
166
-
167
-$(filter-out standalone/shared/%,$(SERVER_PCH)): $(filter standalone/shared/%,$(SERVER_PCH))
168
-$(SERVER_PCH): standalone/%.h.gch: %.h
169
-	$(CXX) $(CXXFLAGS) -x c++-header -o $@.tmp $<
170
-	$(MV) $@.tmp $@
171
-
172
-$(SERVER_MASTER_OBJS): CXXFLAGS += $(SERVER_INCLUDES)
173
-$(filter standalone/shared/%,$(SERVER_MASTER_OBJS)): $(filter standalone/shared/%,$(SERVER_PCH))
174
-$(filter standalone/engine/%,$(SERVER_MASTER_OBJS)): $(filter standalone/engine/%,$(SERVER_PCH))
175
-$(filter standalone/game/%,$(SERVER_MASTER_OBJS)): $(filter standalone/game/%,$(SERVER_PCH))
176
-
177
-$(SERVER_MASTER_OBJS): standalone/%.o: %.cpp
178
-	$(CXX) $(CXXFLAGS) -c -o $@ $<
179
-
180
-ifneq (,$(findstring MINGW,$(PLATFORM)))
181
-client: $(CLIENT_OBJS)
182
-	$(WINDRES) -I vcpp -i vcpp/mingw.rc -J rc -o vcpp/mingw.res -O coff 
183
-	$(CXX) $(CXXFLAGS) -o $(WINBIN)/tesseract.exe vcpp/mingw.res $(CLIENT_OBJS) $(CLIENT_LIBS)
184
-
185
-server: $(SERVER_OBJS)
186
-	$(WINDRES) -I vcpp -i vcpp/mingw.rc -J rc -o vcpp/mingw.res -O coff
187
-	$(CXX) $(CXXFLAGS) -o $(WINBIN)/tess_server.exe vcpp/mingw.res $(SERVER_OBJS) $(SERVER_LIBS)
188
-
189
-master: $(MASTER_OBJS)
190
-	$(CXX) $(CXXFLAGS) -o $(WINBIN)/tess_master.exe $(MASTER_OBJS) $(MASTER_LIBS)
191
-
192
-install: all
193
-else
194
-client:	libenet $(CLIENT_OBJS)
195
-	$(CXX) $(CXXFLAGS) -o tess_client $(CLIENT_OBJS) $(CLIENT_LIBS)
196
-
197
-server:	libenet $(SERVER_OBJS)
198
-	$(CXX) $(CXXFLAGS) -o tess_server $(SERVER_OBJS) $(SERVER_LIBS)  
199
-	
200
-master: libenet $(MASTER_OBJS)
201
-	$(CXX) $(CXXFLAGS) -o tess_master $(MASTER_OBJS) $(MASTER_LIBS)  
202
-
203
-shared/tessfont.o: shared/tessfont.c
204
-	$(CXX) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags`
205
-
206
-tessfont: shared/tessfont.o
207
-	$(CXX) $(CXXFLAGS) -o tessfont shared/tessfont.o `freetype-config --libs` -lz
208
-
209
-install: all
210
-	cp -f tess_client	../bin_unix/$(PLATFORM_PREFIX)_client
211
-	cp -f tess_server	../bin_unix/$(PLATFORM_PREFIX)_server
212
-ifneq (,$(STRIP))
213
-	$(STRIP) ../bin_unix/$(PLATFORM_PREFIX)_client
214
-	$(STRIP) ../bin_unix/$(PLATFORM_PREFIX)_server
215
-endif
216
-endif
217
-
218
-enet/libenet.a:
219
-	$(MAKE) -C enet
220
-libenet: enet/libenet.a
221
-
222
-depend:
223
-	makedepend -Y -Ishared -Iengine -Igame $(CLIENT_OBJS:.o=.cpp)
224
-	makedepend -a -o.h.gch -Y -Ishared -Iengine -Igame $(CLIENT_PCH:.h.gch=.h)
225
-	makedepend -a -pstandalone/ -Y -DSTANDALONE -Ishared -Iengine -Igame $(SERVER_MASTER_OBJS:standalone/%.o=%.cpp)
226
-	makedepend -a -pstandalone/ -o.h.gch -Y -DSTANDALONE -Ishared -Iengine -Igame $(SERVER_PCH:standalone/%.h.gch=%.h)
227
-
228
-# DO NOT DELETE
229
-
230
-shared/crypto.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
231
-shared/crypto.o: shared/command.h shared/glexts.h shared/glemu.h
232
-shared/crypto.o: shared/iengine.h shared/igame.h
233
-shared/geom.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
234
-shared/geom.o: shared/command.h shared/glexts.h shared/glemu.h
235
-shared/geom.o: shared/iengine.h shared/igame.h
236
-shared/glemu.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
237
-shared/glemu.o: shared/command.h shared/glexts.h shared/glemu.h
238
-shared/glemu.o: shared/iengine.h shared/igame.h
239
-shared/stream.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
240
-shared/stream.o: shared/command.h shared/glexts.h shared/glemu.h
241
-shared/stream.o: shared/iengine.h shared/igame.h
242
-shared/tools.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
243
-shared/tools.o: shared/command.h shared/glexts.h shared/glemu.h
244
-shared/tools.o: shared/iengine.h shared/igame.h
245
-shared/zip.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
246
-shared/zip.o: shared/command.h shared/glexts.h shared/glemu.h
247
-shared/zip.o: shared/iengine.h shared/igame.h
248
-engine/aa.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
249
-engine/aa.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
250
-engine/aa.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
251
-engine/aa.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
252
-engine/bih.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
253
-engine/bih.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
254
-engine/bih.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
255
-engine/bih.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
256
-engine/blend.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
257
-engine/blend.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
258
-engine/blend.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
259
-engine/blend.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
260
-engine/client.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
261
-engine/client.o: shared/ents.h shared/command.h shared/glexts.h
262
-engine/client.o: shared/glemu.h shared/iengine.h shared/igame.h
263
-engine/client.o: engine/world.h engine/octa.h engine/light.h engine/texture.h
264
-engine/client.o: engine/bih.h engine/model.h
265
-engine/command.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
266
-engine/command.o: shared/ents.h shared/command.h shared/glexts.h
267
-engine/command.o: shared/glemu.h shared/iengine.h shared/igame.h
268
-engine/command.o: engine/world.h engine/octa.h engine/light.h
269
-engine/command.o: engine/texture.h engine/bih.h engine/model.h
270
-engine/console.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
271
-engine/console.o: shared/ents.h shared/command.h shared/glexts.h
272
-engine/console.o: shared/glemu.h shared/iengine.h shared/igame.h
273
-engine/console.o: engine/world.h engine/octa.h engine/light.h
274
-engine/console.o: engine/texture.h engine/bih.h engine/model.h
275
-engine/dynlight.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
276
-engine/dynlight.o: shared/ents.h shared/command.h shared/glexts.h
277
-engine/dynlight.o: shared/glemu.h shared/iengine.h shared/igame.h
278
-engine/dynlight.o: engine/world.h engine/octa.h engine/light.h
279
-engine/dynlight.o: engine/texture.h engine/bih.h engine/model.h
280
-engine/grass.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
281
-engine/grass.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
282
-engine/grass.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
283
-engine/grass.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
284
-engine/light.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
285
-engine/light.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
286
-engine/light.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
287
-engine/light.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
288
-engine/main.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
289
-engine/main.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
290
-engine/main.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
291
-engine/main.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
292
-engine/material.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
293
-engine/material.o: shared/ents.h shared/command.h shared/glexts.h
294
-engine/material.o: shared/glemu.h shared/iengine.h shared/igame.h
295
-engine/material.o: engine/world.h engine/octa.h engine/light.h
296
-engine/material.o: engine/texture.h engine/bih.h engine/model.h
297
-engine/menus.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
298
-engine/menus.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
299
-engine/menus.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
300
-engine/menus.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
301
-engine/movie.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
302
-engine/movie.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
303
-engine/movie.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
304
-engine/movie.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
305
-engine/normal.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
306
-engine/normal.o: shared/ents.h shared/command.h shared/glexts.h
307
-engine/normal.o: shared/glemu.h shared/iengine.h shared/igame.h
308
-engine/normal.o: engine/world.h engine/octa.h engine/light.h engine/texture.h
309
-engine/normal.o: engine/bih.h engine/model.h
310
-engine/octa.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
311
-engine/octa.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
312
-engine/octa.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
313
-engine/octa.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
314
-engine/octaedit.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
315
-engine/octaedit.o: shared/ents.h shared/command.h shared/glexts.h
316
-engine/octaedit.o: shared/glemu.h shared/iengine.h shared/igame.h
317
-engine/octaedit.o: engine/world.h engine/octa.h engine/light.h
318
-engine/octaedit.o: engine/texture.h engine/bih.h engine/model.h
319
-engine/octarender.o: engine/engine.h shared/cube.h shared/tools.h
320
-engine/octarender.o: shared/geom.h shared/ents.h shared/command.h
321
-engine/octarender.o: shared/glexts.h shared/glemu.h shared/iengine.h
322
-engine/octarender.o: shared/igame.h engine/world.h engine/octa.h
323
-engine/octarender.o: engine/light.h engine/texture.h engine/bih.h
324
-engine/octarender.o: engine/model.h
325
-engine/physics.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
326
-engine/physics.o: shared/ents.h shared/command.h shared/glexts.h
327
-engine/physics.o: shared/glemu.h shared/iengine.h shared/igame.h
328
-engine/physics.o: engine/world.h engine/octa.h engine/light.h
329
-engine/physics.o: engine/texture.h engine/bih.h engine/model.h engine/mpr.h
330
-engine/pvs.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
331
-engine/pvs.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
332
-engine/pvs.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
333
-engine/pvs.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
334
-engine/rendergl.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
335
-engine/rendergl.o: shared/ents.h shared/command.h shared/glexts.h
336
-engine/rendergl.o: shared/glemu.h shared/iengine.h shared/igame.h
337
-engine/rendergl.o: engine/world.h engine/octa.h engine/light.h
338
-engine/rendergl.o: engine/texture.h engine/bih.h engine/model.h
339
-engine/renderlights.o: engine/engine.h shared/cube.h shared/tools.h
340
-engine/renderlights.o: shared/geom.h shared/ents.h shared/command.h
341
-engine/renderlights.o: shared/glexts.h shared/glemu.h shared/iengine.h
342
-engine/renderlights.o: shared/igame.h engine/world.h engine/octa.h
343
-engine/renderlights.o: engine/light.h engine/texture.h engine/bih.h
344
-engine/renderlights.o: engine/model.h
345
-engine/rendermodel.o: engine/engine.h shared/cube.h shared/tools.h
346
-engine/rendermodel.o: shared/geom.h shared/ents.h shared/command.h
347
-engine/rendermodel.o: shared/glexts.h shared/glemu.h shared/iengine.h
348
-engine/rendermodel.o: shared/igame.h engine/world.h engine/octa.h
349
-engine/rendermodel.o: engine/light.h engine/texture.h engine/bih.h
350
-engine/rendermodel.o: engine/model.h engine/ragdoll.h engine/animmodel.h
351
-engine/rendermodel.o: engine/vertmodel.h engine/skelmodel.h engine/hitzone.h
352
-engine/rendermodel.o: engine/md2.h engine/md3.h engine/md5.h engine/obj.h
353
-engine/rendermodel.o: engine/smd.h engine/iqm.h
354
-engine/renderparticles.o: engine/engine.h shared/cube.h shared/tools.h
355
-engine/renderparticles.o: shared/geom.h shared/ents.h shared/command.h
356
-engine/renderparticles.o: shared/glexts.h shared/glemu.h shared/iengine.h
357
-engine/renderparticles.o: shared/igame.h engine/world.h engine/octa.h
358
-engine/renderparticles.o: engine/light.h engine/texture.h engine/bih.h
359
-engine/renderparticles.o: engine/model.h engine/explosion.h
360
-engine/renderparticles.o: engine/lensflare.h engine/lightning.h
361
-engine/rendersky.o: engine/engine.h shared/cube.h shared/tools.h
362
-engine/rendersky.o: shared/geom.h shared/ents.h shared/command.h
363
-engine/rendersky.o: shared/glexts.h shared/glemu.h shared/iengine.h
364
-engine/rendersky.o: shared/igame.h engine/world.h engine/octa.h
365
-engine/rendersky.o: engine/light.h engine/texture.h engine/bih.h
366
-engine/rendersky.o: engine/model.h
367
-engine/rendertext.o: engine/engine.h shared/cube.h shared/tools.h
368
-engine/rendertext.o: shared/geom.h shared/ents.h shared/command.h
369
-engine/rendertext.o: shared/glexts.h shared/glemu.h shared/iengine.h
370
-engine/rendertext.o: shared/igame.h engine/world.h engine/octa.h
371
-engine/rendertext.o: engine/light.h engine/texture.h engine/bih.h
372
-engine/rendertext.o: engine/model.h
373
-engine/renderva.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
374
-engine/renderva.o: shared/ents.h shared/command.h shared/glexts.h
375
-engine/renderva.o: shared/glemu.h shared/iengine.h shared/igame.h
376
-engine/renderva.o: engine/world.h engine/octa.h engine/light.h
377
-engine/renderva.o: engine/texture.h engine/bih.h engine/model.h
378
-engine/server.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
379
-engine/server.o: shared/ents.h shared/command.h shared/glexts.h
380
-engine/server.o: shared/glemu.h shared/iengine.h shared/igame.h
381
-engine/server.o: engine/world.h engine/octa.h engine/light.h engine/texture.h
382
-engine/server.o: engine/bih.h engine/model.h
383
-engine/serverbrowser.o: engine/engine.h shared/cube.h shared/tools.h
384
-engine/serverbrowser.o: shared/geom.h shared/ents.h shared/command.h
385
-engine/serverbrowser.o: shared/glexts.h shared/glemu.h shared/iengine.h
386
-engine/serverbrowser.o: shared/igame.h engine/world.h engine/octa.h
387
-engine/serverbrowser.o: engine/light.h engine/texture.h engine/bih.h
388
-engine/serverbrowser.o: engine/model.h
389
-engine/shader.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
390
-engine/shader.o: shared/ents.h shared/command.h shared/glexts.h
391
-engine/shader.o: shared/glemu.h shared/iengine.h shared/igame.h
392
-engine/shader.o: engine/world.h engine/octa.h engine/light.h engine/texture.h
393
-engine/shader.o: engine/bih.h engine/model.h
394
-engine/sound.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
395
-engine/sound.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
396
-engine/sound.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
397
-engine/sound.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
398
-engine/stain.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
399
-engine/stain.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
400
-engine/stain.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
401
-engine/stain.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
402
-engine/texture.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
403
-engine/texture.o: shared/ents.h shared/command.h shared/glexts.h
404
-engine/texture.o: shared/glemu.h shared/iengine.h shared/igame.h
405
-engine/texture.o: engine/world.h engine/octa.h engine/light.h
406
-engine/texture.o: engine/texture.h engine/bih.h engine/model.h
407
-engine/ui.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
408
-engine/ui.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
409
-engine/ui.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
410
-engine/ui.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
411
-engine/ui.o: engine/textedit.h
412
-engine/water.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
413
-engine/water.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
414
-engine/water.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
415
-engine/water.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
416
-engine/world.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
417
-engine/world.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
418
-engine/world.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
419
-engine/world.o: engine/light.h engine/texture.h engine/bih.h engine/model.h
420
-engine/worldio.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
421
-engine/worldio.o: shared/ents.h shared/command.h shared/glexts.h
422
-engine/worldio.o: shared/glemu.h shared/iengine.h shared/igame.h
423
-engine/worldio.o: engine/world.h engine/octa.h engine/light.h
424
-engine/worldio.o: engine/texture.h engine/bih.h engine/model.h
425
-game/ai.o: game/game.h shared/cube.h shared/tools.h shared/geom.h
426
-game/ai.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
427
-game/ai.o: shared/iengine.h shared/igame.h game/ai.h
428
-game/client.o: game/game.h shared/cube.h shared/tools.h shared/geom.h
429
-game/client.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
430
-game/client.o: shared/iengine.h shared/igame.h game/ai.h game/ctf.h
431
-game/entities.o: game/game.h shared/cube.h shared/tools.h shared/geom.h
432
-game/entities.o: shared/ents.h shared/command.h shared/glexts.h
433
-game/entities.o: shared/glemu.h shared/iengine.h shared/igame.h game/ai.h
434
-game/game.o: game/game.h shared/cube.h shared/tools.h shared/geom.h
435
-game/game.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
436
-game/game.o: shared/iengine.h shared/igame.h game/ai.h
437
-game/render.o: game/game.h shared/cube.h shared/tools.h shared/geom.h
438
-game/render.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
439
-game/render.o: shared/iengine.h shared/igame.h game/ai.h
440
-game/scoreboard.o: game/game.h shared/cube.h shared/tools.h shared/geom.h
441
-game/scoreboard.o: shared/ents.h shared/command.h shared/glexts.h
442
-game/scoreboard.o: shared/glemu.h shared/iengine.h shared/igame.h game/ai.h
443
-game/server.o: game/game.h shared/cube.h shared/tools.h shared/geom.h
444
-game/server.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
445
-game/server.o: shared/iengine.h shared/igame.h game/ai.h game/ctf.h
446
-game/server.o: game/extinfo.h game/aiman.h
447
-game/waypoint.o: game/game.h shared/cube.h shared/tools.h shared/geom.h
448
-game/waypoint.o: shared/ents.h shared/command.h shared/glexts.h
449
-game/waypoint.o: shared/glemu.h shared/iengine.h shared/igame.h game/ai.h
450
-game/weapon.o: game/game.h shared/cube.h shared/tools.h shared/geom.h
451
-game/weapon.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
452
-game/weapon.o: shared/iengine.h shared/igame.h game/ai.h
453
-
454
-shared/cube.h.gch: shared/tools.h shared/geom.h shared/ents.h
455
-shared/cube.h.gch: shared/command.h shared/glexts.h shared/glemu.h
456
-shared/cube.h.gch: shared/iengine.h shared/igame.h
457
-engine/engine.h.gch: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
458
-engine/engine.h.gch: shared/command.h shared/glexts.h shared/glemu.h
459
-engine/engine.h.gch: shared/iengine.h shared/igame.h engine/world.h
460
-engine/engine.h.gch: engine/octa.h engine/light.h engine/texture.h
461
-engine/engine.h.gch: engine/bih.h engine/model.h
462
-game/game.h.gch: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
463
-game/game.h.gch: shared/command.h shared/glexts.h shared/glemu.h
464
-game/game.h.gch: shared/iengine.h shared/igame.h game/ai.h
465
-
466
-standalone/shared/crypto.o: shared/cube.h shared/tools.h shared/geom.h
467
-standalone/shared/crypto.o: shared/ents.h shared/command.h shared/iengine.h
468
-standalone/shared/crypto.o: shared/igame.h
469
-standalone/shared/stream.o: shared/cube.h shared/tools.h shared/geom.h
470
-standalone/shared/stream.o: shared/ents.h shared/command.h shared/iengine.h
471
-standalone/shared/stream.o: shared/igame.h
472
-standalone/shared/tools.o: shared/cube.h shared/tools.h shared/geom.h
473
-standalone/shared/tools.o: shared/ents.h shared/command.h shared/iengine.h
474
-standalone/shared/tools.o: shared/igame.h
475
-standalone/engine/command.o: engine/engine.h shared/cube.h shared/tools.h
476
-standalone/engine/command.o: shared/geom.h shared/ents.h shared/command.h
477
-standalone/engine/command.o: shared/iengine.h shared/igame.h engine/world.h
478
-standalone/engine/server.o: engine/engine.h shared/cube.h shared/tools.h
479
-standalone/engine/server.o: shared/geom.h shared/ents.h shared/command.h
480
-standalone/engine/server.o: shared/iengine.h shared/igame.h engine/world.h
481
-standalone/engine/worldio.o: engine/engine.h shared/cube.h shared/tools.h
482
-standalone/engine/worldio.o: shared/geom.h shared/ents.h shared/command.h
483
-standalone/engine/worldio.o: shared/iengine.h shared/igame.h engine/world.h
484
-standalone/game/entities.o: game/game.h shared/cube.h shared/tools.h
485
-standalone/game/entities.o: shared/geom.h shared/ents.h shared/command.h
486
-standalone/game/entities.o: shared/iengine.h shared/igame.h game/ai.h
487
-standalone/game/server.o: game/game.h shared/cube.h shared/tools.h
488
-standalone/game/server.o: shared/geom.h shared/ents.h shared/command.h
489
-standalone/game/server.o: shared/iengine.h shared/igame.h game/ai.h
490
-standalone/game/server.o: game/ctf.h game/extinfo.h game/aiman.h
491
-standalone/engine/master.o: shared/cube.h shared/tools.h shared/geom.h
492
-standalone/engine/master.o: shared/ents.h shared/command.h shared/iengine.h
493
-standalone/engine/master.o: shared/igame.h
494
-
495
-standalone/shared/cube.h.gch: shared/tools.h shared/geom.h shared/ents.h
496
-standalone/shared/cube.h.gch: shared/command.h shared/iengine.h
497
-standalone/shared/cube.h.gch: shared/igame.h
498
-standalone/engine/engine.h.gch: shared/cube.h shared/tools.h shared/geom.h
499
-standalone/engine/engine.h.gch: shared/ents.h shared/command.h
500
-standalone/engine/engine.h.gch: shared/iengine.h shared/igame.h
501
-standalone/engine/engine.h.gch: engine/world.h
502
-standalone/game/game.h.gch: shared/cube.h shared/tools.h shared/geom.h
503
-standalone/game/game.h.gch: shared/ents.h shared/command.h shared/iengine.h
504
-standalone/game/game.h.gch: shared/igame.h game/ai.h

+ 71
- 0
src/client/meson.build View File

@@ -0,0 +1,71 @@
1
+client_src = [
2
+    '../shared/crypto.cpp',
3
+    '../shared/geom.cpp',
4
+    '../shared/glemu.cpp',
5
+    '../shared/stream.cpp',
6
+    '../shared/tools.cpp',
7
+    '../shared/zip.cpp',
8
+    '../engine/aa.cpp',
9
+    '../engine/bih.cpp',
10
+    '../engine/blend.cpp',
11
+    '../engine/client.cpp',
12
+    '../engine/command.cpp',
13
+    '../engine/console.cpp',
14
+    '../engine/dynlight.cpp',
15
+    '../engine/grass.cpp',
16
+    '../engine/light.cpp',
17
+    '../engine/main.cpp',
18
+    '../engine/material.cpp',
19
+    '../engine/menus.cpp',
20
+    '../engine/movie.cpp',
21
+    '../engine/normal.cpp',
22
+    '../engine/octa.cpp',
23
+    '../engine/octaedit.cpp',
24
+    '../engine/octarender.cpp',
25
+    '../engine/physics.cpp',
26
+    '../engine/pvs.cpp',
27
+    '../engine/rendergl.cpp',
28
+    '../engine/renderlights.cpp',
29
+    '../engine/rendermodel.cpp',
30
+    '../engine/renderparticles.cpp',
31
+    '../engine/rendersky.cpp',
32
+    '../engine/rendertext.cpp',
33
+    '../engine/renderva.cpp',
34
+    '../engine/server.cpp',
35
+    '../engine/serverbrowser.cpp',
36
+    '../engine/shader.cpp',
37
+    '../engine/sound.cpp',
38
+    '../engine/stain.cpp',
39
+    '../engine/texture.cpp',
40
+    '../engine/ui.cpp',
41
+    '../engine/water.cpp',
42
+    '../engine/world.cpp',
43
+    '../engine/worldio.cpp',
44
+    '../game/ai.cpp',
45
+    '../game/client.cpp',
46
+    '../game/entities.cpp',
47
+    '../game/game.cpp',
48
+    '../game/render.cpp',
49
+    '../game/scoreboard.cpp',
50
+    '../game/server.cpp',
51
+    '../game/waypoint.cpp',
52
+    '../game/weapon.cpp'
53
+]
54
+
55
+threads_dep = dependency('threads')
56
+sdl2_dep = dependency('sdl2')
57
+sdl2_image_dep = dependency('SDL2_image')
58
+sdl2_mixer_dep = dependency('SDL2_mixer')
59
+zlib_dep = dependency('zlib')
60
+gl_dep = dependency('gl')
61
+
62
+executable('native_client',
63
+    client_src,
64
+    dependencies: [
65
+        threads_dep, libenet, sdl2_dep, sdl2_image_dep,
66
+        sdl2_mixer_dep, zlib_dep, gl_dep
67
+    ],
68
+    include_directories: octacore_includes,
69
+    install: true,
70
+    install_dir: join_paths(meson.source_root(), 'bin_unix')
71
+)

+ 0
- 22
src/enet/Makefile View File

@@ -1,22 +0,0 @@
1
-CFLAGS=-O3 -fomit-frame-pointer
2
-override CFLAGS:= $(CFLAGS) -Iinclude $(shell ./check_cflags.sh $(CC) $(CFLAGS))
3
-
4
-OBJS= \
5
-	callbacks.o \
6
-	compress.o \
7
-	host.o \
8
-	list.o \
9
-	packet.o \
10
-	peer.o \
11
-	protocol.o \
12
-	unix.o \
13
-	win32.o
14
-
15
-libenet.a: $(OBJS)
16
-	$(AR) rcs $@ $(OBJS)
17
-
18
-default: libenet.a
19
-
20
-clean:
21
-	-$(RM) libenet.a $(OBJS)
22
-	 

+ 0
- 50
src/enet/check_cflags.sh View File

@@ -1,50 +0,0 @@
1
-#!/bin/sh
2
-# ENet cflags detection for unix by Daniel 'q66' Kolesa <quaker66@gmail.com>
3
-# I hereby put this file into public domain, use as you wish
4
-
5
-CC=$*
6
-
7
-cat << EOF > check_func.c
8
-void TEST_FUN();
9
-int main() { TEST_FUN(); return 0; }
10
-EOF
11
-cat << EOF > check_member.c
12
-#include "check_member.h"
13
-static void pass() {}
14
-int main() { struct TEST_STRUCT test; pass(test.TEST_FIELD); return 0; }
15
-EOF
16
-cat << EOF > check_type.c
17
-#include "check_type.h"
18
-int main() { TEST_TYPE test; return 0; }
19
-EOF
20
-
21
-CHECK_FUNC() {
22
-    $CC check_func.c -DTEST_FUN=$1 -o check_func 2>/dev/null
23
-    if [ $? -eq 0 ]; then printf " $2"; rm check_func; fi
24
-}
25
-
26
-CHECK_FUNC getaddrinfo -DHAS_GETADDRINFO
27
-CHECK_FUNC getnameinfo -DHAS_GETNAMEINFO
28
-CHECK_FUNC gethostbyaddr_r -DHAS_GETHOSTBYADDR_R
29
-CHECK_FUNC gethostbyname_r -DHAS_GETHOSTBYNAME_R
30
-CHECK_FUNC poll -DHAS_POLL
31
-CHECK_FUNC fcntl -DHAS_FCNTL
32
-CHECK_FUNC inet_pton -DHAS_INET_PTON
33
-CHECK_FUNC inet_ntop -DHAS_INET_NTOP
34
-
35
-echo "#include <sys/socket.h>" > check_member.h
36
-$CC check_member.c -DTEST_STRUCT=msghdr -DTEST_FIELD=msg_flags \
37
-    -o check_member 2>/dev/null
38
-if [ $? -eq 0 ]; then printf " -DHAS_MSGHDR_FLAGS"; rm check_member; fi
39
-rm check_member.h
40
-
41
-echo "#include <sys/types.h>" > check_type.h
42
-echo "#include <sys/socket.h>" >> check_type.h
43
-$CC check_type.c -DTEST_TYPE=socklen_t -o check_type 2>/dev/null
44
-if [ $? -eq 0 ]; then printf " -DHAS_SOCKLEN_T"; rm check_type; fi
45
-rm check_type.h
46
-
47
-echo ''
48
-rm check_func.c
49
-rm check_member.c
50
-rm check_type.c

+ 62
- 0
src/enet/meson.build View File

@@ -0,0 +1,62 @@
1
+add_languages('c')
2
+
3
+libenet_src = [
4
+    'callbacks.c',
5
+    'compress.c',
6
+    'host.c',
7
+    'list.c',
8
+    'packet.c',
9
+    'peer.c',
10
+    'protocol.c',
11
+    'unix.c',
12
+    'win32.c'
13
+]
14
+
15
+cc = meson.get_compiler('c')
16
+
17
+libenet_cflags = []
18
+
19
+if target_machine.system() != 'windows'
20
+    if cc.has_function('getaddrinfo', prefix: '#include <netdb.h>')
21
+        libenet_cflags += ['-DHAS_GETADDRINFO']
22
+    endif
23
+    if cc.has_function('getnameinfo', prefix: '#include <netdb.h>')
24
+        libenet_cflags += ['-DHAS_GETNAMEINFO']
25
+    endif
26
+    if cc.has_function('gethostbyaddr_r', prefix: '#include <netdb.h>')
27
+        libenet_cflags += ['-DHAS_GETHOSTBYADDR_R']
28
+    endif
29
+    if cc.has_function('gethostbyname_r', prefix: '#include <netdb.h>')
30
+        libenet_cflags += ['-DHAS_GETHOSTBYNAME_R']
31
+    endif
32
+    if cc.has_function('poll', prefix: '#include <poll.h>')
33
+        libenet_cflags += ['-DHAS_POLL']
34
+    endif
35
+    if cc.has_function('fcntl', prefix: '#include <fcntl.h>')
36
+        libenet_cflags += ['-DHAS_FCNTL']
37
+    endif
38
+    if cc.has_function('inet_pton', prefix: '#include <arpa/inet.h>')
39
+        libenet_cflags += ['-DHAS_INET_PTON']
40
+    endif
41
+    if cc.has_function('inet_ntop', prefix: '#include <arpa/inet.h>')
42
+        libenet_cflags += ['-DHAS_INET_NTOP']
43
+    endif
44
+    if cc.has_member('struct msghdr', 'msg_flags', prefix: '#include <sys/socket.h>')
45
+        libenet_cflags += ['-DHAS_MSGHDR_FLAGS']
46
+    endif
47
+    if cc.has_type('socklen_t', prefix: '#include <sys/socket.h>')
48
+        libenet_cflags += ['-DHAS_SOCKLEN_T']
49
+    endif
50
+endif
51
+
52
+libenet_lib = static_library('enet',
53
+    libenet_src,
54
+    include_directories: include_directories('include'),
55
+    c_args: libenet_cflags,
56
+    install: false
57
+)
58
+
59
+libenet = declare_dependency(
60
+    include_directories: include_directories('include'),
61
+    link_with: libenet_lib
62
+)

+ 21
- 0
src/master/meson.build View File

@@ -0,0 +1,21 @@
1
+client_src = [
2
+    '../shared/crypto.cpp',
3
+    '../shared/stream.cpp',
4
+    '../shared/tools.cpp',
5
+    '../engine/command.cpp',
6
+    '../engine/master.cpp'
7
+]
8
+
9
+threads_dep = dependency('threads')
10
+zlib_dep = dependency('zlib')
11
+
12
+executable('native_master',
13
+    client_src,
14
+    dependencies: [
15
+        threads_dep, libenet, zlib_dep
16
+    ],
17
+    include_directories: octacore_includes,
18
+    cpp_args: ['-DSTANDALONE'],
19
+    install: true,
20
+    install_dir: join_paths(meson.source_root(), 'bin_unix')
21
+)

+ 8
- 0
src/meson.build View File

@@ -0,0 +1,8 @@
1
+octacore_includes = [
2
+    include_directories('shared', 'engine', 'game', 'enet/include')
3
+]
4
+
5
+subdir('enet')
6
+subdir('client')
7
+subdir('server')
8
+subdir('master')

+ 24
- 0
src/server/meson.build View File

@@ -0,0 +1,24 @@
1
+client_src = [
2
+    '../shared/crypto.cpp',
3
+    '../shared/stream.cpp',
4
+    '../shared/tools.cpp',
5
+    '../engine/command.cpp',
6
+    '../engine/server.cpp',
7
+    '../engine/worldio.cpp',
8
+    '../game/entities.cpp',
9
+    '../game/server.cpp'
10
+]
11
+
12
+threads_dep = dependency('threads')
13
+zlib_dep = dependency('zlib')
14
+
15
+executable('native_server',
16
+    client_src,
17
+    dependencies: [
18
+        threads_dep, libenet, zlib_dep
19
+    ],
20
+    include_directories: octacore_includes,
21
+    cpp_args: ['-DSTANDALONE'],
22
+    install: true,
23
+    install_dir: join_paths(meson.source_root(), 'bin_unix')
24
+)

Loading…
Cancel
Save