From: <man...@us...> - 2014-05-14 09:43:49
|
Revision: 4051 http://sourceforge.net/p/modplug/code/4051 Author: manxorist Date: 2014-05-14 09:43:38 +0000 (Wed, 14 May 2014) Log Message: ----------- [New] build: Support libunmo3 for linopenmpt unix builds. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/common/BuildSettings.h Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-05-13 10:37:34 UTC (rev 4050) +++ trunk/OpenMPT/Makefile 2014-05-14 09:43:38 UTC (rev 4051) @@ -52,6 +52,7 @@ # (defaults are 0): # # NO_ZLIB=1 Avoid using zlib, even if found +# USE_MO3=1 Support dynamic loading of unmo3 shared library # # # Build flags for openmpt123 (provide on each `make` invocation) @@ -264,6 +265,12 @@ endif endif +ifeq ($(USE_MO3),1) +CPPFLAGS_MO3 := -DMPT_WITH_MO3 +LDLIBS_MO3 := -ldl +else +endif + ifeq ($(USE_SDL),1) #LDLIBS += -lsdl ifeq ($(shell pkg-config --exists sdl && echo yes),yes) @@ -313,9 +320,9 @@ endif endif -CPPFLAGS += $(CPPFLAGS_ZLIB) -LDFLAGS += $(LDFLAGS_ZLIB) -LDLIBS += $(LDLIBS_ZLIB) +CPPFLAGS += $(CPPFLAGS_ZLIB) $(CPPFLAGS_MO3) +LDFLAGS += $(LDFLAGS_ZLIB) $(LDFLAGS_MO3) +LDLIBS += $(LDLIBS_ZLIB) $(LDLIBS_MO3) CPPFLAGS_OPENMPT123 += $(CPPFLAGS_SDL) $(CPPFLAGS_PORTAUDIO) $(CPPFLAGS_FLAC) $(CPPFLAGS_WAVPACK) $(CPPFLAGS_SNDFILE) LDFLAGS_OPENMPT123 += $(LDFLAGS_SDL) $(LDFLAGS_PORTAUDIO) $(LDFLAGS_FLAC) $(LDFLAGS_WAVPACK) $(LDFLAGS_SNDFILE) Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2014-05-13 10:37:34 UTC (rev 4050) +++ trunk/OpenMPT/common/BuildSettings.h 2014-05-14 09:43:38 UTC (rev 4051) @@ -163,9 +163,11 @@ #define NO_ASIO #define NO_VST #define NO_PORTAUDIO -#if !defined(_WIN32) || (defined(_WIN32) && !defined(_M_IX86)) +#if !defined(MPT_WITH_MO3) && !(MPT_COMPILER_MSVC) +#ifndef NO_MO3 #define NO_MO3 #endif +#endif #define NO_DSOUND #define NO_FLAC #if !defined(MPT_WITH_ZLIB) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |