#$1 = sourcedir of pjproject
#$2 = destinationdir (which is src/stun)
#assuming pjproject has built pjlib, pjlib-util, pjnath


#apply patch/fix to nat_detect.c
cp $2/modifiedsource/nat_detect.c $1/pjnath/src/pjnath/
cp $2/modifiedsource/stun_session.c $1/pjnath/src/pjnath/
cp $2/modifiedsource/ice_session.c $1/pjnath/src/pjnath/
cp $2/modifiedsource/config.h $1/pjnath/include/pjnath/
cp $2/modifiedsource/os_win32.h $1/pjlib/include/pj/compat/

cd $1/pjnath/build
make all

mkdir -p $2/pjlib
mkdir -p $2/pjlib-util
mkdir -p $2/pjnath

cp -R $1/pjlib/include $2/pjlib
cp -R $1/pjlib/lib $2/pjlib

cp -R $1/pjlib-util/include $2/pjlib-util
cp -R $1/pjlib-util/lib $2/pjlib-util

cp -R $1/pjnath/include $2/pjnath
cp -R $1/pjnath/lib $2/pjnath





