]> git.sesse.net Git - mlt/commitdiff
Configure and build tuning
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 14 Apr 2004 08:49:54 +0000 (08:49 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 14 Apr 2004 08:49:54 +0000 (08:49 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@276 d19143bc-622f-0410-bfdd-b5b2a6649095

21 files changed:
configure
docs/install.txt
src/albino/Makefile
src/framework/Makefile
src/humperdink/Makefile
src/inigo/Makefile
src/miracle/Makefile
src/modules/avformat/Makefile
src/modules/core/Makefile
src/modules/dv/Makefile
src/modules/fezzik/Makefile
src/modules/ffmpeg/Makefile
src/modules/gtk2/Makefile
src/modules/inigo/Makefile
src/modules/resample/Makefile
src/modules/sdl/Makefile
src/modules/vorbis/Makefile
src/modules/westley/Makefile
src/modules/xine/Makefile
src/tests/Makefile
src/valerie/Makefile

index f77470ac6527b7077ae88b9e266d3c6f03c0466c..a9574c39f23be30d899fff8de9411fe4f31ad1fd 100755 (executable)
--- 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
 
index 0f6d14e59de3f10dd28e8657e21078a26e3d003a..3e7ac088f23d8453cbe0bb04129bdbf8faea3cea 100644 (file)
@@ -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
 
index 4ad38e487c54c988ee2ebe1852955b14393fed26..bb9bd08ea6b76ce1f00b7e3a21d09661532f03c2 100644 (file)
@@ -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)
 
index 00cc60509ed8caf3ba243030662d458ca9cbfb68..00bfefc9cded2ef804643a00b4c9305fc5a3908f 100644 (file)
@@ -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)
index f974b0dbe6bab1eb6ed8bd1c48566daf93303e48..9314c703c9fd172c92579384114ab6e0f2014450 100644 (file)
@@ -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)
index 46f21f8b6a1fe4b785c986940c013c1515bc8b38..eeecf7b9c838c7cff7aade9c8bdf8e6a991e8f2e 100644 (file)
@@ -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)
index 8cba00af71cc568bffc42a9c037833ccc4280a18..9d6d7dad66d1aaf2931ab3fdff76238db4c4b4a5 100644 (file)
@@ -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)
index 390cef48441d6bbd8686d0013e5eba5790074622..5ca36627a01aa72e714b0fb0a4d30dba59f467c8 100644 (file)
@@ -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
 
index a906252b7bdaf3e02bae8fd8a0285a7d7f9beff3..5ea5606ac763428dad76dfd96cf71170aefe96fa 100644 (file)
@@ -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)
 
index 576d4f4735bd2978c7ab0c5a6affd61b4315dcbc..48d65f2dcb2d2c0e2343e2b0a2f7971baecbb957 100644 (file)
@@ -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
 
index 137c9c2b9076293d3528dde4eb3bc1aac1e0c35f..2b02e5885c7aee8085747184e410138f8d8d104d 100644 (file)
@@ -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)
 
index 0585571111759a28c210ac960d6f8d2702f80fb6..551653e176b859045b864887f91c673b979959b0 100644 (file)
@@ -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)
 
index a37c1842f667c9e4055367f898b097399172dd94..caafc15e7c22520159af1596195c731caab2648b 100644 (file)
@@ -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`
 
index 8ea9c243f22ab432e7cff76a737a60ea0e1012f4..6e413279fc2fc4bd3c1fb1b40c69f56bbd5b77b9 100644 (file)
@@ -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)
 
index 7811050600728bb169bb0aea4a21caa6a1636b19..ced5ba8ce689dd80f34b5872b7f0e23151e0d59a 100644 (file)
@@ -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
 
index 19ef216c1e2a5dda144491b09b5b218e2ff8fb76..b7372cf1cd6bc386f9e29e355df2ecc7ace0463c 100644 (file)
@@ -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`
 
index 3d19024101f88eea8fdbe96ab97f195b609a0816..cf23e6451200cda78d4a739f44b5ae94ebf3363f 100644 (file)
@@ -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
 
index 160181b647eb2d9914b913940558d1e7131ede60..39db4fc20ffe23f6c8fdd82bbec5ee9ad27324c9 100644 (file)
@@ -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`
 
index 2f82a13fc672fecd7f69cdc42a93f56e5ec4d8ae..67b441c8020e0379a12a1f959e955c8f709101fc 100644 (file)
@@ -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)
 
index 0dd5bb8e7a60dadb4f068a85074801512ee529f2..c85ebe041e9533f1b8e21b5e741658f420521254 100644 (file)
@@ -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
index 12b835fbd7a230c7dca36a75c6f82fb33530c3cf..7121bb1c5a2e04435aa1abadf2daf059c7806d76 100644 (file)
@@ -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)