From: lilo_booter Date: Wed, 14 Apr 2004 08:49:54 +0000 (+0000) Subject: Configure and build tuning X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a4799884f16e60db669cdf7ce6e15f160e3c7613;p=mlt Configure and build tuning git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@276 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/configure b/configure index f77470ac..a9574c39 100755 --- a/configure +++ b/configure @@ -9,12 +9,16 @@ Funky non-autotool config script for MLT. --help - this information --prefix=directory - install prefix for path (default: $prefix) + --disable-debug - Compile without debug support (default: on) + --disable-mmx - Compile without MMX support (default: on) + --cpu='cpu' - Compile for a specific CPU/architectre (default: none) EOF for i in src/modules/* do - [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo " --disable-`basename $i`" - done + [ -d $i ] && [ "`basename $i`" != "CVS" ] && basename $i + done | + awk '{ printf( " --disable-%-14.14s- Disable the %s module\n", $1, $1 ); }' echo } @@ -22,13 +26,33 @@ EOF function build_config { ( - echo version=$version - echo prefix=$prefix - echo bindir=$prefix/bin + echo "version=$version" + echo "prefix=$prefix" + echo "bindir=$prefix/bin" + + [ "$mmx" = "true" ] && + echo "MMX_FLAGS=-DUSE_MMX" + + [ "$debug" = "true" ] && + echo "DEBUG_FLAGS=-g" + + echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" + + [ "$cpu" != "" ] && + echo "TARGET_ARCH=-march=$cpu" && + echo "TARGET_CPU=-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" ) > config.mak echo "#!/bin/sh" > mlt-config - sed 's/^/export /' < config.mak >> mlt-config + ( + echo export version=$version + echo export prefix=$prefix + echo export bindir=$prefix/bin + ) >> mlt-config + cat < mlt-config-template >> mlt-config echo -n > packages.dat @@ -57,13 +81,19 @@ export build_dir=`dirname $0` export prefix=/usr/local export help=0 export version=0.1.0 +export debug=true +export mmx=true +export cpu= # Iterate through arguments for i in $* do case $i in - --help ) help=1 ;; - --prefix=* ) prefix="${i#--prefix=}" ;; + --help ) help=1 ;; + --prefix=* ) prefix="${i#--prefix=}" ;; + --disable-debug ) debug=false ;; + --disable-mmx ) mmx=false ;; + --cpu=* ) cpu="${i#--cpu=}" ;; esac done diff --git a/docs/install.txt b/docs/install.txt index 0f6d14e5..3e7ac088 100644 --- a/docs/install.txt +++ b/docs/install.txt @@ -111,6 +111,9 @@ Configuration ./configure --help - report all configure options ./configure --prefix=[dir] - target install directory (default: /usr/local) + ./configure --disable-debug - turn off debugging + ./configure --disable-mmx - turn off MMX usage + ./configure --cpu='cpu' - tune build for a specific cpu ./configure --disable-[mod] - do not compile specified module(s) ./configure --[other] - pass through to children diff --git a/src/albino/Makefile b/src/albino/Makefile index 4ad38e48..bb9bd08e 100644 --- a/src/albino/Makefile +++ b/src/albino/Makefile @@ -4,9 +4,9 @@ TARGET = albino OBJS = albino.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic +CFLAGS += -I.. -rdynamic -LDFLAGS = -L ../valerie -L ../miracle -L ../framework -lmiracle -lmlt -lvalerie +LDFLAGS = -L ../miracle -lmiracle SRCS := $(OBJS:.o=.c) diff --git a/src/framework/Makefile b/src/framework/Makefile index 00cc6050..00bfefc9 100644 --- a/src/framework/Makefile +++ b/src/framework/Makefile @@ -21,15 +21,10 @@ OBJS = mlt_frame.o \ SRCS := $(OBJS:.o=.c) -CFLAGS = -g -O4 -pipe -ffast-math -fomit-frame-pointer -Wall -D_FILE_OFFSET_BITS=64 -pthread -DPREFIX="\"$(prefix)\"" +CFLAGS += -pthread -DPREFIX="\"$(prefix)\"" LDFLAGS = -lm -ldl -lpthread -ifeq ($(MLT_GPROF),true) -CFLAGS+=-p -LDFLAGS+=-p -endif - all: $(TARGET) $(TARGET): $(OBJS) diff --git a/src/humperdink/Makefile b/src/humperdink/Makefile index f974b0db..9314c703 100644 --- a/src/humperdink/Makefile +++ b/src/humperdink/Makefile @@ -6,15 +6,10 @@ OBJS = client.o \ io.o \ remote.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic +CFLAGS += -I.. -rdynamic LDFLAGS = -L ../valerie -lvalerie -ifeq ($(MLT_GPROF),true) -CFLAGS+=-p -LDFLAGS+=-p -endif - SRCS := $(OBJS:.o=.c) all: $(TARGET) diff --git a/src/inigo/Makefile b/src/inigo/Makefile index 46f21f8b..eeecf7b9 100644 --- a/src/inigo/Makefile +++ b/src/inigo/Makefile @@ -5,15 +5,10 @@ TARGET = inigo OBJS = inigo.o \ io.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic +CFLAGS += -I.. -rdynamic LDFLAGS = -L ../framework -lmlt -ifeq ($(MLT_GPROF),true) -CFLAGS+=-p -LDFLAGS+=-p -endif - SRCS := $(OBJS:.o=.c) all: $(TARGET) diff --git a/src/miracle/Makefile b/src/miracle/Makefile index 8cba00af..9d6d7dad 100644 --- a/src/miracle/Makefile +++ b/src/miracle/Makefile @@ -14,15 +14,10 @@ LIB_OBJS = miracle_log.o \ OBJS = $(APP_OBJS) $(LIB_OBJS) -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic +CFLAGS += -I.. -rdynamic LDFLAGS = -L ../valerie -lvalerie -L ../framework -lmlt -ifeq ($(MLT_GPROF),true) -CFLAGS+=-p -LDFLAGS+=-p -endif - SRCS := $(OBJS:.o=.c) all: $(TARGET) diff --git a/src/modules/avformat/Makefile b/src/modules/avformat/Makefile index 390cef48..5ca36627 100644 --- a/src/modules/avformat/Makefile +++ b/src/modules/avformat/Makefile @@ -6,7 +6,7 @@ OBJS = factory.o \ producer_avformat.o \ consumer_avformat.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 +CFLAGS += -I../.. LDFLAGS = -lavformat -lavcodec diff --git a/src/modules/core/Makefile b/src/modules/core/Makefile index a906252b..5ea5606a 100644 --- a/src/modules/core/Makefile +++ b/src/modules/core/Makefile @@ -24,7 +24,7 @@ OBJS = factory.o \ ASM_OBJS = composite_line_yuv_mmx.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -DUSE_MMX -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 -pthread +CFLAGS += -I../.. SRCS := $(OBJS:.o=.c) diff --git a/src/modules/dv/Makefile b/src/modules/dv/Makefile index 576d4f47..48d65f2d 100644 --- a/src/modules/dv/Makefile +++ b/src/modules/dv/Makefile @@ -6,7 +6,7 @@ OBJS = factory.o \ producer_libdv.o \ consumer_libdv.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 -pthread +CFLAGS += -I../.. LDFLAGS=-ldv -lpthread diff --git a/src/modules/fezzik/Makefile b/src/modules/fezzik/Makefile index 137c9c2b..2b02e588 100644 --- a/src/modules/fezzik/Makefile +++ b/src/modules/fezzik/Makefile @@ -6,7 +6,7 @@ OBJS = factory.o \ producer_fezzik.o \ producer_hold.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 -pthread +CFLAGS += -I../.. SRCS := $(OBJS:.o=.c) diff --git a/src/modules/ffmpeg/Makefile b/src/modules/ffmpeg/Makefile index 05855711..551653e1 100644 --- a/src/modules/ffmpeg/Makefile +++ b/src/modules/ffmpeg/Makefile @@ -7,7 +7,7 @@ OBJS = factory.o \ filter_ffmpeg_dub.o \ consumer_ffmpeg.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 -pthread +CFLAGS += -I../.. SRCS := $(OBJS:.o=.c) diff --git a/src/modules/gtk2/Makefile b/src/modules/gtk2/Makefile index a37c1842..caafc15e 100644 --- a/src/modules/gtk2/Makefile +++ b/src/modules/gtk2/Makefile @@ -11,7 +11,7 @@ OBJS = factory.o \ ASM_OBJS = have_mmx.o \ scale_line_22_yuv_mmx.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -DUSE_MMX `pkg-config gdk-pixbuf-2.0 --cflags` `pkg-config pangoft2 --cflags` -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 -pthread +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` diff --git a/src/modules/inigo/Makefile b/src/modules/inigo/Makefile index 8ea9c243..6e413279 100644 --- a/src/modules/inigo/Makefile +++ b/src/modules/inigo/Makefile @@ -5,7 +5,7 @@ TARGET = ../libmltinigo.so OBJS = factory.o \ producer_inigo.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 -pthread +CFLAGS += -I../.. SRCS := $(OBJS:.o=.c) diff --git a/src/modules/resample/Makefile b/src/modules/resample/Makefile index 78110506..ced5ba8c 100644 --- a/src/modules/resample/Makefile +++ b/src/modules/resample/Makefile @@ -5,7 +5,7 @@ TARGET = ../libmltresample.so OBJS = factory.o \ filter_resample.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g +CFLAGS += -I../.. LDFLAGS= -lsamplerate diff --git a/src/modules/sdl/Makefile b/src/modules/sdl/Makefile index 19ef216c..b7372cf1 100644 --- a/src/modules/sdl/Makefile +++ b/src/modules/sdl/Makefile @@ -5,7 +5,7 @@ TARGET = ../libmltsdl.so OBJS = factory.o \ consumer_sdl.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ `sdl-config --cflags` -Wall -g -D_FILE_OFFSET_BITS=64 -pthread +CFLAGS += -I../.. `sdl-config --cflags` LDFLAGS= `sdl-config --libs` diff --git a/src/modules/vorbis/Makefile b/src/modules/vorbis/Makefile index 3d190241..cf23e645 100644 --- a/src/modules/vorbis/Makefile +++ b/src/modules/vorbis/Makefile @@ -5,7 +5,7 @@ TARGET = ../libmltvorbis.so OBJS = factory.o \ producer_vorbis.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 +CFLAGS += -I../.. LDFLAGS = -lvorbisfile -lvorbis diff --git a/src/modules/westley/Makefile b/src/modules/westley/Makefile index 160181b6..39db4fc2 100644 --- a/src/modules/westley/Makefile +++ b/src/modules/westley/Makefile @@ -6,7 +6,7 @@ OBJS = factory.o \ consumer_westley.o \ producer_westley.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 -pthread `xml2-config --cflags` +CFLAGS += -I../../ `xml2-config --cflags` LDFLAGS = `xml2-config --libs` diff --git a/src/modules/xine/Makefile b/src/modules/xine/Makefile index 2f82a13f..67b441c8 100644 --- a/src/modules/xine/Makefile +++ b/src/modules/xine/Makefile @@ -7,7 +7,7 @@ OBJS = factory.o \ cpu_accel.o \ filter_deinterlace.o -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -DARCH_X86 +CFLAGS += -I../../ -DARCH_X86 SRCS := $(OBJS:.o=.c) diff --git a/src/tests/Makefile b/src/tests/Makefile index 0dd5bb8e..c85ebe04 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -2,15 +2,10 @@ include ../../config.mak TARGET = dan charlie pango pixbuf dissolve luma -CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I .. -Wall -rdynamic -pthread +CFLAGS += -I.. -rdynamic LDFLAGS = -L ../framework -L ../modules -lmlt -lmltdv -lmltsdl -ifeq ($(MLT_GPROF),true) -CFLAGS+=-p -LDFLAGS+=-p -endif - all: $(TARGET) hello: hello.o diff --git a/src/valerie/Makefile b/src/valerie/Makefile index 12b835fb..7121bb1c 100644 --- a/src/valerie/Makefile +++ b/src/valerie/Makefile @@ -14,15 +14,8 @@ OBJS = valerie.o \ SRCS := $(OBJS:.o=.c) -CFLAGS=-O4 -pipe -ffast-math -fomit-frame-pointer -Wall -g -D_FILE_OFFSET_BITS=64 -pthread - LDFLAGS=-ldv -lpthread -ifeq ($(MLT_GPROF),true) -CFLAGS+=-p -LDFLAGS+=-p -endif - all: $(TARGET) $(TARGET): $(OBJS)