scott mc to me
authorSam Lantinga <slouken@libsdl.org>
Tue, 18 Jan 2011 11:07:36 -0800
changeset 4944f4caf04bcd1
parent 493 ff616dc8d6c3
child 495 b4d178cd982d
scott mc to me

Attached is a patch from GCI student Egor Suvorov (yeputons) to add
native midi playback on Haiku.
CHANGES
Makefile.in
configure.in
     1.1 --- a/CHANGES	Thu Jan 13 19:04:57 2011 -0800
     1.2 +++ b/CHANGES	Tue Jan 18 11:07:36 2011 -0800
     1.3 @@ -1,4 +1,6 @@
     1.4  1.2.12:
     1.5 +Scott MC - Tue Jan 18 11:06:47 PST 2011
     1.6 + * Added support for native MIDI on Haiku OS
     1.7  Jon Atkins - Sat Nov 14 13:00:18 PST 2009
     1.8   * Added support for libmodplug (disabled by default)
     1.9  
     2.1 --- a/Makefile.in	Thu Jan 13 19:04:57 2011 -0800
     2.2 +++ b/Makefile.in	Tue Jan 18 11:07:36 2011 -0800
     2.3 @@ -20,6 +20,7 @@
     2.4  EXE	= @EXE@
     2.5  SHELL	= @SHELL@
     2.6  CC      = @CC@
     2.7 +CXX     = g++
     2.8  CFLAGS  = @BUILD_CFLAGS@
     2.9  EXTRA_CFLAGS = @EXTRA_CFLAGS@
    2.10  LDFLAGS = @BUILD_LDFLAGS@
     3.1 --- a/configure.in	Thu Jan 13 19:04:57 2011 -0800
     3.2 +++ b/configure.in	Tue Jan 18 11:07:36 2011 -0800
     3.3 @@ -358,10 +358,18 @@
     3.4                  use_music_native_midi=yes
     3.5                  EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,CoreServices"
     3.6                  ;;
     3.7 +            *-*-haiku*)
     3.8 +                use_music_native_midi=yes_cpp
     3.9 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmidi" 
    3.10 +                ;;
    3.11          esac
    3.12          if test x$use_music_native_midi = xyes; then
    3.13              EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_NATIVE_MIDI -I\$(srcdir)/native_midi"
    3.14              SOURCES="$SOURCES $srcdir/native_midi/*.c"
    3.15 +        elif test x$use_music_native_midi = xyes_cpp; then
    3.16 +            EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_NATIVE_MIDI -I\$(srcdir)/native_midi"
    3.17 +            SOURCES="$SOURCES $srcdir/native_midi/*.c"
    3.18 +            SOURCES_CXX="$SOURCES_CXX $srcdir/native_midi/*.cpp"
    3.19          fi
    3.20      fi
    3.21      AC_ARG_ENABLE([music-native-midi-gpl],
    3.22 @@ -596,6 +604,15 @@
    3.23  $(objects)/\2.lo: \1/\2.c\\
    3.24  	\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c \$< -o \$@,g'`
    3.25  
    3.26 +OBJECTS_CXX=`echo $SOURCES_CXX`
    3.27 +DEPENDS_CXX=`echo $SOURCES_CXX`
    3.28 +OBJECTS_CXX=`echo "$OBJECTS_CXX" | sed 's,[[^ ]]*/\([[^ ]]*\)\.cpp,$(objects)/\1.lo,g'`
    3.29 +DEPENDS_CXX=`echo "$DEPENDS_CXX" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.cpp,\\
    3.30 +$(objects)/\2.lo: \1/\2.cpp\\
    3.31 +	\$(LIBTOOL) --mode=compile \$(CXX) \$(CFLAGS) \$(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c \$< -o \$@,g'`
    3.32 +OBJECTS="$OBJECTS $OBJECTS_CXX"
    3.33 +DEPENDS="$DEPENDS $DEPENDS_CXX"
    3.34 +
    3.35  VERSION_OBJECTS=`echo $VERSION_SOURCES`
    3.36  VERSION_DEPENDS=`echo $VERSION_SOURCES`
    3.37  VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`