Skip to content

Latest commit

 

History

History
102 lines (77 loc) · 2.89 KB

Android.mk

File metadata and controls

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