1 LOCAL_PATH := $(call my-dir)/..
3 #LOCAL_ADDRESS_SANITIZER:=true
6 LOCAL_MODULE := Irrlicht
7 LOCAL_SRC_FILES := deps/irrlicht/lib/Android/libIrrlicht.a
8 include $(PREBUILT_STATIC_LIBRARY)
10 ifeq ($(HAVE_LEVELDB), 1)
12 LOCAL_MODULE := LevelDB
13 LOCAL_SRC_FILES := deps/leveldb/libleveldb.a
14 include $(PREBUILT_STATIC_LIBRARY)
19 LOCAL_SRC_FILES := deps/curl/lib/.libs/libcurl.a
20 include $(PREBUILT_STATIC_LIBRARY)
23 LOCAL_MODULE := freetype
24 LOCAL_SRC_FILES := deps/freetype2-android/Android/obj/local/$(TARGET_ARCH_ABI)/libfreetype2-static.a
25 include $(PREBUILT_STATIC_LIBRARY)
29 LOCAL_SRC_FILES := deps/libiconv/lib/.libs/libiconv.so
30 include $(PREBUILT_SHARED_LIBRARY)
33 LOCAL_MODULE := openal
34 LOCAL_SRC_FILES := deps/openal-soft/libs/$(TARGET_LIBDIR)/libopenal.so
35 include $(PREBUILT_SHARED_LIBRARY)
39 LOCAL_SRC_FILES := deps/libvorbis-libogg-android/libs/$(TARGET_LIBDIR)/libogg.so
40 include $(PREBUILT_SHARED_LIBRARY)
43 LOCAL_MODULE := vorbis
44 LOCAL_SRC_FILES := deps/libvorbis-libogg-android/libs/$(TARGET_LIBDIR)/libvorbis.so
45 include $(PREBUILT_SHARED_LIBRARY)
49 LOCAL_SRC_FILES := deps/gmp/usr/lib/libgmp.so
50 include $(PREBUILT_SHARED_LIBRARY)
54 LOCAL_SRC_FILES := deps/openssl/libssl.a
55 include $(PREBUILT_STATIC_LIBRARY)
58 LOCAL_MODULE := crypto
59 LOCAL_SRC_FILES := deps/openssl/libcrypto.a
60 include $(PREBUILT_STATIC_LIBRARY)
63 LOCAL_MODULE := minetest
65 LOCAL_CPP_FEATURES += exceptions
71 LOCAL_CFLAGS := -D_IRR_ANDROID_PLATFORM_ \
72 -DHAVE_TOUCHSCREENGUI \
76 -DUSE_LEVELDB=$(HAVE_LEVELDB) \
78 -pipe -fstrict-aliasing
81 LOCAL_CFLAGS += -g -D_DEBUG -O0 -fno-omit-frame-pointer
83 LOCAL_CFLAGS += -fexpensive-optimizations -O3
87 PROFILER_LIBS := android-ndk-profiler
91 # LOCAL_CFLAGS += -fsanitize=address
92 # LOCAL_LDFLAGS += -fsanitize=address
94 ifeq ($(TARGET_ARCH_ABI),x86)
95 LOCAL_CFLAGS += -fno-stack-protector
99 jni/src jni/src/sqlite \
104 deps/irrlicht/include \
105 deps/libiconv/include \
106 deps/freetype2-android/include \
108 deps/openal-soft/jni/OpenAL/include \
109 deps/libvorbis-libogg-android/jni/include \
110 deps/gmp/usr/include \
111 deps/leveldb/include \
115 jni/src/areastore.cpp \
118 jni/src/cavegen.cpp \
121 jni/src/clientiface.cpp \
122 jni/src/clientmap.cpp \
123 jni/src/clientmedia.cpp \
124 jni/src/clientobject.cpp \
126 jni/src/collision.cpp \
127 jni/src/content_abm.cpp \
128 jni/src/content_cao.cpp \
129 jni/src/content_cso.cpp \
130 jni/src/content_mapblock.cpp \
131 jni/src/content_mapnode.cpp \
132 jni/src/content_nodemeta.cpp \
133 jni/src/content_sao.cpp \
134 jni/src/convert_json.cpp \
135 jni/src/craftdef.cpp \
136 jni/src/database-dummy.cpp \
137 jni/src/database-sqlite3.cpp \
138 jni/src/database.cpp \
140 jni/src/defaultsettings.cpp \
141 jni/src/drawscene.cpp \
142 jni/src/dungeongen.cpp \
144 jni/src/environment.cpp \
145 jni/src/filecache.cpp \
146 jni/src/filesys.cpp \
147 jni/src/fontengine.cpp \
149 jni/src/genericobject.cpp \
150 jni/src/gettext.cpp \
151 jni/src/guiChatConsole.cpp \
152 jni/src/guiEngine.cpp \
153 jni/src/guiFileSelectMenu.cpp \
154 jni/src/guiFormSpecMenu.cpp \
155 jni/src/guiKeyChangeMenu.cpp \
156 jni/src/guiPasswordChange.cpp \
157 jni/src/guiTable.cpp \
158 jni/src/guiscalingfilter.cpp \
159 jni/src/guiVolumeChange.cpp \
160 jni/src/httpfetch.cpp \
162 jni/src/imagefilters.cpp \
163 jni/src/intlGUIEditBox.cpp \
164 jni/src/inventory.cpp \
165 jni/src/inventorymanager.cpp \
166 jni/src/itemdef.cpp \
167 jni/src/keycode.cpp \
169 jni/src/localplayer.cpp \
173 jni/src/mapblock.cpp \
174 jni/src/mapblock_mesh.cpp \
176 jni/src/mapgen_flat.cpp \
177 jni/src/mapgen_fractal.cpp \
178 jni/src/mapgen_singlenode.cpp \
179 jni/src/mapgen_v5.cpp \
180 jni/src/mapgen_v6.cpp \
181 jni/src/mapgen_v7.cpp \
182 jni/src/mapnode.cpp \
183 jni/src/mapsector.cpp \
185 jni/src/mg_biome.cpp \
186 jni/src/mg_decoration.cpp \
188 jni/src/mg_schematic.cpp \
189 jni/src/minimap.cpp \
191 jni/src/nameidmapping.cpp \
192 jni/src/nodedef.cpp \
193 jni/src/nodemetadata.cpp \
194 jni/src/nodetimer.cpp \
197 jni/src/object_properties.cpp \
198 jni/src/particles.cpp \
199 jni/src/pathfinder.cpp \
201 jni/src/porting_android.cpp \
202 jni/src/porting.cpp \
203 jni/src/profiler.cpp \
204 jni/src/quicktune.cpp \
205 jni/src/rollback.cpp \
206 jni/src/rollback_interface.cpp \
207 jni/src/serialization.cpp \
209 jni/src/serverlist.cpp \
210 jni/src/serverobject.cpp \
215 jni/src/sound_openal.cpp \
216 jni/src/staticobject.cpp \
217 jni/src/subgame.cpp \
219 jni/src/treegen.cpp \
220 jni/src/version.cpp \
222 jni/src/voxelalgorithms.cpp \
223 jni/src/util/auth.cpp \
224 jni/src/util/base64.cpp \
225 jni/src/util/directiontables.cpp \
226 jni/src/util/numeric.cpp \
227 jni/src/util/pointedthing.cpp \
228 jni/src/util/serialize.cpp \
229 jni/src/util/sha1.cpp \
230 jni/src/util/string.cpp \
231 jni/src/util/srp.cpp \
232 jni/src/util/timetaker.cpp \
233 jni/src/unittest/test.cpp \
234 jni/src/unittest/test_collision.cpp \
235 jni/src/unittest/test_compression.cpp \
236 jni/src/unittest/test_connection.cpp \
237 jni/src/unittest/test_filepath.cpp \
238 jni/src/unittest/test_inventory.cpp \
239 jni/src/unittest/test_mapnode.cpp \
240 jni/src/unittest/test_nodedef.cpp \
241 jni/src/unittest/test_noderesolver.cpp \
242 jni/src/unittest/test_noise.cpp \
243 jni/src/unittest/test_objdef.cpp \
244 jni/src/unittest/test_profiler.cpp \
245 jni/src/unittest/test_random.cpp \
246 jni/src/unittest/test_schematic.cpp \
247 jni/src/unittest/test_serialization.cpp \
248 jni/src/unittest/test_settings.cpp \
249 jni/src/unittest/test_socket.cpp \
250 jni/src/unittest/test_utilities.cpp \
251 jni/src/unittest/test_voxelalgorithms.cpp \
252 jni/src/unittest/test_voxelmanipulator.cpp \
253 jni/src/touchscreengui.cpp \
254 jni/src/database-leveldb.cpp \
255 jni/src/settings.cpp \
256 jni/src/wieldmesh.cpp \
257 jni/src/client/clientlauncher.cpp \
258 jni/src/client/tile.cpp
260 # intentionally kept out (we already build openssl itself): jni/src/util/sha256.c
264 jni/src/network/connection.cpp \
265 jni/src/network/networkpacket.cpp \
266 jni/src/network/clientopcodes.cpp \
267 jni/src/network/clientpackethandler.cpp \
268 jni/src/network/serveropcodes.cpp \
269 jni/src/network/serverpackethandler.cpp \
273 jni/src/script/common/c_content.cpp \
274 jni/src/script/common/c_converter.cpp \
275 jni/src/script/common/c_internal.cpp \
276 jni/src/script/common/c_types.cpp \
277 jni/src/script/cpp_api/s_async.cpp \
278 jni/src/script/cpp_api/s_base.cpp \
279 jni/src/script/cpp_api/s_entity.cpp \
280 jni/src/script/cpp_api/s_env.cpp \
281 jni/src/script/cpp_api/s_inventory.cpp \
282 jni/src/script/cpp_api/s_item.cpp \
283 jni/src/script/cpp_api/s_mainmenu.cpp \
284 jni/src/script/cpp_api/s_node.cpp \
285 jni/src/script/cpp_api/s_nodemeta.cpp \
286 jni/src/script/cpp_api/s_player.cpp \
287 jni/src/script/cpp_api/s_security.cpp \
288 jni/src/script/cpp_api/s_server.cpp \
289 jni/src/script/lua_api/l_areastore.cpp \
290 jni/src/script/lua_api/l_base.cpp \
291 jni/src/script/lua_api/l_craft.cpp \
292 jni/src/script/lua_api/l_env.cpp \
293 jni/src/script/lua_api/l_inventory.cpp \
294 jni/src/script/lua_api/l_item.cpp \
295 jni/src/script/lua_api/l_mainmenu.cpp \
296 jni/src/script/lua_api/l_mapgen.cpp \
297 jni/src/script/lua_api/l_nodemeta.cpp \
298 jni/src/script/lua_api/l_nodetimer.cpp \
299 jni/src/script/lua_api/l_noise.cpp \
300 jni/src/script/lua_api/l_object.cpp \
301 jni/src/script/lua_api/l_particles.cpp \
302 jni/src/script/lua_api/l_rollback.cpp \
303 jni/src/script/lua_api/l_server.cpp \
304 jni/src/script/lua_api/l_settings.cpp \
305 jni/src/script/lua_api/l_util.cpp \
306 jni/src/script/lua_api/l_vmanip.cpp \
307 jni/src/script/scripting_game.cpp \
308 jni/src/script/scripting_mainmenu.cpp
312 jni/src/cguittfont/xCGUITTFont.cpp
316 jni/src/lua/src/lapi.c \
317 jni/src/lua/src/lauxlib.c \
318 jni/src/lua/src/lbaselib.c \
319 jni/src/lua/src/lcode.c \
320 jni/src/lua/src/ldblib.c \
321 jni/src/lua/src/ldebug.c \
322 jni/src/lua/src/ldo.c \
323 jni/src/lua/src/ldump.c \
324 jni/src/lua/src/lfunc.c \
325 jni/src/lua/src/lgc.c \
326 jni/src/lua/src/linit.c \
327 jni/src/lua/src/liolib.c \
328 jni/src/lua/src/llex.c \
329 jni/src/lua/src/lmathlib.c \
330 jni/src/lua/src/lmem.c \
331 jni/src/lua/src/loadlib.c \
332 jni/src/lua/src/lobject.c \
333 jni/src/lua/src/lopcodes.c \
334 jni/src/lua/src/loslib.c \
335 jni/src/lua/src/lparser.c \
336 jni/src/lua/src/lstate.c \
337 jni/src/lua/src/lstring.c \
338 jni/src/lua/src/lstrlib.c \
339 jni/src/lua/src/ltable.c \
340 jni/src/lua/src/ltablib.c \
341 jni/src/lua/src/ltm.c \
342 jni/src/lua/src/lundump.c \
343 jni/src/lua/src/lvm.c \
344 jni/src/lua/src/lzio.c \
345 jni/src/lua/src/print.c
348 LOCAL_SRC_FILES += deps/sqlite/sqlite3.c
352 jni/src/threading/event.cpp \
353 jni/src/threading/mutex.cpp \
354 jni/src/threading/semaphore.cpp \
355 jni/src/threading/thread.cpp
358 LOCAL_SRC_FILES += jni/src/json/jsoncpp.cpp
360 LOCAL_SHARED_LIBRARIES := iconv openal ogg vorbis gmp
361 LOCAL_STATIC_LIBRARIES := Irrlicht freetype curl ssl crypto android_native_app_glue $(PROFILER_LIBS)
363 ifeq ($(HAVE_LEVELDB), 1)
364 LOCAL_STATIC_LIBRARIES += LevelDB
366 LOCAL_LDLIBS := -lEGL -llog -lGLESv1_CM -lGLESv2 -lz -landroid
368 include $(BUILD_SHARED_LIBRARY)
370 # at the end of Android.mk
372 $(call import-module,android-ndk-profiler)
374 $(call import-module,android/native_app_glue)