- done
- # Build the modules folder
- ##########################
-
- ##########################
- # Create a symbolic link in the root of the framework
- mkdir -p ${target_lib}
- mkdir -p ${target_modules}
-
- pushd `pwd` > /dev/null
+ fi
+}
+# @function vlc_install
+##########################
+
+##########################
+# @function vlc_install(src_lib_dir, src_lib_name, dest_dir, type, lib_install_prefix)
+# @description Installs the specified library into the destination folder, automatically changes the references to dependencies
+# @param src_lib source library to copy to the destination directory
+# @param dest_dir destination directory where the src_lib should be copied to
+vlc_install() {
+ local dest_dir=$3
+ local type=$4
+
+ if test "$use_archs" = "no"; then
+ vlc_install_object "$VLC_BUILD_DIR/$1/$2" "$dest_dir" "$type" $5
+ else
+ if test $type = "data"; then
+ vlc_install_object "$main_build_dir/$1/$2" "$dest_dir" "$type" $5
+ else
+ fatdest="$dest_dir/$2"
+ shouldUpdateFat="no"
+
+ objects=""
+
+ # Create a temporary destination dir to store each ARCH object file
+ tmp_dest_dir="$VLC_BUILD_DIR/tmp/$type"
+ rm -Rf "${tmp_dest_dir}/*"
+ mkdir -p "$tmp_dest_dir"
+
+ for arch in $ARCHS; do
+ local src="$VLC_BUILD_DIR/$arch/$1/$2"
+
+ # Only install if the new image is newer than the one we have installed.
+ if ((! test -e ${fatdest}) || test ${src} -nt ${fatdest} ); then
+ vlc_install_object "$src" "$tmp_dest_dir" "$type" "$5" "" ".$arch"
+ local dest="$tmp_dest_dir/$2.$arch"
+ if test -e ${dest}; then
+ if ! test "$dest_dir/$2" -nt "${dest}"; then
+ shouldUpdateFat="yes"
+ fi
+ objects="${dest} $objects"
+ else
+ echo "Warning: building $2 without $arch"
+ fi
+ fi
+ done;
+
+ if test "$shouldUpdateFat" = "yes"; then
+ echo "Creating fat $type $fatdest"
+ lipo $objects -output "$fatdest" -create
+ fi
+ fi
+ fi
+}
+# @function vlc_install
+##########################
+
+##########################
+# Create a symbolic link in the root of the framework
+mkdir -p ${target_lib}
+mkdir -p ${target_plugins}
+mkdir -p ${target_bin}
+
+if [ "$RELEASE_MAKEFILE" != "yes" ] ; then
+ pushd `pwd` > /dev/null