2014-03-22 09:25:51 +00:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2016-05-11 01:03:56 +00:00
|
|
|
ifeq ($(findstring clang,$(NDK_TOOLCHAIN_VERSION)),)
|
|
|
|
FOUND_CLANG := 0
|
|
|
|
else
|
|
|
|
FOUND_CLANG := 1
|
|
|
|
endif
|
|
|
|
|
2016-02-17 19:08:32 +00:00
|
|
|
LOCAL_MODULE := duke3d
|
2014-03-22 09:25:51 +00:00
|
|
|
|
2016-05-02 18:29:41 +00:00
|
|
|
COMMONFLAGS := -x c++ -std=gnu++11 -fvisibility=hidden -fPIC -funsigned-char -fno-strict-aliasing -pthread \
|
2016-03-28 05:15:23 +00:00
|
|
|
-W -Wall -Wextra -Wpointer-arith -Wno-char-subscripts -Wno-missing-braces -Wwrite-strings -Wuninitialized \
|
2016-05-11 01:03:56 +00:00
|
|
|
-Wno-attributes -Wno-strict-overflow -Wno-unused-result -Wlogical-op -Wcast-qual -Werror=return-type \
|
2016-03-28 05:15:23 +00:00
|
|
|
-DHAVE_SDL -DHAVE_VORBIS -DHAVE_JWZGLES -DHAVE_ANDROID -DRENDERTYPESDL=1 -DUSE_OPENGL -DNETCODE_DISABLE -DUSE_LIBVPX \
|
2016-05-02 18:29:41 +00:00
|
|
|
-DHAVE_INTTYPES -D_GNU_SOURCE=1 -D_REENTRANT
|
2016-03-28 05:15:23 +00:00
|
|
|
|
2016-05-11 01:03:56 +00:00
|
|
|
ifeq ($(FOUND_CLANG),1)
|
|
|
|
COMMONFLAGS += -Wno-unknown-warning-option -Wno-deprecated-register
|
|
|
|
endif
|
|
|
|
|
2016-03-28 05:15:23 +00:00
|
|
|
LOCAL_LDFLAGS := -fuse-ld=bfd
|
|
|
|
LOCAL_ARM_NEON = true
|
2016-02-13 21:06:28 +00:00
|
|
|
|
|
|
|
ifeq ($(NDK_DEBUG), 1)
|
2016-03-28 05:15:23 +00:00
|
|
|
COMMONFLAGS += -O0 -ggdb -fno-omit-frame-pointer -fno-stack-protector -D_FORTIFY_SOURCE=0 -DDEBUGGINGAIDS=0
|
2016-02-13 21:06:28 +00:00
|
|
|
else
|
2016-05-04 08:26:08 +00:00
|
|
|
COMMONFLAGS += -O2 -DNDEBUG -D_FORTIFY_SOURCE=2
|
2016-05-11 01:03:56 +00:00
|
|
|
ifeq ($(FOUND_CLANG),0)
|
2016-05-04 08:26:08 +00:00
|
|
|
COMMONFLAGS += -DUSING_LTO -flto
|
|
|
|
LOCAL_LDFLAGS += -flto
|
|
|
|
endif
|
2016-02-13 21:06:28 +00:00
|
|
|
endif
|
|
|
|
|
2016-03-28 05:15:23 +00:00
|
|
|
LOCAL_CFLAGS = $(COMMONFLAGS)
|
|
|
|
LOCAL_CPPFLAGS = $(COMMONFLAGS)
|
2014-03-22 09:25:51 +00:00
|
|
|
|
2016-03-14 00:07:40 +00:00
|
|
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/source $(LOCAL_PATH)/source/jmact $(LOCAL_PATH)/source/jaudiolib/include $(LOCAL_PATH)/source/enet/include $(LOCAL_PATH)/build/include
|
2016-03-28 05:16:14 +00:00
|
|
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/android/etcpak
|
2016-03-14 00:07:40 +00:00
|
|
|
LOCAL_C_INCLUDES += $(TOP_DIR)/ $(TOP_DIR)/Libraries/liboggvorbis/include $(TOP_DIR)/Libraries/ $(TOP_DIR)/Libraries/SDL2/include $(TOP_DIR)/Libraries/SDL2_mixer/include $(TOP_DIR)/Libraries/TinyXML/include $(TOP_DIR)/TouchControls $(TOP_DIR)/Libraries/libvpx/include
|
2014-03-22 09:25:51 +00:00
|
|
|
|
|
|
|
ANDROID_SRC = \
|
2016-03-14 00:07:40 +00:00
|
|
|
build/src/jwzgles.c \
|
2016-04-13 04:03:49 +00:00
|
|
|
platform/Android/Duke3d/jni/android-jni.cpp \
|
2016-03-28 05:16:14 +00:00
|
|
|
source/android/etcpak/ProcessRGB.cpp \
|
|
|
|
source/android/etcpak/Tables.cpp \
|
2016-03-14 00:07:40 +00:00
|
|
|
source/android/in_android.c
|
2014-03-22 09:25:51 +00:00
|
|
|
|
|
|
|
BUILD_SRC = \
|
2016-03-14 00:07:40 +00:00
|
|
|
build/src/a-c.c \
|
|
|
|
build/src/baselayer.c \
|
|
|
|
build/src/cache1d.c \
|
|
|
|
build/src/compat.c \
|
|
|
|
build/src/common.c \
|
|
|
|
build/src/crc32.c \
|
|
|
|
build/src/defs.c \
|
|
|
|
build/src/colmatch.c \
|
|
|
|
build/src/engine.c \
|
|
|
|
build/src/glbuild.c \
|
|
|
|
build/src/polymost.c \
|
|
|
|
build/src/mdsprite.c \
|
|
|
|
build/src/texcache.c \
|
|
|
|
build/src/dxtfilter.c \
|
|
|
|
build/src/hightile.c \
|
|
|
|
build/src/textfont.c \
|
|
|
|
build/src/smalltextfont.c \
|
|
|
|
build/src/kplib.c \
|
|
|
|
build/src/mmulti_null.c \
|
|
|
|
build/src/lz4.c \
|
|
|
|
build/src/osd.c \
|
|
|
|
build/src/md4.c \
|
|
|
|
build/src/pragmas.c \
|
|
|
|
build/src/scriptfile.c \
|
|
|
|
build/src/mutex.c \
|
|
|
|
build/src/xxhash.c \
|
|
|
|
build/src/voxmodel.c \
|
|
|
|
build/src/sdlayer.c
|
2014-03-22 09:25:51 +00:00
|
|
|
|
2016-03-28 05:15:23 +00:00
|
|
|
JMACT_SRC = \
|
|
|
|
source/jmact/file_lib.c \
|
2016-03-14 00:07:40 +00:00
|
|
|
source/jmact/control.c \
|
|
|
|
source/jmact/keyboard.c \
|
|
|
|
source/jmact/mouse.c \
|
|
|
|
source/jmact/joystick.c \
|
|
|
|
source/jmact/scriplib.c \
|
|
|
|
source/jmact/animlib.c
|
2014-03-22 09:25:51 +00:00
|
|
|
|
2016-03-28 05:15:23 +00:00
|
|
|
GAME_SRC = \
|
|
|
|
source/game.c \
|
2016-03-14 00:07:40 +00:00
|
|
|
source/actors.c \
|
|
|
|
source/anim.c \
|
|
|
|
source/animsounds.c \
|
|
|
|
source/animvpx.c \
|
|
|
|
source/common.c \
|
|
|
|
source/config.c \
|
|
|
|
source/demo.c \
|
|
|
|
source/gamedef.c \
|
|
|
|
source/gameexec.c \
|
|
|
|
source/gamevars.c \
|
|
|
|
source/global.c \
|
|
|
|
source/input.c \
|
|
|
|
source/menus.c \
|
|
|
|
source/namesdyn.c \
|
|
|
|
source/net.c \
|
|
|
|
source/player.c \
|
|
|
|
source/premap.c \
|
|
|
|
source/savegame.c \
|
|
|
|
source/sector.c \
|
|
|
|
source/rts.c \
|
|
|
|
source/osdfuncs.c \
|
|
|
|
source/osdcmds.c \
|
|
|
|
source/grpscan.c \
|
|
|
|
source/sounds.c \
|
|
|
|
source/soundsdyn.c \
|
|
|
|
source/sdlmusic.c \
|
|
|
|
source/rev.c \
|
|
|
|
source/cmdline.c \
|
|
|
|
source/screens.c \
|
|
|
|
source/screentext.c \
|
|
|
|
source/cheats.c \
|
|
|
|
source/sbar.c
|
2016-03-28 05:15:23 +00:00
|
|
|
|
|
|
|
JAUDIO_SRC = \
|
|
|
|
source/jaudiolib/src/drivers.c \
|
2016-03-14 00:07:40 +00:00
|
|
|
source/jaudiolib/src/fx_man.c \
|
|
|
|
source/jaudiolib/src/multivoc.c \
|
|
|
|
source/jaudiolib/src/mix.c \
|
|
|
|
source/jaudiolib/src/mixst.c \
|
|
|
|
source/jaudiolib/src/pitch.c \
|
|
|
|
source/jaudiolib/src/formats.c \
|
|
|
|
source/jaudiolib/src/vorbis.c \
|
|
|
|
source/jaudiolib/src/flac.c \
|
|
|
|
source/jaudiolib/src/xa.c \
|
|
|
|
source/jaudiolib/src/driver_nosound.c \
|
|
|
|
source/jaudiolib/src/driver_sdl.c
|
2016-03-28 05:15:23 +00:00
|
|
|
|
|
|
|
ENET_SRC = \
|
|
|
|
source/enet/src/callbacks.c \
|
2016-03-14 00:07:40 +00:00
|
|
|
source/enet/src/host.c \
|
|
|
|
source/enet/src/list.c \
|
|
|
|
source/enet/src/packet.c \
|
|
|
|
source/enet/src/peer.c \
|
|
|
|
source/enet/src/protocol.c \
|
|
|
|
source/enet/src/compress.c \
|
2014-03-22 09:25:51 +00:00
|
|
|
source/enet/src/unix.c
|
2016-03-28 05:15:23 +00:00
|
|
|
|
2016-03-14 00:07:40 +00:00
|
|
|
LOCAL_SRC_FILES = $(ANDROID_SRC) $(JAUDIO_SRC) $(JMACT_SRC) $(GAME_SRC) $(BUILD_SRC)
|
2014-03-22 09:25:51 +00:00
|
|
|
|
2016-03-28 05:15:23 +00:00
|
|
|
LOCAL_LDLIBS := -lGLESv1_CM -lEGL -ldl -llog
|
|
|
|
LOCAL_STATIC_LIBRARIES := touch
|
|
|
|
LOCAL_SHARED_LIBRARIES := ogg vorbis SDL2 SDL2_mixer libvpx
|
2014-03-22 09:25:51 +00:00
|
|
|
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|