Android.mk
author Sam Lantinga <slouken@libsdl.org>
Sat, 01 Jun 2013 22:30:04 -0700
changeset 627 438fb12df34f
parent 626 1da1d92ffa9c
child 639 f8901a7ff3f1
permissions -rw-r--r--
Updated iOS project to include OGG support directly
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@626
     7
# Enable this if you want to support loading MOD music via mikmod
slouken@626
     8
# The library path should be a relative path to this directory.
slouken@626
     9
SUPPORT_MOD := true
slouken@626
    10
MOD_LIBRARY_PATH := external/libmikmod-3.1.12
slouken@493
    11
slouken@626
    12
# Enable this if you want to support loading MP3 music via SMPEG
slouken@626
    13
# The library path should be a relative path to this directory.
slouken@626
    14
SUPPORT_MP3 := true
slouken@626
    15
MP3_LIBRARY_PATH := external/smpeg2-2.0.0
slouken@626
    16
slouken@626
    17
# Enable this if you want to support loading OGG Vorbis music via Tremor
slouken@626
    18
# The library path should be a relative path to this directory.
slouken@626
    19
SUPPORT_OGG := true
slouken@626
    20
OGG_LIBRARY_PATH := external/libogg-1.3.1
slouken@626
    21
VORBIS_LIBRARY_PATH := external/libvorbisidec-1.2.1
slouken@626
    22
slouken@626
    23
slouken@626
    24
LOCAL_C_INCLUDES := $(NDK_PROJECT_PATH)/jni/SDL/include
slouken@626
    25
LOCAL_CFLAGS := -DWAV_MUSIC
slouken@491
    26
slouken@491
    27
LOCAL_SRC_FILES := $(notdir $(filter-out %/playmus.c %/playwave.c, $(wildcard $(LOCAL_PATH)/*.c)))
slouken@491
    28
slouken@626
    29
LOCAL_LDLIBS :=
slouken@626
    30
LOCAL_STATIC_LIBRARIES :=
slouken@626
    31
LOCAL_SHARED_LIBRARIES := SDL2
slouken@626
    32
slouken@626
    33
ifeq ($(SUPPORT_MOD),true)
slouken@626
    34
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MOD_LIBRARY_PATH)/include
slouken@626
    35
    LOCAL_CFLAGS += -DMOD_MUSIC
slouken@626
    36
    LOCAL_SHARED_LIBRARIES += mikmod
slouken@626
    37
endif
slouken@626
    38
slouken@626
    39
ifeq ($(SUPPORT_MP3),true)
slouken@626
    40
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MP3_LIBRARY_PATH)
slouken@626
    41
    LOCAL_CFLAGS += -DMP3_MUSIC
slouken@626
    42
    LOCAL_SHARED_LIBRARIES += smpeg2
slouken@626
    43
endif
slouken@626
    44
slouken@626
    45
ifeq ($(SUPPORT_OGG),true)
slouken@626
    46
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(OGG_LIBRARY_PATH)/include $(LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)
slouken@626
    47
    LOCAL_CFLAGS += -DOGG_MUSIC -DOGG_USE_TREMOR
slouken@626
    48
    LOCAL_SRC_FILES += \
slouken@626
    49
        $(VORBIS_LIBRARY_PATH)/mdct.c \
slouken@626
    50
        $(VORBIS_LIBRARY_PATH)/block.c \
slouken@626
    51
        $(VORBIS_LIBRARY_PATH)/window.c \
slouken@626
    52
        $(VORBIS_LIBRARY_PATH)/synthesis.c \
slouken@626
    53
        $(VORBIS_LIBRARY_PATH)/info.c \
slouken@626
    54
        $(VORBIS_LIBRARY_PATH)/floor1.c \
slouken@626
    55
        $(VORBIS_LIBRARY_PATH)/floor0.c \
slouken@626
    56
        $(VORBIS_LIBRARY_PATH)/vorbisfile.c \
slouken@626
    57
        $(VORBIS_LIBRARY_PATH)/res012.c \
slouken@626
    58
        $(VORBIS_LIBRARY_PATH)/mapping0.c \
slouken@626
    59
        $(VORBIS_LIBRARY_PATH)/registry.c \
slouken@626
    60
        $(VORBIS_LIBRARY_PATH)/codebook.c \
slouken@626
    61
        $(VORBIS_LIBRARY_PATH)/sharedbook.c \
slouken@626
    62
        $(OGG_LIBRARY_PATH)/src/framing.c \
slouken@626
    63
        $(OGG_LIBRARY_PATH)/src/bitwise.c
slouken@626
    64
endif
slouken@491
    65
slouken@491
    66
include $(BUILD_SHARED_LIBRARY)