From 00321a6899075da61f7ef8011b3fcf3507c4b960 Mon Sep 17 00:00:00 2001 From: Vincent-FK Date: Fri, 4 Jun 2021 14:58:45 +0200 Subject: [PATCH] sdl_mixer cross-compiling for FunKey (added libmikmod-config commands in Makefile) --- Makefile | 7 ++++++- include/constant.h | 3 +-- src/main.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index deb1119..b154110 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,15 @@ TARGET_FUNKEY ?= 1 ifeq ($(TARGET_FUNKEY),1) SDL_INCLUDES = $(shell /opt/FunKey-sdk-2.0.0/arm-funkey-linux-musleabihf/sysroot/usr/bin/sdl-config --cflags) - SDL_LIBS = $(shell /opt/FunKey-sdk-2.0.0/arm-funkey-linux-musleabihf/sysroot/usr/bin/sdl-config --libs) -Wl,--as-needed -Wl,--gc-sections -Wl,-O1,--sort-common -flto -s + SDL_INCLUDES += $(shell /opt/FunKey-sdk-2.0.0/arm-funkey-linux-musleabihf/sysroot/usr/bin/libmikmod-config --cflags) + SDL_LIBS = $(shell /opt/FunKey-sdk-2.0.0/arm-funkey-linux-musleabihf/sysroot/usr/bin/sdl-config --libs) + SDL_LIBS += $(shell /opt/FunKey-sdk-2.0.0/arm-funkey-linux-musleabihf/sysroot/usr/bin/libmikmod-config --libs) + SDL_LIBS += -Wl,--as-needed -Wl,--gc-sections -Wl,-O1,--sort-common -flto -s else SDL_INCLUDES = `sdl-config --cflags` + SDL_INCLUDES += `libmikmod-config --cflags` SDL_LIBS = `sdl-config --libs` + SDL_LIBS += `libmikmod-config --libs` endif DEPFLAGS = $(SDL_INCLUDES) diff --git a/include/constant.h b/include/constant.h index cd0f26d..6cbd212 100644 --- a/include/constant.h +++ b/include/constant.h @@ -2,10 +2,9 @@ #define CONSTANT_H_ - // Use Sound ? //#define SOUND_FMOD_ACTIVATED -//#define SOUND_SDL_ACTIVATED +#define SOUND_SDL_ACTIVATED // Resize ? #define HW_SCREEN_RESIZE diff --git a/src/main.c b/src/main.c index 5600d57..8baa814 100644 --- a/src/main.c +++ b/src/main.c @@ -18,7 +18,7 @@ #endif //SOUND_FMOD_ACTIVATED #ifdef SOUND_SDL_ACTIVATED - #include "SDL_mixer.h" + #include #endif //SOUND_SDL_ACTIVATED bool audio_init_ok = false;