echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
[ "$cpu" != "" ] &&
- echo "TARGET_ARCH=-march=$cpu" &&
- echo "TARGET_CPU=-mcpu=$cpu"
+ echo "TARGETARCH=-march=$cpu" &&
+ echo "TARGETCPU=-mcpu=$cpu"
- echo "OPTIMISATIONS=-O4 \$(TARGET_ARCH) \$(TARGET_CPU) -pipe -ffast-math -fomit-frame-pointer"
- echo "CFLAGS=-Wall \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE) -pthread"
+ [ "`uname`" = "Linux" ] &&
+ echo "LIBDL=-ldl"
+
+ echo "OPTIMISATIONS=-O4 -pipe -ffast-math -fomit-frame-pointer"
+ echo "CFLAGS+=-Wall \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE) -pthread"
) > config.mak
echo "#!/bin/sh" > mlt-config
CFLAGS += -I.. -rdynamic
-LDFLAGS = -L ../miracle -lmiracle
+LDFLAGS += -L ../miracle -lmiracle
SRCS := $(OBJS:.o=.c)
CFLAGS += -pthread -DPREFIX="\"$(prefix)\""
-LDFLAGS = -lm -ldl -lpthread
+LDFLAGS += -lm $(LIBDL) -lpthread
all: $(TARGET)
#include "mlt_deque.h"
#include <stdlib.h>
-#include <malloc.h>
#include <string.h>
#include <pthread.h>
+// Not nice - memalign is defined here apparently?
+#ifdef linux
+#include <malloc.h>
+#endif
+
/** Singleton repositories
*/
else
{
// We need to generate a release item
+#ifdef linux
mlt_release release = memalign( 16, this->size );
+#else
+ mlt_release release = malloc( this->size );
+#endif
// Initialise it
if ( release != NULL )
CFLAGS += -I.. -rdynamic
-LDFLAGS = -L ../valerie -lvalerie
+LDFLAGS += -L ../valerie -lvalerie
SRCS := $(OBJS:.o=.c)
CFLAGS += -I.. -rdynamic
-LDFLAGS = -L ../framework -lmlt
+LDFLAGS += -L ../framework -lmlt
SRCS := $(OBJS:.o=.c)
CFLAGS += -I.. -rdynamic
-LDFLAGS = -L ../valerie -lvalerie -L ../framework -lmlt
+LDFLAGS += -L ../valerie -lvalerie -L ../framework -lmlt
SRCS := $(OBJS:.o=.c)
#include <stdlib.h>
#include <string.h>
#include <signal.h>
+
+/* Needed for backtrace on linux */
+#ifdef linux
#include <execinfo.h>
+#endif
/* Valerie header files */
#include <valerie/valerie_util.h>
static void sigsegv_handler()
{
+#ifdef linux
void *array[ 10 ];
size_t size;
char **strings;
free( strings );
miracle_log( LOG_CRIT, "\nDone dumping - exiting.\n" );
+#else
+ miracle_log( LOG_CRIT, "\a\nMiracle experienced a segmentation fault.\n" );
+#endif
exit( EXIT_FAILURE );
}
static void miracle_local_close( miracle_local local )
{
miracle_delete_all_units();
+#ifdef linux
pthread_kill_other_threads_np();
miracle_log( LOG_DEBUG, "Clean shutdown." );
free( local );
- //mlt_factory_close( );
+ mlt_factory_close( );
+#endif
}
all clean depend:
list='$(SUBDIRS)'; \
for subdir in $$list; do \
- if [ -f $$subdir/Makefile ] ; \
- then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@ || exit 1; \
+ if [ -f $$subdir/Makefile -a ! -f disable-$$subdir ] ; \
+ then $(MAKE) -C $$subdir $@ || exit 1; \
fi \
done
rm -f consumers.dat filters.dat producers.dat transitions.dat make.inc; \
list='$(SUBDIRS)'; \
for subdir in $$list; do \
- if [ -f $$subdir/Makefile ] ; \
- then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@ || exit 1; \
+ if [ -f $$subdir/Makefile -a ! -f disable-$$subdir ] ; \
+ then $(MAKE) -C $$subdir $@ || exit 1; \
fi \
done
install -m 644 producers.dat filters.dat transitions.dat consumers.dat "$(prefix)/share/mlt/modules"
list='$(SUBDIRS)'; \
for subdir in $$list; do \
- if [ -f $$subdir/Makefile ] ; \
- then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@ || exit 1; \
+ if [ -f $$subdir/Makefile -a ! -f disable-$$subdir ] ; \
+ then $(MAKE) -C $$subdir $@ || exit 1; \
fi \
done
CFLAGS += -I../..
-LDFLAGS = -lavformat -lavcodec
+LDFLAGS += -lavformat -lavcodec
SRCS := $(OBJS:.o=.c)
CFLAGS += -I../..
-LDFLAGS=-ldv -lpthread
+LDFLAGS += -ldv -lpthread
SRCS := $(OBJS:.o=.c)
CFLAGS += `pkg-config gdk-pixbuf-2.0 --cflags` `pkg-config pangoft2 --cflags` -I../..
-LDFLAGS = `pkg-config gdk-pixbuf-2.0 --libs` `pkg-config pangoft2 --libs`
+LDFLAGS += `pkg-config gdk-pixbuf-2.0 --libs` `pkg-config pangoft2 --libs`
SRCS := $(OBJS:.o=.c)
CFLAGS += -I../..
-LDFLAGS= -lsamplerate
+LDFLAGS += -lsamplerate
SRCS := $(OBJS:.o=.c)
CFLAGS += -I../.. `sdl-config --cflags`
-LDFLAGS= `sdl-config --libs`
+LDFLAGS += `sdl-config --libs`
SRCS := $(OBJS:.o=.c)
CFLAGS += -I../..
-LDFLAGS = -lvorbisfile -lvorbis
+LDFLAGS += -lvorbisfile -lvorbis
SRCS := $(OBJS:.o=.c)
CFLAGS += -I../../ `xml2-config --cflags`
-LDFLAGS = `xml2-config --libs`
+LDFLAGS += `xml2-config --libs`
SRCS := $(OBJS:.o=.c)
CFLAGS += -I.. -rdynamic
-LDFLAGS = -L ../framework -L ../modules -lmlt -lmltdv -lmltsdl
+LDFLAGS += -L ../framework -L ../modules -lmlt -lmltdv -lmltsdl
all: $(TARGET)
SRCS := $(OBJS:.o=.c)
-LDFLAGS=-ldv -lpthread
+LDFLAGS += -lpthread
all: $(TARGET)
#include <sys/socket.h>
#include <fcntl.h>
#include <errno.h>
+#include <netinet/in.h>
/* Application header files */
#include "valerie_socket.h"