Android.mk
author Sam Lantinga
Sun, 09 Jun 2013 16:22:42 -0700
changeset 639 f8901a7ff3f1
parent 626 1da1d92ffa9c
child 643 5bf7568384a4
permissions -rw-r--r--
Switched from mikmod to libmodplug, which is now in the public domain.
This allows us to add MOD support for iOS and Android, yay!
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@639
     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@639
    14
SUPPORT_MOD_MIKMOD := true
slouken@639
    15
MIKMOD_LIBRARY_PATH := external/libmikmod-3.1.12
slouken@626
    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@639
    19
SUPPORT_MP3_SMPEG := true
slouken@639
    20
SMPEG_LIBRARY_PATH := external/smpeg2-2.0.0
slouken@493
    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@626
    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@626
    29
LOCAL_C_INCLUDES := $(NDK_PROJECT_PATH)/jni/SDL/include
slouken@626
    30
LOCAL_CFLAGS := -DWAV_MUSIC
slouken@491
    31
slouken@491
    32
LOCAL_SRC_FILES := $(notdir $(filter-out %/playmus.c %/playwave.c, $(wildcard $(LOCAL_PATH)/*.c)))
slouken@491
    33
slouken@626
    34
LOCAL_LDLIBS :=
slouken@626
    35
LOCAL_STATIC_LIBRARIES :=
slouken@626
    36
LOCAL_SHARED_LIBRARIES := SDL2
slouken@626
    37
slouken@639
    38
ifeq ($(SUPPORT_MOD_MODPLUG),true)
slouken@639
    39
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src/libmodplug
slouken@639
    40
    LOCAL_CFLAGS += -DMODPLUG_MUSIC -DHAVE_SETENV -DHAVE_SINF
slouken@639
    41
    LOCAL_SRC_FILES += \
slouken@639
    42
        $(MODPLUG_LIBRARY_PATH)/src/fastmix.cpp \
slouken@639
    43
        $(MODPLUG_LIBRARY_PATH)/src/load_669.cpp \
slouken@639
    44
        $(MODPLUG_LIBRARY_PATH)/src/load_abc.cpp \
slouken@639
    45
        $(MODPLUG_LIBRARY_PATH)/src/load_amf.cpp \
slouken@639
    46
        $(MODPLUG_LIBRARY_PATH)/src/load_ams.cpp \
slouken@639
    47
        $(MODPLUG_LIBRARY_PATH)/src/load_dbm.cpp \
slouken@639
    48
        $(MODPLUG_LIBRARY_PATH)/src/load_dmf.cpp \
slouken@639
    49
        $(MODPLUG_LIBRARY_PATH)/src/load_dsm.cpp \
slouken@639
    50
        $(MODPLUG_LIBRARY_PATH)/src/load_far.cpp \
slouken@639
    51
        $(MODPLUG_LIBRARY_PATH)/src/load_it.cpp \
slouken@639
    52
        $(MODPLUG_LIBRARY_PATH)/src/load_j2b.cpp \
slouken@639
    53
        $(MODPLUG_LIBRARY_PATH)/src/load_mdl.cpp \
slouken@639
    54
        $(MODPLUG_LIBRARY_PATH)/src/load_med.cpp \
slouken@639
    55
        $(MODPLUG_LIBRARY_PATH)/src/load_mid.cpp \
slouken@639
    56
        $(MODPLUG_LIBRARY_PATH)/src/load_mod.cpp \
slouken@639
    57
        $(MODPLUG_LIBRARY_PATH)/src/load_mt2.cpp \
slouken@639
    58
        $(MODPLUG_LIBRARY_PATH)/src/load_mtm.cpp \
slouken@639
    59
        $(MODPLUG_LIBRARY_PATH)/src/load_okt.cpp \
slouken@639
    60
        $(MODPLUG_LIBRARY_PATH)/src/load_pat.cpp \
slouken@639
    61
        $(MODPLUG_LIBRARY_PATH)/src/load_psm.cpp \
slouken@639
    62
        $(MODPLUG_LIBRARY_PATH)/src/load_ptm.cpp \
slouken@639
    63
        $(MODPLUG_LIBRARY_PATH)/src/load_s3m.cpp \
slouken@639
    64
        $(MODPLUG_LIBRARY_PATH)/src/load_stm.cpp \
slouken@639
    65
        $(MODPLUG_LIBRARY_PATH)/src/load_ult.cpp \
slouken@639
    66
        $(MODPLUG_LIBRARY_PATH)/src/load_umx.cpp \
slouken@639
    67
        $(MODPLUG_LIBRARY_PATH)/src/load_wav.cpp \
slouken@639
    68
        $(MODPLUG_LIBRARY_PATH)/src/load_xm.cpp \
slouken@639
    69
        $(MODPLUG_LIBRARY_PATH)/src/mmcmp.cpp \
slouken@639
    70
        $(MODPLUG_LIBRARY_PATH)/src/modplug.cpp \
slouken@639
    71
        $(MODPLUG_LIBRARY_PATH)/src/snd_dsp.cpp \
slouken@639
    72
        $(MODPLUG_LIBRARY_PATH)/src/snd_flt.cpp \
slouken@639
    73
        $(MODPLUG_LIBRARY_PATH)/src/snd_fx.cpp \
slouken@639
    74
        $(MODPLUG_LIBRARY_PATH)/src/sndfile.cpp \
slouken@639
    75
        $(MODPLUG_LIBRARY_PATH)/src/sndmix.cpp
slouken@639
    76
endif
slouken@639
    77
slouken@639
    78
ifeq ($(SUPPORT_MOD_MIKMOD),true)
slouken@639
    79
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MIKMOD_LIBRARY_PATH)/include
slouken@626
    80
    LOCAL_CFLAGS += -DMOD_MUSIC
slouken@626
    81
    LOCAL_SHARED_LIBRARIES += mikmod
slouken@626
    82
endif
slouken@626
    83
slouken@639
    84
ifeq ($(SUPPORT_MP3_SMPEG),true)
slouken@639
    85
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SMPEG_LIBRARY_PATH)
slouken@626
    86
    LOCAL_CFLAGS += -DMP3_MUSIC
slouken@626
    87
    LOCAL_SHARED_LIBRARIES += smpeg2
slouken@626
    88
endif
slouken@626
    89
slouken@626
    90
ifeq ($(SUPPORT_OGG),true)
slouken@626
    91
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(OGG_LIBRARY_PATH)/include $(LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)
slouken@626
    92
    LOCAL_CFLAGS += -DOGG_MUSIC -DOGG_USE_TREMOR
slouken@626
    93
    LOCAL_SRC_FILES += \
slouken@626
    94
        $(VORBIS_LIBRARY_PATH)/mdct.c \
slouken@626
    95
        $(VORBIS_LIBRARY_PATH)/block.c \
slouken@626
    96
        $(VORBIS_LIBRARY_PATH)/window.c \
slouken@626
    97
        $(VORBIS_LIBRARY_PATH)/synthesis.c \
slouken@626
    98
        $(VORBIS_LIBRARY_PATH)/info.c \
slouken@626
    99
        $(VORBIS_LIBRARY_PATH)/floor1.c \
slouken@626
   100
        $(VORBIS_LIBRARY_PATH)/floor0.c \
slouken@626
   101
        $(VORBIS_LIBRARY_PATH)/vorbisfile.c \
slouken@626
   102
        $(VORBIS_LIBRARY_PATH)/res012.c \
slouken@626
   103
        $(VORBIS_LIBRARY_PATH)/mapping0.c \
slouken@626
   104
        $(VORBIS_LIBRARY_PATH)/registry.c \
slouken@626
   105
        $(VORBIS_LIBRARY_PATH)/codebook.c \
slouken@626
   106
        $(VORBIS_LIBRARY_PATH)/sharedbook.c \
slouken@626
   107
        $(OGG_LIBRARY_PATH)/src/framing.c \
slouken@626
   108
        $(OGG_LIBRARY_PATH)/src/bitwise.c
slouken@626
   109
endif
slouken@491
   110
slouken@491
   111
include $(BUILD_SHARED_LIBRARY)