skystrife, this is my working script for build GPAC from CVS (static lib, static mp4box) for specified platform:
Code:
#!/bin/sh
g_cvs=~/gpac
g_bld=~/gpac.bld
# Update GPAC from CVS
cd ${g_cvs}
export CVSROOT=:pserver:anonymous@gpac.cvs.sourceforge.net:/cvsroot/gpac
#cvs login
#....for initial grab source
#cvs checkout gpac
#....for update
cvs update
# Make building environment
mkdir -p ${g_bld}
rm -rf ${g_bld}/*
cp -rf ${g_cvs}/* ${g_bld}/
cd ${g_bld}/gpac
#o_arch=generic ; cf_ar="-mtune=generic"
#o_arch=i686 ; cf_ar="-march=i686 -mtune=i686"
o_arch=nocona ; cf_ar="-march=nocona -mtune=nocona"
#o_arch=k8 ; cf_ar="-march=k8 -mtune=k8"
#o_arch=k8-sse3 ; cf_ar="-march=k8-sse3 -mtune=k8-sse3"
#o_arch=amdfam10 ; cf_ar="-march=amdfam10 -mtune=amdfam10"
#o_arch=core2 ; cf_ar="-march=core2 -mtune=core2"
o_cmn="-O4 -finline-functions -mno-cygwin -mwin32 -m32 -fno-strict-aliasing -Wno-pointer-sign"
cf="${o_cmn} ${cf_ar}"
mkdir -p "/arch/${o_arch}"
o1="--prefix=/arch/${o_arch}"
o2="--strip \
--disable-ipv6 \
--disable-wx \
--disable-oss-audio \
--disable-x11-shm \
--disable-x11-xv \
--disable-opengl \
--disable-ssl \
--use-js=no \
--use-ft=no \
--use-jpeg=no \
--use-png=no \
--use-faad=no \
--use-mad=no \
--use-xvid=no \
--use-ffmpeg=no \
--use-ogg=no \
--use-vorbis=no \
--use-theora=no \
--use-openjpeg=no \
--disable-shared \
--enable-static \
--extra-ldflags=-s"
./configure $o1 $o2
cp -f ./config.h include/gpac/internal/
cp config.mak config.mak2
sed -e "s/OPTFLAGS.*/& ${o_cmn} ${cf_ar}/; s/CPPFLAGS.*/& ${o_cmn} ${cf_ar}/" config.mak2 > config.mak
#... Make LIB (static)
make lib
make install-lib
#... Make mp4box.exe
cd applications/mp4box
mv -f Makefile Makefile.orig
sed -e "s/^LINKFLAGS+=/#.LINKFLAGS+=/; s/#LINKFLAGS+=/LINKFLAGS+=/" Makefile.orig > Makefile
make
cd ../../
mkdir -p /arch/${o_arch}/bin
cp -f bin/gcc/MP4Box.exe /arch/${o_arch}/bin/