]> git.sesse.net Git - mlt/commitdiff
+ Whoops - had forgotten these OS/X patches...
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 3 Oct 2005 08:48:45 +0000 (08:48 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 3 Oct 2005 08:48:45 +0000 (08:48 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@841 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt++/configure
mlt++/src/Makefile
mlt++/src/MltProperties.cpp
mlt++/src/MltProperties.h
mlt++/test/Makefile

index 557b3da8881c60070fd1d25279156715a960fe69..8c02c9890e775f4f21c8af6c2ca69c400ec56bc0 100755 (executable)
@@ -14,5 +14,21 @@ prefix=`mlt-config --prefix`
 [ ! -d "$prefix" ] && echo "Invalid prefix $prefix - aborting" && exit 1
 
 echo "prefix=$prefix" > config.mak
+
+targetos=$(uname -s)
+
+case $targetos in 
+       Darwin)
+               echo LIBSUF=.dylib
+        echo "CXXFLAGS+=-D__DARWIN__ -Wall -fPIC `mlt-config --cflags`"
+        echo "LDFLAGS=-dynamiclib `mlt-config --libs` `mlt-config miracle --libs` `mlt-config valerie --libs` -single_module"
+               ;;
+       Linux)
+               echo LIBSUF=.so
+        echo "CXXFLAGS+=-pthread -Wall -fPIC `mlt-config --cflags`"
+        echo "LDFLAGS=-shared `mlt-config --libs` `mlt-config miracle --libs`"
+               ;;
+esac >> config.mak
+
 echo "MLT++ configured - will be installed in $prefix."
 
index 9c1cbb32b4113122b5ce0f6029ba419425678a64..fa07151f0063511bee9a094af1c82398aea7eddf 100644 (file)
@@ -1,9 +1,7 @@
 include ../config.mak
-CXXFLAGS = -Wall -fPIC -DPIC -pthread `mlt-config --cflags`
-LDFLAGS = `mlt-config --libs` `mlt-config miracle --libs`
 INSTALL = install
 
-TARGET = libmlt++.so
+TARGET = libmlt++$(LIBSUF)
 
 OBJS = MltConsumer.o \
           MltDeque.o \
@@ -36,7 +34,7 @@ CC=g++
 all:           $(TARGET)
 
 $(TARGET):     $(OBJS)
-       $(CC) -shared -o $@ $(OBJS) $(LDFLAGS)
+       $(CC) -o $@ $(OBJS) $(LDFLAGS)
 
 clean:
        $(RM) $(OBJS) $(TARGET)
index 467b318c3b8cd2ad1c833969798cc0c5246e7d0c..e6ebfa629604014f7922cdc9369300b53cea9bdc 100644 (file)
@@ -220,12 +220,24 @@ int Properties::save( const char *file )
        return error;
 }
 
+#ifdef __DARWIN__
+
+Event *Properties::listen( char *id, void *object, void (*listener)( ... ) )
+{
+       mlt_event event = mlt_events_listen( get_properties( ), object, id, ( mlt_listener )listener );
+       return new Event( event );
+}
+
+#else
+
 Event *Properties::listen( char *id, void *object, mlt_listener listener )
 {
        mlt_event event = mlt_events_listen( get_properties( ), object, id, listener );
        return new Event( event );
 }
 
+#endif
+
 Event *Properties::setup_wait_for( char *id )
 {
        return new Event( mlt_events_setup_wait_for( get_properties( ), id ) );
index 3f33733150145096fa7d06ad26ec08b09a93868b..ab66ecdb1ce8f9263dd60af3953a2c8b6ab624db 100644 (file)
@@ -73,7 +73,11 @@ namespace Mlt
                        void debug( const char *title = "Object", FILE *output = stderr );
                        void load( const char *file );
                        int save( const char *file );
-                       Event *listen( char *id, void *object, mlt_listener listener );
+                       #ifdef __DARWIN__
+                       Event *listen( char *id, void *object, void (*)(...) );
+                       #else
+                       Event *listen( char *id, void *object, mlt_listener );
+                       #endif
                        Event *setup_wait_for( char *id );
                        void wait_for( Event *, bool destroy = true );
        };
index 00252e3a6465d04e624c425cb524fc0ea28c2781..173b572c43f7cb4c55adc5bb236c8a260cdbe563 100644 (file)
@@ -1,5 +1,7 @@
-CXXFLAGS=-Wall -g `mlt-config --cflags` -I ../src
-LDFLAGS=-L../src -lmlt++
+include ../config.mak
+
+CXXFLAGS+=-Wall -g `mlt-config --cflags` -I ../src
+LDFLAGS+=-L../src -lmlt++ -lmiracle -lvalerie `mlt-config --libs`
 CC=c++
 
 all:           play server