Android.mk
author Ozkan Sezer
Wed, 18 Dec 2019 18:55:50 +0300
changeset 1097 b8a083ebef5f
parent 1048 569f5be0f8ec
permissions -rw-r--r--
timidity/readmidi.c: tidy-up the dumpstring thing for text events.

avoids a warning too, as a side effect.
slouken@830
     1
# Save the local path
slouken@862
     2
SDL_MIXER_LOCAL_PATH := $(call my-dir)
slouken@791
     3
slouken@830
     4
# Enable this if you want to support loading FLAC music with libFLAC
slouken@830
     5
SUPPORT_FLAC ?= true
sezeroz@962
     6
FLAC_LIBRARY_PATH := external/flac-1.3.3
slouken@830
     7
slouken@830
     8
# Enable this if you want to support loading OGG Vorbis music via Tremor
slouken@830
     9
SUPPORT_OGG ?= true
slouken@830
    10
OGG_LIBRARY_PATH := external/libogg-1.3.2
slouken@830
    11
VORBIS_LIBRARY_PATH := external/libvorbisidec-1.2.1
slouken@830
    12
slouken@830
    13
# Enable this if you want to support loading MP3 music via MPG123
slouken@830
    14
SUPPORT_MP3_MPG123 ?= true
sezeroz@964
    15
MPG123_LIBRARY_PATH := external/mpg123-1.25.13
slouken@830
    16
slouken@830
    17
# Enable this if you want to support loading MOD music via modplug
slouken@830
    18
SUPPORT_MOD_MODPLUG ?= true
slouken@830
    19
MODPLUG_LIBRARY_PATH := external/libmodplug-0.8.9.0
slouken@830
    20
slouken@830
    21
# Enable this if you want to support TiMidity
slouken@841
    22
SUPPORT_MID_TIMIDITY ?= true
admin@999
    23
TIMIDITY_LIBRARY_PATH := src/codecs/timidity
slouken@830
    24
slouken@791
    25
slouken@830
    26
# Build the library
slouken@830
    27
ifeq ($(SUPPORT_FLAC),true)
slouken@862
    28
    include $(SDL_MIXER_LOCAL_PATH)/$(FLAC_LIBRARY_PATH)/Android.mk
slouken@830
    29
endif
slouken@830
    30
slouken@830
    31
# Build the library
slouken@830
    32
ifeq ($(SUPPORT_OGG),true)
slouken@862
    33
    include $(SDL_MIXER_LOCAL_PATH)/$(OGG_LIBRARY_PATH)/Android.mk
slouken@862
    34
    include $(SDL_MIXER_LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)/Android.mk
slouken@830
    35
endif
slouken@830
    36
slouken@830
    37
# Build the library
slouken@830
    38
ifeq ($(SUPPORT_MP3_MPG123),true)
slouken@862
    39
    include $(SDL_MIXER_LOCAL_PATH)/$(MPG123_LIBRARY_PATH)/Android.mk
slouken@830
    40
endif
slouken@830
    41
slouken@830
    42
# Build the library
slouken@830
    43
ifeq ($(SUPPORT_MOD_MODPLUG),true)
slouken@862
    44
    include $(SDL_MIXER_LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/Android.mk
slouken@830
    45
endif
slouken@830
    46
slouken@830
    47
# Build the library
slouken@841
    48
ifeq ($(SUPPORT_MID_TIMIDITY),true)
slouken@862
    49
    include $(SDL_MIXER_LOCAL_PATH)/$(TIMIDITY_LIBRARY_PATH)/Android.mk
slouken@830
    50
endif
slouken@830
    51
slouken@830
    52
slouken@830
    53
# Restore local path
slouken@862
    54
LOCAL_PATH := $(SDL_MIXER_LOCAL_PATH)
slouken@491
    55
slouken@491
    56
include $(CLEAR_VARS)
slouken@491
    57
slouken@581
    58
LOCAL_MODULE := SDL2_mixer
slouken@491
    59
sylvain@1035
    60
LOCAL_C_INCLUDES :=                                     \
sylvain@1035
    61
    $(LOCAL_PATH)/include                               \
sylvain@1035
    62
    $(LOCAL_PATH)/src/                                  \
sylvain@1035
    63
    $(LOCAL_PATH)/src/codecs                            \
sylvain@1035
    64
sylvain@1035
    65
sylvain@1035
    66
LOCAL_SRC_FILES :=                                      \
sylvain@1035
    67
    $(subst $(LOCAL_PATH)/,,                            \
sylvain@1035
    68
    $(wildcard $(LOCAL_PATH)/src/*.c)                   \
sylvain@1035
    69
    $(wildcard $(LOCAL_PATH)/src/codecs/*.c)            \
sylvain@1035
    70
    )
slouken@689
    71
slouken@836
    72
LOCAL_CFLAGS :=
slouken@626
    73
LOCAL_LDLIBS :=
slouken@626
    74
LOCAL_STATIC_LIBRARIES :=
slouken@626
    75
LOCAL_SHARED_LIBRARIES := SDL2
slouken@626
    76
slouken@754
    77
ifeq ($(SUPPORT_FLAC),true)
slouken@837
    78
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(FLAC_LIBRARY_PATH)/include
slouken@837
    79
    LOCAL_CFLAGS += -DMUSIC_FLAC
slouken@830
    80
    LOCAL_STATIC_LIBRARIES += libFLAC
slouken@754
    81
endif
slouken@754
    82
slouken@830
    83
ifeq ($(SUPPORT_OGG),true)
slouken@830
    84
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(OGG_LIBRARY_PATH)/include
slouken@830
    85
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)
slouken@830
    86
    LOCAL_CFLAGS += -DMUSIC_OGG -DOGG_USE_TREMOR -DOGG_HEADER="<ivorbisfile.h>"
slouken@837
    87
    LOCAL_STATIC_LIBRARIES += ogg vorbisidec
slouken@639
    88
endif
slouken@639
    89
slouken@830
    90
# This needs to be a shared library to comply with the LGPL license
slouken@790
    91
ifeq ($(SUPPORT_MP3_MPG123),true)
slouken@790
    92
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MPG123_LIBRARY_PATH)
slouken@790
    93
    LOCAL_CFLAGS += -DMUSIC_MP3_MPG123
slouken@791
    94
    LOCAL_SHARED_LIBRARIES += mpg123
slouken@626
    95
endif
slouken@626
    96
slouken@830
    97
ifeq ($(SUPPORT_MOD_MODPLUG),true)
slouken@830
    98
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src
slouken@830
    99
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src/libmodplug
slouken@830
   100
    LOCAL_CFLAGS += -DMUSIC_MOD_MODPLUG -DMODPLUG_HEADER="<modplug.h>"
slouken@837
   101
    LOCAL_STATIC_LIBRARIES += modplug
slouken@830
   102
endif
slouken@830
   103
slouken@841
   104
ifeq ($(SUPPORT_MID_TIMIDITY),true)
slouken@837
   105
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(TIMIDITY_LIBRARY_PATH)
slouken@837
   106
    LOCAL_CFLAGS += -DMUSIC_MID_TIMIDITY
slouken@837
   107
    LOCAL_STATIC_LIBRARIES += timidity
slouken@626
   108
endif
slouken@491
   109
sylvain@1036
   110
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)/include
slouken@643
   111
slouken@491
   112
include $(BUILD_SHARED_LIBRARY)
sylvain@1048
   113
sylvain@1048
   114
###########################
sylvain@1048
   115
#
sylvain@1048
   116
# SDL2_mixer static library
sylvain@1048
   117
#
sylvain@1048
   118
###########################
sylvain@1048
   119
sylvain@1048
   120
LOCAL_MODULE := SDL2_mixer_static
sylvain@1048
   121
sylvain@1048
   122
LOCAL_MODULE_FILENAME := libSDL2_mixer
sylvain@1048
   123
sylvain@1048
   124
LOCAL_LDLIBS :=
sylvain@1048
   125
LOCAL_EXPORT_LDLIBS :=
sylvain@1048
   126
sylvain@1048
   127
include $(BUILD_STATIC_LIBRARY)
sylvain@1048
   128