From 5a343c41110ee16e60b810ed8cab17b8f2054ffd Mon Sep 17 00:00:00 2001 From: waltje Date: Tue, 8 Aug 2017 22:51:47 -0400 Subject: [PATCH] Made FluidSynth stuff optional (FLUIDSYNTH=n Makefile preamble option.) --- src/Makefile.mingw | 19 +++++++++++-------- src/SOUND/midi.c | 6 +++++- src/SOUND/midi_fluidsynth.c | 5 +++++ src/WIN/86Box.rc | 20 ++++++++++---------- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/Makefile.mingw b/src/Makefile.mingw index f51f57530..8f3007457 100644 --- a/src/Makefile.mingw +++ b/src/Makefile.mingw @@ -8,7 +8,7 @@ # # Modified Makefile for Win32 (MinGW32) environment. # -# Version: @(#)Makefile.mingw 1.0.33 2017/08/08 +# Version: @(#)Makefile.mingw 1.0.34 2017/08/09 # # Authors: Miran Grca, # Fred N. van Kempen, @@ -55,6 +55,9 @@ endif ifndef DEV_BRANCH DEV_BRANCH = n endif +ifndef FLUIDSYNTH +FLUIDSYNTH = y +endif ifndef X64 X64 = n endif @@ -124,7 +127,10 @@ ifeq ($(VRAMDUMP), y) CFLAGS += -DENABLE_VRAM_DUMP RFLAGS += -DENABLE_VRAM_DUMP endif - +ifeq ($(FLUIDSYNTH), y) +CFLAGS += -DUSE_FLUIDSYNTH +FSYNTHOBJ = midi_fluidsynth.o +endif ifeq ($(X64), y) PLATCG = codegen_x86-64.o CGOPS = codegen_ops_x86-64.h @@ -177,8 +183,8 @@ SYSOBJ = model.o \ olivetti_m24.o ps1.o ps2.o ps2_mca.o \ tandy_eeprom.o tandy_rom.o DEVOBJ = bugger.o lpt.o $(SERIAL) \ - fdc37c665.o fdc37c669.o fdc37c932fr.o \ - pc87306.o sis85c471.o w83877f.o \ + fdc37c665.o fdc37c669.o fdc37c932fr.o \ + pc87306.o sis85c471.o w83877f.o \ keyboard.o \ keyboard_xt.o keyboard_at.o keyboard_pcjr.o \ keyboard_amstrad.o keyboard_olim24.o \ @@ -213,8 +219,7 @@ SNDOBJ = sound.o \ wave6581_P_T.o wave6581_PS_.o wave6581_PST.o \ wave8580__ST.o wave8580_P_T.o wave8580_PS_.o \ wave8580_PST.o wave.o \ - midi.o \ - midi_fluidsynth.o \ + midi.o $(FSYNTHOBJ) \ midi_mt32.o \ Analog.o BReverbModel.o File.o FileStream.o LA32Ramp.o \ LA32FloatWaveGenerator.o LA32WaveGenerator.o \ @@ -325,8 +330,6 @@ pcap_if.res: pcap_if.rc # Module dependencies. - -# / acer386sx.o: ibm.h cpu/cpu.h io.h device.h model.h ali1429.o: ibm.h cpu/cpu.h io.h mem.h device.h model.h diff --git a/src/SOUND/midi.c b/src/SOUND/midi.c index 9a80e30f2..7fb844f7f 100644 --- a/src/SOUND/midi.c +++ b/src/SOUND/midi.c @@ -8,7 +8,9 @@ #include "../WIN/plat_midi.h" #include "../WIN/plat_ticks.h" -#include "midi_fluidsynth.h" +#ifdef USE_FLUIDSYNTH +# include "midi_fluidsynth.h" +#endif #include "midi_mt32.h" #include "midi_system.h" @@ -25,7 +27,9 @@ typedef struct static MIDI_DEVICE devices[] = { {"None", "none", NULL}, +#ifdef USE_FLUIDSYNTH {"FluidSynth", "fluidsynth", &fluidsynth_device}, +#endif {"Roland MT-32 Emulation", "mt32", &mt32_device}, {"Roland CM-32L Emulation", "cm32l", &cm32l_device}, {SYSTEM_MIDI_NAME, SYSTEM_MIDI_INTERNAL_NAME, &system_midi_device}, diff --git a/src/SOUND/midi_fluidsynth.c b/src/SOUND/midi_fluidsynth.c index 84142b55a..307bc0f91 100644 --- a/src/SOUND/midi_fluidsynth.c +++ b/src/SOUND/midi_fluidsynth.c @@ -1,4 +1,6 @@ /* some code borrowed from scummvm */ +#ifdef USE_FLUIDSYNTH + #include #include @@ -502,3 +504,6 @@ device_t fluidsynth_device = NULL, fluidsynth_config }; + + +#endif /*USE_FLUIDSYNTH*/ diff --git a/src/WIN/86Box.rc b/src/WIN/86Box.rc index bce3ee533..dedc5be47 100644 --- a/src/WIN/86Box.rc +++ b/src/WIN/86Box.rc @@ -8,7 +8,7 @@ * * Windows resource script. * - * Version: @(#)86Box.rc 1.0.4 2017/06/17 + * Version: @(#)86Box.rc 1.0.5 2017/08/08 * * Authors: Miran Grca, * Fred N. van Kempen, @@ -844,16 +844,16 @@ BEGIN IDS_2171 "Unable to initialize FluidSynth, make sure you have the following libraries\nin your 86Box folder:\n\nlibfluidsynth.dll\nlibglib-2.0-0.dll\nlibiconv-2.dll\nlibintl-8.dll\nlibpcre-1.dll" IDS_3072 "None" - IDS_3073 "[Bus] Logitech Bus mouse" - IDS_3074 "[Bus] InPort mouse" - IDS_3075 "[Serial] Mouse Systems mouse" - IDS_3076 "[Serial] Microsoft 2-button mouse" - IDS_3077 "[Serial] Logitech 3-button mouse" - IDS_3078 "[Serial] Microsoft wheel mouse" - IDS_3079 "[PS/2] 2-button mouse" + IDS_3073 "[Bus] Logitech Bus Mouse" + IDS_3074 "[Bus] Microsoft Bus Mouse (InPort)" + IDS_3075 "[Serial] Mouse Systems Mouse" + IDS_3076 "[Serial] Microsoft 2-button Mouse" + IDS_3077 "[Serial] Logitech 3-button Mouse" + IDS_3078 "[Serial] Microsoft Wheel Mouse" + IDS_3079 "[PS/2] 2-button Mouse" IDS_3080 "[PS/2] Microsoft Intellimouse" - IDS_3081 "[Proprietary] Amstrad mouse" - IDS_3082 "[Proprietary] Olivetti M24 mouse" + IDS_3081 "[Proprietary] Amstrad Mouse" + IDS_3082 "[Proprietary] Olivetti M24 Mouse" IDS_4096 "Hard disk (%s)" IDS_4097 "%01i:%01i"