From: Dan Dennedy Date: Sat, 9 May 2009 21:00:49 +0000 (-0700) Subject: Fix over- and under-linking. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7fd4b678aec4cace40b23077c7e1275c16f45a1c;p=mlt Fix over- and under-linking. Signed-off-by: Dan Dennedy --- diff --git a/configure b/configure index f87bc359..894b5d80 100755 --- a/configure +++ b/configure @@ -64,6 +64,7 @@ build_config() echo "OPTIMISATIONS=-O2 -pipe -fomit-frame-pointer" echo "CFLAGS+=-Wall -fPIC -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(SSE_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE)" + echo "LDFLAGS+=-Wl,--as-needed" case $targetos in Darwin) diff --git a/src/examples/Makefile b/src/examples/Makefile index d7bf02fb..6b0e9f42 100644 --- a/src/examples/Makefile +++ b/src/examples/Makefile @@ -1,7 +1,5 @@ -include ../config.mak - -CXXFLAGS+=-Wall -g `pkg-config mlt-framework --cflags` -I ../src -LDFLAGS+=-L../src -lmlt++ `pkg-config mlt-framework --libs` +CXXFLAGS += -Wall -g `pkg-config mlt-framework --cflags` -I ../mlt++ +LDFLAGS += -L../mlt++ -lmlt++ `pkg-config mlt-framework --libs` CC=c++ all: play diff --git a/src/framework/Makefile b/src/framework/Makefile index 58b3899c..e84caa68 100644 --- a/src/framework/Makefile +++ b/src/framework/Makefile @@ -85,7 +85,7 @@ distclean: clean rm -f .depend clean: - rm -f $(OBJS) $(TARGET) $(NAME) + rm -f $(OBJS) $(TARGET) $(NAME) $(SONAME) install: install -d $(DESTDIR)$(libdir) diff --git a/src/framework/mlt_geometry.c b/src/framework/mlt_geometry.c index db9c877c..c500076c 100644 --- a/src/framework/mlt_geometry.c +++ b/src/framework/mlt_geometry.c @@ -26,7 +26,6 @@ #include #include #include -#include typedef struct geometry_item_s { diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index e5ad81af..7510b5e7 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -31,7 +31,6 @@ #include #include #include -#include /* Forward references. */ diff --git a/src/mlt++/Makefile b/src/mlt++/Makefile index 28f465d5..e746cc04 100644 --- a/src/mlt++/Makefile +++ b/src/mlt++/Makefile @@ -16,7 +16,7 @@ endif CXXFLAGS += -I.. $(RDYNAMIC) -DVERSION=\"$(version)\" -LDFLAGS += -L../framework -lmlt -lpthread +LDFLAGS += -L../framework -lmlt OBJS = MltConsumer.o \ MltDeque.o \ @@ -54,7 +54,7 @@ depend: $(SRCS) $(CXX) -MM $(CXXFLAGS) $^ 1>.depend clean: - $(RM) $(OBJS) $(TARGET) $(NAME) + $(RM) $(OBJS) $(TARGET) $(NAME) $(SONAME) distclean: clean diff --git a/src/mlt++/configure b/src/mlt++/configure index 57f305d5..a9dbf557 100755 --- a/src/mlt++/configure +++ b/src/mlt++/configure @@ -12,7 +12,7 @@ case $targetos in ;; Linux|FreeBSD) echo LIBSUF=.so - echo "CXXFLAGS+=-pthread -Wall $WARNINGS" + echo "CXXFLAGS+=-Wall $WARNINGS" echo "LIBFLAGS=-shared" ;; esac > config.mak diff --git a/src/modules/avformat/Makefile b/src/modules/avformat/Makefile index 7d889435..4a8ff3a0 100644 --- a/src/modules/avformat/Makefile +++ b/src/modules/avformat/Makefile @@ -2,7 +2,7 @@ include ../../../config.mak CFLAGS += -I../.. -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lpthread include config.mak diff --git a/src/modules/avformat/configure b/src/modules/avformat/configure index dc371a39..5b286222 100755 --- a/src/modules/avformat/configure +++ b/src/modules/avformat/configure @@ -128,7 +128,7 @@ else echo "SWSCALE=1" >> config.mak fi echo "LDFLAGS+=-Wl,-Bsymbolic" >> config.mak - extra_libs="$extra_libs -lz" + extra_libs="$extra_libs -lz -lbz2" else echo "avformat: Invalid path specified: $static_ffmpeg" touch ../disable-avformat diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index bc83b0b9..224001ae 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -31,7 +31,6 @@ #include #include #include -#include #include // avformat header files diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c index 2474f9a0..5f528d21 100644 --- a/src/modules/avformat/producer_avformat.c +++ b/src/modules/avformat/producer_avformat.c @@ -38,7 +38,6 @@ #include #include #include -#include #if LIBAVUTIL_VERSION_INT < (50<<16) #define PIX_FMT_YUYV422 PIX_FMT_YUV422 diff --git a/src/modules/core/Makefile b/src/modules/core/Makefile index 99b47772..4419568d 100644 --- a/src/modules/core/Makefile +++ b/src/modules/core/Makefile @@ -35,7 +35,7 @@ ASM_OBJS = CFLAGS += -I../.. -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lm -lpthread SRCS := $(OBJS:.o=.c) diff --git a/src/modules/dgraft/filter_telecide.c b/src/modules/dgraft/filter_telecide.c index 9bb11497..152683fb 100644 --- a/src/modules/dgraft/filter_telecide.c +++ b/src/modules/dgraft/filter_telecide.c @@ -23,7 +23,6 @@ #include #include -#include #include //#define DEBUG_PATTERN_GUIDANCE diff --git a/src/modules/dv/Makefile b/src/modules/dv/Makefile index 8c5ef1bb..79d1a8ee 100644 --- a/src/modules/dv/Makefile +++ b/src/modules/dv/Makefile @@ -9,7 +9,7 @@ OBJS = factory.o \ CFLAGS += -I../.. CFLAGS += `pkg-config --cflags libdv` -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lpthread LDFLAGS += `pkg-config --libs libdv` SRCS := $(OBJS:.o=.c) diff --git a/src/modules/effectv/Makefile b/src/modules/effectv/Makefile index a8f5f623..32bc97a9 100644 --- a/src/modules/effectv/Makefile +++ b/src/modules/effectv/Makefile @@ -9,7 +9,7 @@ OBJS = factory.o \ CFLAGS += -I../.. -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lm SRCS := $(OBJS:.o=.c) diff --git a/src/modules/frei0r/Makefile b/src/modules/frei0r/Makefile index 2c3762d2..873d8ae1 100644 --- a/src/modules/frei0r/Makefile +++ b/src/modules/frei0r/Makefile @@ -11,7 +11,7 @@ OBJS = factory.o \ CFLAGS += -I../.. LDFLAGS += -L../../framework -lmlt -LDFLAGS += -lm +LDFLAGS += -lm $(LIBDL) SRCS := $(OBJS:.o=.c) diff --git a/src/modules/gtk2/Makefile b/src/modules/gtk2/Makefile index de5fa2fb..744073c6 100644 --- a/src/modules/gtk2/Makefile +++ b/src/modules/gtk2/Makefile @@ -6,7 +6,7 @@ TARGET = ../libmltgtk2$(LIBSUF) OBJS = factory.o CFLAGS += -I../.. -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lpthread ifdef USE_GTK2 OBJS += consumer_gtk2.o diff --git a/src/modules/jackrack/Makefile b/src/modules/jackrack/Makefile index 50d7d880..896dcf76 100644 --- a/src/modules/jackrack/Makefile +++ b/src/modules/jackrack/Makefile @@ -15,13 +15,13 @@ OBJS = factory.o \ CFLAGS += -I../.. CFLAGS += `pkg-config --cflags jack` -CFLAGS += `xml2-config --cflags` -CFLAGS += `pkg-config glib-2.0 --cflags` +CFLAGS += `pkg-config --cflags libxml-2.0` +CFLAGS += `pkg-config --cflags glib-2.0` -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lpthread $(LIBDL) LDFLAGS += `pkg-config --libs jack` -LDFLAGS += `xml2-config --libs` -LDFLAGS += `pkg-config glib-2.0 --libs` +LDFLAGS += `pkg-config --libs libxml-2.0` +LDFLAGS += `pkg-config --libs glib-2.0` SRCS := $(OBJS:.o=.c) diff --git a/src/modules/jackrack/configure b/src/modules/jackrack/configure index d10b2942..789764d6 100755 --- a/src/modules/jackrack/configure +++ b/src/modules/jackrack/configure @@ -6,7 +6,7 @@ then pkg-config jack disable_jack=$? - which xml2-config > /dev/null 2>&1 + pkg-config libxml-2.0 > /dev/null 2>&1 disable_xml2=$? disable_ladspa=1 diff --git a/src/modules/kino/Makefile b/src/modules/kino/Makefile index 32cdeaa6..35fd21a0 100644 --- a/src/modules/kino/Makefile +++ b/src/modules/kino/Makefile @@ -9,7 +9,7 @@ CPPOBJS = kino_wrapper.o avi.o error.o filehandler.o riff.o CFLAGS += -I../../ CXXFLAGS += $(CFLAGS) -Wno-deprecated -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lpthread LDFLAGS += -lstdc++ ifdef HAVE_LIBQUICKTIME diff --git a/src/modules/normalize/Makefile b/src/modules/normalize/Makefile index 096e2e3d..0c9727cd 100644 --- a/src/modules/normalize/Makefile +++ b/src/modules/normalize/Makefile @@ -7,7 +7,7 @@ OBJS = factory.o \ CFLAGS += -I../.. -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lm SRCS := $(OBJS:.o=.c) diff --git a/src/modules/plus/Makefile b/src/modules/plus/Makefile index 4003b425..092b0747 100644 --- a/src/modules/plus/Makefile +++ b/src/modules/plus/Makefile @@ -11,7 +11,7 @@ OBJS = factory.o \ CFLAGS += -I../.. -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lm SRCS := $(OBJS:.o=.c) diff --git a/src/modules/qimage/Makefile b/src/modules/qimage/Makefile index 42bdc817..ad3e4fa5 100644 --- a/src/modules/qimage/Makefile +++ b/src/modules/qimage/Makefile @@ -9,7 +9,7 @@ CPPOBJS = qimage_wrapper.o CFLAGS += -I../.. CXXFLAGS += $(CFLAGS) $(QTCXXFLAGS) -Wno-deprecated -LDFLAGS = -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lpthread -lm LDFLAGS += $(QTLIBS) LDFLAGS += -lstdc++ diff --git a/src/modules/resample/filter_resample.c b/src/modules/resample/filter_resample.c index 68384652..9ff4d9e1 100644 --- a/src/modules/resample/filter_resample.c +++ b/src/modules/resample/filter_resample.c @@ -24,8 +24,6 @@ #include #include #include -#define __USE_ISOC99 1 -#include #define BUFFER_LEN 20480 #define RESAMPLE_TYPE SRC_SINC_FASTEST diff --git a/src/modules/sdl/Makefile b/src/modules/sdl/Makefile index e2b5b363..5c779d49 100644 --- a/src/modules/sdl/Makefile +++ b/src/modules/sdl/Makefile @@ -19,7 +19,7 @@ endif CFLAGS += -I../.. CFLAGS += `sdl-config --cflags` -LDFLAGS += -L../../framework -lmlt +LDFLAGS += -L../../framework -lmlt -lpthread -lm LDFLAGS += `sdl-config --libs` ifeq ($(WITH_SDL_IMAGE),1) diff --git a/src/modules/vmfx/filter_chroma.c b/src/modules/vmfx/filter_chroma.c index f13838ba..de54135c 100644 --- a/src/modules/vmfx/filter_chroma.c +++ b/src/modules/vmfx/filter_chroma.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/modules/xml/consumer_xml.c b/src/modules/xml/consumer_xml.c index 9e85e6ec..187d626c 100644 --- a/src/modules/xml/consumer_xml.c +++ b/src/modules/xml/consumer_xml.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include