From ae867071f780e9c61a5013f6f7452850b4151e07 Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Mon, 5 Dec 2005 20:11:21 +0000 Subject: [PATCH] + Fix for Darwin and soname logic git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@878 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/framework/Makefile | 12 +++++++++++- src/miracle/Makefile | 12 ++++++++++-- src/modules/avformat/configure | 4 ++-- src/valerie/Makefile | 11 +++++++++-- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/framework/Makefile b/src/framework/Makefile index 9c24a58..2a9ac35 100644 --- a/src/framework/Makefile +++ b/src/framework/Makefile @@ -3,6 +3,16 @@ include ../../config.mak NAME = libmlt$(LIBSUF) TARGET = $(NAME).$(version) +ifneq ($(targetos), Darwin) +NAME = libmlt$(LIBSUF) +TARGET = $(NAME).$(version) +SHFLAGS += -Wl,-soname,$(TARGET) +else +NAME = libmlt$(LIBSUF) +TARGET = libmlt.$(version)$(LIBSUF) +SHFLAGS += -install_name $(libdir)/$(TARGET) +endif + OBJS = mlt_frame.o \ mlt_geometry.o \ mlt_deque.o \ @@ -51,7 +61,7 @@ SRCS := $(OBJS:.o=.c) CFLAGS += $(RDYNAMIC) -DPREFIX="\"$(prefix)\"" -LDFLAGS += -Wl,-soname,libmlt.so.$(version) -lm $(LIBDL) -lpthread +LDFLAGS += -lm $(LIBDL) -lpthread all: $(TARGET) diff --git a/src/miracle/Makefile b/src/miracle/Makefile index 691142d..70ae711 100644 --- a/src/miracle/Makefile +++ b/src/miracle/Makefile @@ -1,8 +1,16 @@ include ../../config.mak TARGET = miracle + +ifneq ($(targetos), Darwin) +LIBNAME = libmiracle$(LIBSUF) +LIBTARGET = $(NAME).$(version) +SHFLAGS += -Wl,-soname,$(LIBTARGET) +else LIBNAME = libmiracle$(LIBSUF) -LIBTARGET = $(LIBNAME).$(version) +LIBTARGET = libmiracle.$(version)$(LIBSUF) +SHFLAGS += -install_name $(libdir)/$(LIBTARGET) +endif APP_OBJS = miracle.o @@ -32,7 +40,7 @@ $(TARGET): $(APP_OBJS) $(LIBTARGET) $(CC) -o $@ $(APP_OBJS) -L. -lmiracle $(LDFLAGS) $(LIBTARGET): $(LIB_OBJS) - $(CC) -Wl,-soname,$(LIBTARGET) $(SHFLAGS) -o $@ $(LIB_OBJS) $(LDFLAGS) + $(CC) $(SHFLAGS) -o $@ $(LIB_OBJS) $(LDFLAGS) ln -sf $(LIBTARGET) $(LIBNAME) depend: $(SRCS) diff --git a/src/modules/avformat/configure b/src/modules/avformat/configure index f617579..d74c811 100755 --- a/src/modules/avformat/configure +++ b/src/modules/avformat/configure @@ -45,7 +45,7 @@ else export cvs_ffmpeg= export avformat_suffix= - if [ "$shared_ffmpeg" != "" ] + if [ "$shared_ffmpeg" != "" -a -f "$shared_ffmpeg" ] then # Chop ffmpeg shared_ffmpeg=`dirname $shared_ffmpeg` @@ -92,7 +92,7 @@ else echo 0 fi else - if [ -d "$shared_ffmpeg/include/ffmpeg" -a -f "$shared_ffmpeg/$LIBDIR/libavformat$LIBSUF" ] + if [ -d "$shared_ffmpeg/include/ffmpeg" -a -f "$shared_ffmpeg/$LIBDIR/libavformat$avformat_suffix$LIBSUF" ] then echo "CFLAGS+=-I$shared_ffmpeg/include/ffmpeg " >> config.mak echo "LDFLAGS+=-L$shared_ffmpeg/$LIBDIR" >> config.mak diff --git a/src/valerie/Makefile b/src/valerie/Makefile index d741743..3019183 100644 --- a/src/valerie/Makefile +++ b/src/valerie/Makefile @@ -1,7 +1,14 @@ include ../../config.mak +ifneq ($(targetos), Darwin) NAME = libvalerie$(LIBSUF) -TARGET = libvalerie$(LIBSUF).$(version) +TARGET = $(NAME).$(version) +SHFLAGS += -Wl,-soname,$(TARGET) +else +NAME = libvalerie$(LIBSUF) +TARGET = libvalerie.$(version)$(LIBSUF) +SHFLAGS += -install_name $(libdir)/$(TARGET) +endif OBJS = valerie.o \ valerie_notifier.o \ @@ -26,7 +33,7 @@ INCS = valerie.h \ SRCS := $(OBJS:.o=.c) CFLAGS += -I.. $(RDYNAMIC) -LDFLAGS += -Wl,-soname,$(TARGET) -L../framework -lmlt -lpthread +LDFLAGS += -L../framework -lmlt -lpthread all: $(TARGET) -- 1.7.4.4