Subversion Repositories eduke32

Rev

Rev 5719 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4386 terminx 1
LOCAL_PATH := $(call my-dir)
2
 
3
include $(CLEAR_VARS)
4
 
5719 hendricks2 5
ifeq ($(findstring clang,$(NDK_TOOLCHAIN_VERSION)),)
6
    FOUND_CLANG := 0
7
else
8
    FOUND_CLANG := 1
9
endif
10
 
5629 terminx 11
LOCAL_MODULE    := duke3d
4386 terminx 12
 
5707 hendricks2 13
COMMONFLAGS     := -x c++ -std=gnu++11 -fvisibility=hidden -fPIC -funsigned-char -fno-strict-aliasing -pthread \
5677 hendricks2 14
                   -W -Wall -Wextra -Wpointer-arith -Wno-char-subscripts -Wno-missing-braces -Wwrite-strings -Wuninitialized \
5719 hendricks2 15
                   -Wno-attributes -Wno-strict-overflow -Wno-unused-result -Wlogical-op -Wcast-qual -Werror=return-type \
5780 hendricks2 16
                   -DHAVE_VORBIS -DHAVE_JWZGLES -DHAVE_ANDROID -DRENDERTYPESDL=1 -DMIXERTYPESDL=1 -DUSE_OPENGL -DNETCODE_DISABLE -DUSE_LIBVPX \
5707 hendricks2 17
                   -DHAVE_INTTYPES -D_GNU_SOURCE=1 -D_REENTRANT
4386 terminx 18
 
5719 hendricks2 19
ifeq ($(FOUND_CLANG),1)
20
    COMMONFLAGS += -Wno-unknown-warning-option -Wno-deprecated-register
21
endif
22
 
5677 hendricks2 23
LOCAL_LDFLAGS   := -fuse-ld=bfd
24
LOCAL_ARM_NEON  = true
25
 
5625 terminx 26
ifeq ($(NDK_DEBUG), 1)
5677 hendricks2 27
    COMMONFLAGS += -O0 -ggdb -fno-omit-frame-pointer -fno-stack-protector -D_FORTIFY_SOURCE=0 -DDEBUGGINGAIDS=0
5625 terminx 28
else
5717 hendricks2 29
    COMMONFLAGS += -O2 -DNDEBUG -D_FORTIFY_SOURCE=2
5719 hendricks2 30
    ifeq ($(FOUND_CLANG),0)
5717 hendricks2 31
        COMMONFLAGS += -DUSING_LTO -flto
32
        LOCAL_LDFLAGS += -flto
33
    endif
5625 terminx 34
endif
35
 
5677 hendricks2 36
LOCAL_CFLAGS    = $(COMMONFLAGS)
37
LOCAL_CPPFLAGS  = $(COMMONFLAGS)
4386 terminx 38
 
5663 terminx 39
LOCAL_C_INCLUDES := $(LOCAL_PATH)/source $(LOCAL_PATH)/source/jmact $(LOCAL_PATH)/source/jaudiolib/include $(LOCAL_PATH)/source/enet/include $(LOCAL_PATH)/build/include
5690 hendricks2 40
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/android/etcpak
5663 terminx 41
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
4693 terminx 42
 
4386 terminx 43
ANDROID_SRC = \
5663 terminx 44
    build/src/jwzgles.c \
5695 terminx 45
    platform/Android/Duke3d/jni/android-jni.cpp \
5690 hendricks2 46
    source/android/etcpak/ProcessRGB.cpp \
47
    source/android/etcpak/Tables.cpp \
5663 terminx 48
    source/android/in_android.c
4386 terminx 49
 
50
BUILD_SRC = \
5663 terminx 51
    build/src/a-c.c \
52
    build/src/baselayer.c \
53
    build/src/cache1d.c \
54
    build/src/compat.c \
55
    build/src/common.c \
56
    build/src/crc32.c \
57
    build/src/defs.c \
58
    build/src/colmatch.c \
59
    build/src/engine.c \
60
    build/src/glbuild.c \
61
    build/src/polymost.c \
62
    build/src/mdsprite.c \
63
    build/src/texcache.c \
64
    build/src/dxtfilter.c \
65
    build/src/hightile.c \
66
    build/src/textfont.c \
67
    build/src/smalltextfont.c \
68
    build/src/kplib.c \
69
    build/src/mmulti_null.c \
70
    build/src/lz4.c \
71
    build/src/osd.c \
72
    build/src/md4.c \
73
    build/src/pragmas.c \
74
    build/src/scriptfile.c \
75
    build/src/mutex.c \
76
    build/src/xxhash.c \
77
    build/src/voxmodel.c \
78
    build/src/sdlayer.c
4386 terminx 79
 
5677 hendricks2 80
JMACT_SRC = \
81
    source/jmact/file_lib.c \
5663 terminx 82
    source/jmact/control.c \
83
    source/jmact/keyboard.c \
84
    source/jmact/mouse.c \
85
    source/jmact/joystick.c \
86
    source/jmact/scriplib.c \
87
    source/jmact/animlib.c
4386 terminx 88
 
5677 hendricks2 89
GAME_SRC = \
90
    source/game.c \
5663 terminx 91
    source/actors.c \
92
    source/anim.c \
93
    source/animsounds.c \
94
    source/animvpx.c \
95
    source/common.c \
96
    source/config.c \
97
    source/demo.c \
98
    source/gamedef.c \
99
    source/gameexec.c \
100
    source/gamevars.c \
101
    source/global.c \
102
    source/input.c \
103
    source/menus.c \
104
    source/namesdyn.c \
105
    source/net.c \
106
    source/player.c \
107
    source/premap.c \
108
    source/savegame.c \
109
    source/sector.c \
110
    source/rts.c \
111
    source/osdfuncs.c \
112
    source/osdcmds.c \
113
    source/grpscan.c \
114
    source/sounds.c \
115
    source/soundsdyn.c \
116
    source/sdlmusic.c \
117
    source/rev.c \
118
    source/cmdline.c \
119
    source/screens.c \
120
    source/screentext.c \
121
    source/cheats.c \
122
    source/sbar.c
5677 hendricks2 123
 
124
JAUDIO_SRC = \
125
    source/jaudiolib/src/drivers.c \
5663 terminx 126
    source/jaudiolib/src/fx_man.c \
127
    source/jaudiolib/src/multivoc.c \
128
    source/jaudiolib/src/mix.c \
129
    source/jaudiolib/src/mixst.c \
130
    source/jaudiolib/src/pitch.c \
131
    source/jaudiolib/src/formats.c \
132
    source/jaudiolib/src/vorbis.c \
133
    source/jaudiolib/src/flac.c \
134
    source/jaudiolib/src/xa.c \
135
    source/jaudiolib/src/driver_nosound.c \
136
    source/jaudiolib/src/driver_sdl.c
5677 hendricks2 137
 
138
ENET_SRC = \
139
    source/enet/src/callbacks.c \
5663 terminx 140
    source/enet/src/host.c \
141
    source/enet/src/list.c \
142
    source/enet/src/packet.c \
143
    source/enet/src/peer.c \
144
    source/enet/src/protocol.c \
145
    source/enet/src/compress.c \
4386 terminx 146
    source/enet/src/unix.c
5677 hendricks2 147
 
5663 terminx 148
LOCAL_SRC_FILES         = $(ANDROID_SRC) $(JAUDIO_SRC) $(JMACT_SRC) $(GAME_SRC) $(BUILD_SRC)
4386 terminx 149
 
5677 hendricks2 150
LOCAL_LDLIBS            := -lGLESv1_CM -lEGL -ldl -llog
151
LOCAL_STATIC_LIBRARIES  := touch
152
LOCAL_SHARED_LIBRARIES  := ogg vorbis SDL2 SDL2_mixer libvpx
4386 terminx 153
 
154
include $(BUILD_SHARED_LIBRARY)