Android.mk
author Ozkan Sezer <sezeroz@gmail.com>
Wed, 03 Oct 2018 21:55:00 +0300
changeset 863 b81eb791d10d
parent 862 fba113e1d189
permissions -rw-r--r--
readmidi.c (groom_list): avoid integer overflow when recomputing time.

from libtimidity -- see:
https://sourceforge.net/p/libtimidity/libtimidity/ci/11be98a89eac229111420e6a3d521edbfddb0dbc/
     1 # Save the local path
     2 SDL_MIXER_LOCAL_PATH := $(call my-dir)
     3 
     4 
     5 # Enable this if you want to support loading FLAC music with libFLAC
     6 SUPPORT_FLAC ?= true
     7 FLAC_LIBRARY_PATH := external/flac-1.3.2
     8 
     9 # Enable this if you want to support loading OGG Vorbis music via Tremor
    10 SUPPORT_OGG ?= true
    11 OGG_LIBRARY_PATH := external/libogg-1.3.2
    12 VORBIS_LIBRARY_PATH := external/libvorbisidec-1.2.1
    13 
    14 # Enable this if you want to support loading MP3 music via MPG123
    15 SUPPORT_MP3_MPG123 ?= true
    16 MPG123_LIBRARY_PATH := external/mpg123-1.25.6
    17 
    18 # Enable this if you want to support loading MOD music via modplug
    19 SUPPORT_MOD_MODPLUG ?= true
    20 MODPLUG_LIBRARY_PATH := external/libmodplug-0.8.9.0
    21 
    22 # Enable this if you want to support TiMidity
    23 SUPPORT_MID_TIMIDITY ?= true
    24 TIMIDITY_LIBRARY_PATH := timidity
    25 
    26 
    27 # Build the library
    28 ifeq ($(SUPPORT_FLAC),true)
    29     include $(SDL_MIXER_LOCAL_PATH)/$(FLAC_LIBRARY_PATH)/Android.mk
    30 endif
    31 
    32 # Build the library
    33 ifeq ($(SUPPORT_OGG),true)
    34     include $(SDL_MIXER_LOCAL_PATH)/$(OGG_LIBRARY_PATH)/Android.mk
    35     include $(SDL_MIXER_LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)/Android.mk
    36 endif
    37 
    38 # Build the library
    39 ifeq ($(SUPPORT_MP3_MPG123),true)
    40     include $(SDL_MIXER_LOCAL_PATH)/$(MPG123_LIBRARY_PATH)/Android.mk
    41 endif
    42 
    43 # Build the library
    44 ifeq ($(SUPPORT_MOD_MODPLUG),true)
    45     include $(SDL_MIXER_LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/Android.mk
    46 endif
    47 
    48 # Build the library
    49 ifeq ($(SUPPORT_MID_TIMIDITY),true)
    50     include $(SDL_MIXER_LOCAL_PATH)/$(TIMIDITY_LIBRARY_PATH)/Android.mk
    51 endif
    52 
    53 
    54 # Restore local path
    55 LOCAL_PATH := $(SDL_MIXER_LOCAL_PATH)
    56 
    57 include $(CLEAR_VARS)
    58 
    59 LOCAL_MODULE := SDL2_mixer
    60 
    61 LOCAL_SRC_FILES := $(notdir $(filter-out %/playmus.c %/playwave.c, $(wildcard $(LOCAL_PATH)/*.c))) \
    62 
    63 LOCAL_CFLAGS :=
    64 LOCAL_LDLIBS :=
    65 LOCAL_STATIC_LIBRARIES :=
    66 LOCAL_SHARED_LIBRARIES := SDL2
    67 
    68 ifeq ($(SUPPORT_FLAC),true)
    69     LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(FLAC_LIBRARY_PATH)/include
    70     LOCAL_CFLAGS += -DMUSIC_FLAC
    71     LOCAL_STATIC_LIBRARIES += libFLAC
    72 endif
    73 
    74 ifeq ($(SUPPORT_OGG),true)
    75     LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(OGG_LIBRARY_PATH)/include
    76     LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)
    77     LOCAL_CFLAGS += -DMUSIC_OGG -DOGG_USE_TREMOR -DOGG_HEADER="<ivorbisfile.h>"
    78     LOCAL_STATIC_LIBRARIES += ogg vorbisidec
    79 endif
    80 
    81 # This needs to be a shared library to comply with the LGPL license
    82 ifeq ($(SUPPORT_MP3_MPG123),true)
    83     LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MPG123_LIBRARY_PATH)
    84     LOCAL_CFLAGS += -DMUSIC_MP3_MPG123
    85     LOCAL_SHARED_LIBRARIES += mpg123
    86 endif
    87 
    88 ifeq ($(SUPPORT_MOD_MODPLUG),true)
    89     LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src
    90     LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src/libmodplug
    91     LOCAL_CFLAGS += -DMUSIC_MOD_MODPLUG -DMODPLUG_HEADER="<modplug.h>"
    92     LOCAL_STATIC_LIBRARIES += modplug
    93 endif
    94 
    95 ifeq ($(SUPPORT_MID_TIMIDITY),true)
    96     LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(TIMIDITY_LIBRARY_PATH)
    97     LOCAL_CFLAGS += -DMUSIC_MID_TIMIDITY
    98     LOCAL_STATIC_LIBRARIES += timidity
    99 endif
   100 
   101 LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)
   102 
   103 include $(BUILD_SHARED_LIBRARY)