Android.mk
author Sam Lantinga <slouken@libsdl.org>
Sat, 02 Jan 2016 22:12:31 -0800
changeset 712 7e59d684b070
parent 695 6a5e6d8d6a35
child 754 dac1854c8826
permissions -rw-r--r--
Updated to version 2.0.1
slouken@491
     1
LOCAL_PATH := $(call my-dir)
slouken@491
     2
slouken@491
     3
include $(CLEAR_VARS)
slouken@491
     4
slouken@581
     5
LOCAL_MODULE := SDL2_mixer
slouken@491
     6
slouken@639
     7
# Enable this if you want to support loading MOD music via modplug
slouken@639
     8
# The library path should be a relative path to this directory.
slouken@672
     9
SUPPORT_MOD_MODPLUG ?= true
slouken@639
    10
MODPLUG_LIBRARY_PATH := external/libmodplug-0.8.8.4
slouken@639
    11
slouken@626
    12
# Enable this if you want to support loading MOD music via mikmod
slouken@626
    13
# The library path should be a relative path to this directory.
slouken@672
    14
SUPPORT_MOD_MIKMOD ?= true
slouken@639
    15
MIKMOD_LIBRARY_PATH := external/libmikmod-3.1.12
slouken@493
    16
slouken@626
    17
# Enable this if you want to support loading MP3 music via SMPEG
slouken@626
    18
# The library path should be a relative path to this directory.
slouken@672
    19
SUPPORT_MP3_SMPEG ?= true
slouken@639
    20
SMPEG_LIBRARY_PATH := external/smpeg2-2.0.0
slouken@626
    21
slouken@626
    22
# Enable this if you want to support loading OGG Vorbis music via Tremor
slouken@626
    23
# The library path should be a relative path to this directory.
slouken@672
    24
SUPPORT_OGG ?= true
slouken@626
    25
OGG_LIBRARY_PATH := external/libogg-1.3.1
slouken@626
    26
VORBIS_LIBRARY_PATH := external/libvorbisidec-1.2.1
slouken@626
    27
slouken@626
    28
slouken@689
    29
# Enable this if you want to support TiMidity
slouken@689
    30
SUPPORT_TIMIDITY ?= true
slouken@689
    31
slouken@689
    32
LOCAL_C_INCLUDES := $(LOCAL_PATH) 
slouken@689
    33
LOCAL_CFLAGS := -DWAV_MUSIC 
slouken@491
    34
slouken@685
    35
LOCAL_SRC_FILES := $(notdir $(filter-out %/playmus.c %/playwave.c, $(wildcard $(LOCAL_PATH)/*.c))) \
slouken@689
    36
slouken@491
    37
slouken@626
    38
LOCAL_LDLIBS :=
slouken@626
    39
LOCAL_STATIC_LIBRARIES :=
slouken@626
    40
LOCAL_SHARED_LIBRARIES := SDL2
slouken@626
    41
slouken@689
    42
ifeq ($(SUPPORT_TIMIDITY),true)
slouken@689
    43
	LOCAL_C_INCLUDES += $(LOCAL_PATH)/timidity
slouken@689
    44
	LOCAL_CFLAGS += -DMID_MUSIC -DUSE_TIMIDITY_MIDI
slouken@689
    45
	LOCAL_SRC_FILES += $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/timidity/*.c))
slouken@689
    46
endif
slouken@689
    47
slouken@639
    48
ifeq ($(SUPPORT_MOD_MODPLUG),true)
slouken@639
    49
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src/libmodplug
slouken@695
    50
    LOCAL_CFLAGS += -DMODPLUG_MUSIC -DMODPLUG_HEADER="<modplug.h>" -DHAVE_SETENV -DHAVE_SINF
slouken@639
    51
    LOCAL_SRC_FILES += \
slouken@639
    52
        $(MODPLUG_LIBRARY_PATH)/src/fastmix.cpp \
slouken@639
    53
        $(MODPLUG_LIBRARY_PATH)/src/load_669.cpp \
slouken@639
    54
        $(MODPLUG_LIBRARY_PATH)/src/load_abc.cpp \
slouken@639
    55
        $(MODPLUG_LIBRARY_PATH)/src/load_amf.cpp \
slouken@639
    56
        $(MODPLUG_LIBRARY_PATH)/src/load_ams.cpp \
slouken@639
    57
        $(MODPLUG_LIBRARY_PATH)/src/load_dbm.cpp \
slouken@639
    58
        $(MODPLUG_LIBRARY_PATH)/src/load_dmf.cpp \
slouken@639
    59
        $(MODPLUG_LIBRARY_PATH)/src/load_dsm.cpp \
slouken@639
    60
        $(MODPLUG_LIBRARY_PATH)/src/load_far.cpp \
slouken@639
    61
        $(MODPLUG_LIBRARY_PATH)/src/load_it.cpp \
slouken@639
    62
        $(MODPLUG_LIBRARY_PATH)/src/load_j2b.cpp \
slouken@639
    63
        $(MODPLUG_LIBRARY_PATH)/src/load_mdl.cpp \
slouken@639
    64
        $(MODPLUG_LIBRARY_PATH)/src/load_med.cpp \
slouken@639
    65
        $(MODPLUG_LIBRARY_PATH)/src/load_mid.cpp \
slouken@639
    66
        $(MODPLUG_LIBRARY_PATH)/src/load_mod.cpp \
slouken@639
    67
        $(MODPLUG_LIBRARY_PATH)/src/load_mt2.cpp \
slouken@639
    68
        $(MODPLUG_LIBRARY_PATH)/src/load_mtm.cpp \
slouken@639
    69
        $(MODPLUG_LIBRARY_PATH)/src/load_okt.cpp \
slouken@639
    70
        $(MODPLUG_LIBRARY_PATH)/src/load_pat.cpp \
slouken@639
    71
        $(MODPLUG_LIBRARY_PATH)/src/load_psm.cpp \
slouken@639
    72
        $(MODPLUG_LIBRARY_PATH)/src/load_ptm.cpp \
slouken@639
    73
        $(MODPLUG_LIBRARY_PATH)/src/load_s3m.cpp \
slouken@639
    74
        $(MODPLUG_LIBRARY_PATH)/src/load_stm.cpp \
slouken@639
    75
        $(MODPLUG_LIBRARY_PATH)/src/load_ult.cpp \
slouken@639
    76
        $(MODPLUG_LIBRARY_PATH)/src/load_umx.cpp \
slouken@639
    77
        $(MODPLUG_LIBRARY_PATH)/src/load_wav.cpp \
slouken@639
    78
        $(MODPLUG_LIBRARY_PATH)/src/load_xm.cpp \
slouken@639
    79
        $(MODPLUG_LIBRARY_PATH)/src/mmcmp.cpp \
slouken@639
    80
        $(MODPLUG_LIBRARY_PATH)/src/modplug.cpp \
slouken@639
    81
        $(MODPLUG_LIBRARY_PATH)/src/snd_dsp.cpp \
slouken@639
    82
        $(MODPLUG_LIBRARY_PATH)/src/snd_flt.cpp \
slouken@639
    83
        $(MODPLUG_LIBRARY_PATH)/src/snd_fx.cpp \
slouken@639
    84
        $(MODPLUG_LIBRARY_PATH)/src/sndfile.cpp \
slouken@639
    85
        $(MODPLUG_LIBRARY_PATH)/src/sndmix.cpp
slouken@639
    86
endif
slouken@639
    87
slouken@639
    88
ifeq ($(SUPPORT_MOD_MIKMOD),true)
slouken@639
    89
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MIKMOD_LIBRARY_PATH)/include
slouken@626
    90
    LOCAL_CFLAGS += -DMOD_MUSIC
slouken@626
    91
    LOCAL_SHARED_LIBRARIES += mikmod
slouken@626
    92
endif
slouken@626
    93
slouken@639
    94
ifeq ($(SUPPORT_MP3_SMPEG),true)
slouken@639
    95
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SMPEG_LIBRARY_PATH)
slouken@626
    96
    LOCAL_CFLAGS += -DMP3_MUSIC
slouken@626
    97
    LOCAL_SHARED_LIBRARIES += smpeg2
slouken@626
    98
endif
slouken@626
    99
slouken@626
   100
ifeq ($(SUPPORT_OGG),true)
slouken@626
   101
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(OGG_LIBRARY_PATH)/include $(LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)
slouken@695
   102
    LOCAL_CFLAGS += -DOGG_MUSIC -DOGG_USE_TREMOR -DOGG_HEADER="<ivorbisfile.h>"
slouken@671
   103
    ifeq ($(TARGET_ARCH_ABI),armeabi)
slouken@671
   104
	LOCAL_CFLAGS += -D_ARM_ASSEM_
slouken@671
   105
    endif
slouken@671
   106
    ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
slouken@671
   107
	LOCAL_CFLAGS += -D_ARM_ASSEM_
slouken@671
   108
    endif
slouken@626
   109
    LOCAL_SRC_FILES += \
slouken@626
   110
        $(VORBIS_LIBRARY_PATH)/mdct.c \
slouken@626
   111
        $(VORBIS_LIBRARY_PATH)/block.c \
slouken@626
   112
        $(VORBIS_LIBRARY_PATH)/window.c \
slouken@626
   113
        $(VORBIS_LIBRARY_PATH)/synthesis.c \
slouken@626
   114
        $(VORBIS_LIBRARY_PATH)/info.c \
slouken@626
   115
        $(VORBIS_LIBRARY_PATH)/floor1.c \
slouken@626
   116
        $(VORBIS_LIBRARY_PATH)/floor0.c \
slouken@626
   117
        $(VORBIS_LIBRARY_PATH)/vorbisfile.c \
slouken@626
   118
        $(VORBIS_LIBRARY_PATH)/res012.c \
slouken@626
   119
        $(VORBIS_LIBRARY_PATH)/mapping0.c \
slouken@626
   120
        $(VORBIS_LIBRARY_PATH)/registry.c \
slouken@626
   121
        $(VORBIS_LIBRARY_PATH)/codebook.c \
slouken@626
   122
        $(VORBIS_LIBRARY_PATH)/sharedbook.c \
slouken@626
   123
        $(OGG_LIBRARY_PATH)/src/framing.c \
slouken@626
   124
        $(OGG_LIBRARY_PATH)/src/bitwise.c
slouken@626
   125
endif
slouken@491
   126
slouken@643
   127
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
slouken@643
   128
slouken@673
   129
LOCAL_ARM_MODE := arm
slouken@673
   130
slouken@491
   131
include $(BUILD_SHARED_LIBRARY)