@@ -15,6 +15,7 @@ PLUG_LDFLAGS_ZLIB=-L../engine/libs/mingw64-libs -lz
15
15
PLUG_LDFLAGS_DL=
16
16
endif
17
17
18
+ PLUG_PREFIX =$(OUT_DIR ) /fteplug_
18
19
PLUG_LDFLAGS_DL? =-ldl -static-libgcc
19
20
PLUG_LDFLAGS? =-L/usr/local/lib -Wl,-R/usr/local/lib -lm
20
21
PLUG_LDFLAGS_ZLIB? =-lz
@@ -65,6 +66,17 @@ ifeq ($(PLUG_NATIVE_EXT),)
65
66
PLUG_NATIVE_EXT=_ppc.so
66
67
endif
67
68
endif
69
+ ifeq ($(FTE_TARGET ) ,droid)
70
+ # plugins get written to the tmp build dir, to avoid conflicts
71
+ PLUG_PREFIX=$(OUT_DIR)/m_droid-$(DROID_ARCH)/fteplug_
72
+ # don't bother with cpu arch postfixes. they'll be in separate directories anyway.
73
+ PLUG_NATIVE_EXT=.so
74
+ # libresolv has no public api on android...
75
+ LIBRESOLV=
76
+ # so we know our target.
77
+ PLUG_CFLAGS=-DANDROID
78
+ PLUG_CXXFLAGS=-DANDROID
79
+ endif
68
80
69
81
# fallback
70
82
PLUG_NATIVE_EXT? =_unk.so
@@ -194,9 +206,9 @@ distclean:
194
206
rm $(AV_BASE )$(AV_VER ) -win32.zip
195
207
rm $(AV_BASE )$(AV_VER ) -win64.zip
196
208
197
- $(OUT_DIR ) /fteplug_ffmpeg $(PLUG_NATIVE_EXT ) : $(AV_DEP ) $(FFMPEG_ZIP )
209
+ $(PLUG_PREFIX ) ffmpeg $(PLUG_NATIVE_EXT ) : $(AV_DEP ) $(FFMPEG_ZIP )
198
210
199
- $(OUT_DIR ) /fteplug_ffmpeg $(PLUG_NATIVE_EXT ) : $(AVPLUG_OBJS )
211
+ $(PLUG_PREFIX ) ffmpeg $(PLUG_NATIVE_EXT ) : $(AVPLUG_OBJS )
200
212
$(CC ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -s -o $@ -shared $(PLUG_CFLAGS ) $(AV_CFLAGS ) $(AVPLUG_OBJS ) $(PLUG_DEFFILE ) $(PLUG_LDFLAGS ) $(AV_LDFLAGS )
201
213
202
214
# small script for ode
@@ -218,7 +230,7 @@ $(ODE_LIB): $(OUT_DIR)/../ode-$(ODE_VER).tar.gz
218
230
cd $(ODE_BASE ) ode-$(ODE_VER ) / && ./bootstrap && ./configure --enable-double-precision --disable-demos --without-x --with-pic CC=" $( CC) $( PLUG_CXXFLAGS) " CXX=" $( CC) $( PLUG_CXXFLAGS) " --host=` $( CC) -dumpmachine` && make
219
231
220
232
ODE_FILES =../engine/common/com_phys_ode.c ../engine/common/mathlib.c plugin.c qvm_api.c $(ODE_LIB )
221
- $(OUT_DIR ) /fteplug_ode $(PLUG_NATIVE_EXT ) : $(ODE_FILES )
233
+ $(PLUG_PREFIX ) ode $(PLUG_NATIVE_EXT ) : $(ODE_FILES )
222
234
$(CC ) -flto -s $(BASE_CFLAGS ) $(CFLAGS ) -Os -DFTEPLUGIN -DODE_STATIC -o $@ -shared $(PLUG_CFLAGS ) -I$(ODE_BASE ) ode-$(ODE_VER ) /include $(ODE_FILES ) $(PLUG_DEFFILE ) $(PLUG_LDFLAGS ) -static-libgcc ` $( CC) -print-file-name=libstdc++.a` -lpthread
223
235
# NATIVE_PLUGINS+=ode
224
236
@@ -243,22 +255,22 @@ $(BULLET_LIB): $(OUT_DIR)/../bullet3-$(BULLET_VER).tar.gz
243
255
# ./configure --enable-double-precision --disable-demos --without-x CXX="$(CC)" CFLAGS="$(PLUG_CFLAGS)" CXXFLAGS="$(PLUG_CXXFLAGS)" --host=`$(CC) -dumpmachine` && make
244
256
245
257
246
- $(OUT_DIR ) /fteplug_bullet $(PLUG_NATIVE_EXT ) : bullet/bulletplug.cpp plugin.c qvm_api.c $(BULLET_LIBS )
258
+ $(PLUG_PREFIX ) bullet $(PLUG_NATIVE_EXT ) : bullet/bulletplug.cpp plugin.c qvm_api.c $(BULLET_LIBS )
247
259
$(CXX ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -o $@ -shared $(PLUG_CFLAGS ) $^ $(PLUG_DEFFILE ) $(PLUG_LDFLAGS ) $(BULLET_CFLAGS )
248
260
# NATIVE_PLUGINS+=bullet
249
261
250
262
251
263
-include Makefile.private
252
264
253
- $(OUT_DIR ) /fteplug_mpq $(PLUG_NATIVE_EXT ) : mpq/fs_mpq.c mpq/blast.c plugin.c qvm_api.c
265
+ $(PLUG_PREFIX ) mpq $(PLUG_NATIVE_EXT ) : mpq/fs_mpq.c mpq/blast.c plugin.c qvm_api.c
254
266
$(CC ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -o $@ -shared $(PLUG_CFLAGS ) -Impq $^ $(PLUG_DEFFILE ) $(PLUG_LDFLAGS_ZLIB ) $(PLUG_LDFLAGS )
255
267
NATIVE_PLUGINS+ =mpq
256
268
257
- $(OUT_DIR ) /fteplug_xmpp $(PLUG_NATIVE_EXT ) : jabber/jabberclient.c jabber/jingle.c jabber/sift.c jabber/xml.c plugin.c qvm_api.c ../engine/common/sha1.c emailnot/md5.c
269
+ $(PLUG_PREFIX ) xmpp $(PLUG_NATIVE_EXT ) : jabber/jabberclient.c jabber/jingle.c jabber/sift.c jabber/xml.c plugin.c qvm_api.c ../engine/common/sha1.c emailnot/md5.c
258
270
$(CC ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -o $@ -shared $(PLUG_CFLAGS ) -Ijabber $^ $(PLUG_DEFFILE ) $(PLUG_LDFLAGS ) $(LIBRESOLV )
259
271
NATIVE_PLUGINS+ =xmpp
260
272
261
- $(OUT_DIR ) /fteplug_qi $(PLUG_NATIVE_EXT ) : qi/qi.c jabber/xml.c plugin.c qvm_api.c
273
+ $(PLUG_PREFIX ) qi $(PLUG_NATIVE_EXT ) : qi/qi.c jabber/xml.c plugin.c qvm_api.c
262
274
$(CC ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -o $@ -shared $(PLUG_CFLAGS ) -Ijabber $^ $(PLUG_DEFFILE ) $(PLUG_LDFLAGS )
263
275
NATIVE_PLUGINS+ =qi
264
276
@@ -297,27 +309,27 @@ $(OUT_DIR)/cef_$(CEF_VER).zip: cef/$(CEF_NAME)/rel.zip
297
309
cp cef/$(CEF_NAME ) /rel.zip $@
298
310
299
311
CEF_SOURCES =cef/cef.c plugin.c qvm_api.c
300
- $(OUT_DIR ) /fteplug_cef $(PLUG_NATIVE_EXT ) : $(CEF_SOURCES ) $(OUT_DIR ) /cef_$(CEF_VER ) .zip cef/$(CEF_NAME ) /include/cef_version.h
301
- $(CC ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -o $(OUT_DIR ) /fteplug_cef $(PLUG_NATIVE_EXT ) -shared $(PLUG_CFLAGS ) -Icef/$(CEF_NAME ) $(CEF_SOURCES ) $(PLUG_DEFFILE ) $(PLUG_LDFLAGS ) -Wl,-rpath,. $(PLUG_LDFLAGS_DL )
312
+ $(PLUG_PREFIX ) cef $(PLUG_NATIVE_EXT ) : $(CEF_SOURCES ) $(OUT_DIR ) /cef_$(CEF_VER ) .zip cef/$(CEF_NAME ) /include/cef_version.h
313
+ $(CC ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -o $(PLUG_PREFIX ) cef $(PLUG_NATIVE_EXT ) -shared $(PLUG_CFLAGS ) -Icef/$(CEF_NAME ) $(CEF_SOURCES ) $(PLUG_DEFFILE ) $(PLUG_LDFLAGS ) -Wl,-rpath,. $(PLUG_LDFLAGS_DL )
302
314
# NATIVE_PLUGINS+=cef
303
315
else
304
- .PHONEY : $(OUT_DIR ) /fteplug_cef $(PLUG_NATIVE_EXT )
305
- $(OUT_DIR ) /fteplug_cef $(PLUG_NATIVE_EXT ) :
316
+ .PHONEY : $(PLUG_PREFIX ) cef $(PLUG_NATIVE_EXT )
317
+ $(PLUG_PREFIX ) cef $(PLUG_NATIVE_EXT ) :
306
318
echo cef plugin not supported on this arch
307
319
endif
308
320
309
321
# irc plugin can still be built as a qvm.
310
- $(OUT_DIR ) /fteplug_irc $(PLUG_NATIVE_EXT ) : irc/ircclient.c plugin.c qvm_api.c
322
+ $(PLUG_PREFIX ) irc $(PLUG_NATIVE_EXT ) : irc/ircclient.c plugin.c qvm_api.c
311
323
$(CC ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -o $@ -shared $(PLUG_CFLAGS ) -Iirc $^ $(PLUG_DEFFILE ) $(PLUG_LDFLAGS )
312
324
NATIVE_PLUGINS+ =irc
313
325
314
326
# for compat with ezquake
315
- $(OUT_DIR ) /fteplug_ezhud $(PLUG_NATIVE_EXT ) : ezhud/ezquakeisms.c ezhud/hud.c ezhud/hud_common.c ezhud/hud_editor.c plugin.c qvm_api.c
327
+ $(PLUG_PREFIX ) ezhud $(PLUG_NATIVE_EXT ) : ezhud/ezquakeisms.c ezhud/hud.c ezhud/hud_common.c ezhud/hud_editor.c plugin.c qvm_api.c
316
328
$(CC ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -o $@ -shared $(PLUG_CFLAGS ) -Iezhud $^ $(PLUG_DEFFILE ) $(PLUG_LDFLAGS )
317
329
NATIVE_PLUGINS+ =ezhud
318
330
319
- $(OUT_DIR ) /fteplug_models $(PLUG_NATIVE_EXT ) : models/gltf.c models/models.c plugin.c qvm_api.c
331
+ $(PLUG_PREFIX ) models $(PLUG_NATIVE_EXT ) : models/gltf.c models/models.c plugin.c qvm_api.c
320
332
$(CC ) $(BASE_CFLAGS ) $(CFLAGS ) -DFTEPLUGIN -o $@ -shared $(PLUG_CFLAGS ) -Imodels $^ $(PLUG_DEFFILE ) $(PLUG_LDFLAGS )
321
333
# NATIVE_PLUGINS+=models
322
334
323
- native : $(foreach FOO,$(NATIVE_PLUGINS ) , $(OUT_DIR ) /fteplug_ $(FOO )$(PLUG_NATIVE_EXT ) )
335
+ native : $(foreach FOO,$(NATIVE_PLUGINS ) , $(PLUG_PREFIX ) $(FOO )$(PLUG_NATIVE_EXT ) )
0 commit comments