for subdir in $$list; do \
if [ -x $$subdir/build -a ! -f .$$subdir -o $@ = clean ] ; \
then echo -n Building $$subdir... ; \
- cd $$subdir && output=`./build $@ 2>&1` ; \
+ cd $$subdir && output=`CXXFLAGS="$(CXXFLAGS)" ./build $@ 2>&1` ; \
if [ $$? -eq 0 ] ; \
then echo OK && touch ../.$$subdir ; \
else echo $$output && exit 1 ; \
swig -c++ -I../../mlt++ -I../.. -csharp -dllimport libmltsharp -outdir src_swig -namespace Mlt mlt.i || exit $?
# Compile the wrapper
- g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit $?
+ g++ -fPIC -D_GNU_SOURCE ${CXXFLAGS} -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit $?
# Create the module
- g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmltsharp.so || exit $?
+ g++ ${CXXFLAGS} -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmltsharp.so || exit $?
# Compile the library assembly
mcs -out:mlt-sharp.dll -target:library src_swig/*.cs
swig -c++ -I../../mlt++ -I../.. -java -outdir src_swig/org/mltframework -package org.mltframework mlt.i || exit $?
# Compile the wrapper
- g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx $JAVA_INCLUDE || exit $?
+ g++ -fPIC -D_GNU_SOURCE ${CXXFLAGS} -c -rdynamic -pthread -I../.. mlt_wrap.cxx $JAVA_INCLUDE || exit $?
# Create the module
- g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmlt_java.so || exit $?
+ g++ ${CXXFLAGS} -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmlt_java.so || exit $?
# Compile the test
javac `find src_swig -name '*.java'` || exit $?
swig -c++ -I../../mlt++ -I../.. -lua mlt.i || exit $?
# Compile the wrapper
- g++ -fPIC -DPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit $?
+ g++ -fPIC -DPIC -D_GNU_SOURCE ${CXXFLAGS} -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit $?
# Create the module
- g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit $?
+ g++ ${CXXFLAGS} -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit $?
else
echo Lua not installed.
exit 1
system( "swig -c++ -I../../mlt++ -I../.. -perl5 mlt.i" );
WriteMakefile(
'NAME' => 'mlt',
- 'CC' => '${CXX} -fPIC -I../..',
+ 'CC' => '${CXX} -fPIC ${CXXFLAGS} -I../..',
'OPTIMIZE' => '-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions',
'LIBS' => ['-L../../mlt++ -lmlt++'],
'OBJECT' => 'mlt_wrap.o',
exit 0
fi
-perl Makefile.PL || exit 1
+CXXFLAGS="$CXXFLAGS" perl Makefile.PL || exit 1
make
ln -sf ../mlt.i
swig -c++ -I../../mlt++ -I../.. -php5 -noproxy mlt.i
-g++ -fPIC -DPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. `php-config --includes` mlt_wrap.cpp
-g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit $?
+g++ -fPIC -DPIC -D_GNU_SOURCE ${CXXFLAGS} -c -rdynamic -pthread -I../.. `php-config --includes` mlt_wrap.cpp
+g++ ${CXXFLAGS} -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit $?
swig -c++ -I../../mlt++ -I../.. -python mlt.i || exit $?
# Compile the wrapper
- g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. -I$PYTHON_INCLUDE mlt_wrap.cxx || exit $?
+ g++ -fPIC -D_GNU_SOURCE ${CXXFLAGS} -c -I../.. -I$PYTHON_INCLUDE mlt_wrap.cxx || exit $?
# Create the module
- g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -L../../framework -lmlt $(python-config --ldflags) -o _mlt.so || exit $?
+ g++ ${CXXFLAGS} -shared mlt_wrap.o -L../../mlt++ -lmlt++ -L../../framework -lmlt $(python-config --ldflags) -o _mlt.so || exit $?
else
echo Python not installed.
exit 1
end
system( "ln -sf ../mlt.i" )
system( "swig -c++ -ruby -I../../mlt++ -I../.. mlt.i" )
-$CFLAGS += " -I../.."
+$CFLAGS += " -I../.. " + ENV['CXXFLAGS']
$LDFLAGS += " -L../../mlt++ -lmlt++"
create_makefile('mlt')
system( "make" )
swig -c++ -I../../mlt++ -I../.. -tcl mlt.i || exit 1
# Compile the wrapper
- g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit 1
+ g++ -fPIC -D_GNU_SOURCE ${CXXFLAGS} -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit 1
# Create the module
- g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit 1
+ g++ ${CXXFLAGS} -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit 1
else
echo "Unable to locate tclsh."
exit 1