--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
}
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
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
./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
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)
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)
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)
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)
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)
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
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)
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
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)
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)
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`
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)
OBJS = factory.o \
filter_resample.o
-CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g
+CFLAGS += -I../..
LDFLAGS= -lsamplerate
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`
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
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`
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)
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
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)