Skip to content

Commit

Permalink
Android.mk: add GME support
Browse files Browse the repository at this point in the history
  • Loading branch information
mechakotik authored and sezero committed Sep 20, 2024
1 parent cc31eaa commit 66a206c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ MPG123_LIBRARY_PATH := external/mpg123
SUPPORT_WAVPACK ?= true
WAVPACK_LIBRARY_PATH := external/wavpack

# Enable this if you want to support loading music via libgme
SUPPORT_GME ?= true
GME_LIBRARY_PATH := external/libgme

# Enable this if you want to support loading MOD music via XMP-lite
SUPPORT_MOD_XMP ?= false
XMP_LIBRARY_PATH := external/libxmp
Expand Down Expand Up @@ -60,6 +64,11 @@ ifeq ($(SUPPORT_WAVPACK),true)
include $(SDL_MIXER_LOCAL_PATH)/$(WAVPACK_LIBRARY_PATH)/Android.mk
endif

# Build the library
ifeq ($(SUPPORT_GME),true)
include $(SDL_MIXER_LOCAL_PATH)/$(GME_LIBRARY_PATH)/Android.mk
endif

# Build the library
ifeq ($(SUPPORT_MOD_XMP),true)
include $(SDL_MIXER_LOCAL_PATH)/$(XMP_LIBRARY_PATH)/Android.mk
Expand Down Expand Up @@ -136,6 +145,12 @@ ifeq ($(SUPPORT_WAVPACK),true)
LOCAL_STATIC_LIBRARIES += wavpack
endif

ifeq ($(SUPPORT_GME),true)
LOCAL_CFLAGS += -DMUSIC_GME
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(GME_LIBRARY_PATH)
LOCAL_STATIC_LIBRARIES += libgme
endif

ifeq ($(SUPPORT_MOD_XMP),true)
LOCAL_CFLAGS += -DMUSIC_MOD_XMP -DLIBXMP_HEADER=\"../external/libxmp/include/xmp.h\"
LOCAL_STATIC_LIBRARIES += xmp
Expand Down

0 comments on commit 66a206c

Please sign in to comment.