Re: Building UB CLI's via XCODE: libtiff, libjpeg, libz, etc...
Re: Building UB CLI's via XCODE: libtiff, libjpeg, libz, etc...
- Subject: Re: Building UB CLI's via XCODE: libtiff, libjpeg, libz, etc...
- From: plumber Idraulico <email@hidden>
- Date: Wed, 7 Dec 2005 09:11:03 +0100
( build fat against darwin7/darwin8 )
create a extern target with xcode
--static fat build with glibtool
CONFIG_OPTIONS="--disable-dependency-tracking --disable-libtool-lock
--enable-static=yes --enable-shared=no --prefix=${PROJECT_PREFIX}"
./configure CC="${CC} $PROJECT_SDK/usr/lib/libSystem.dylib"
$CONFIG_OPTIONS
LD_X86=" -arch i686 -Wl,-syslibroot,$PROJECT_SDK \
$PROJECT_SDK/usr/lib/libSystem.dylib"
make -f ${MAKEFILE} CC="${CC} $PROJECT_SDK/usr/lib/libSystem.dylib
$PROJECT_SDK/usr/lib/libmx.dylib ${LD_X86}"
make -f ${MAKEFILE} clean
(configure it depends on project)
make -f ${MAKEFILE} CC="${CC} $PROJECT_SDK/usr/lib/libSystem.dylib
$PROJECT_SDK/usr/lib/libmx.dylib ${LD_PPC}"
lipolize_project()
{
( cd $PROJECT_ROOT/$INSTALL_TARGET \
&& /usr/bin/lipo -create \
-arch ppc $LIB_PROJECT_NAME"_ppc.a" \
-arch i386 $LIB_PROJECT_NAME"_x86.a" \
-output $LIB_PROJECT_NAME".a" \
&& rm -f $LIB_PROJECT_NAME"_ppc.a" \
&& rm -f $LIB_PROJECT_NAME"_x86.a" \
)
}
a quick way to build a dynamic fat with libtool
CONFIG_OPTIONS="--with-pic --disable-dependency-tracking --disable-
libtool-lock --enable-static=yes --enable-shared=no --prefix=$
{PROJECT_PREFIX}"
./configure CC="${CC} $PROJECT_SDK/usr/lib/libSystem.dylib" LDFLAGS="-
undefined suppress -flat_namespace" $CONFIG_OPTIONS 2>/dev/null
....
by arch
gcc \
-dynamiclib \
-undefined suppress \
-flat_namespace \
-single_module \
-all_load ./$LIB_PROJECT_NAME.a \
-install_name /usr/local/lib/$LIB_PROJECT_NAME.1.dylib \
-compatibility_version 1
-current_version 1.3
-o $LIB_PROJECT_NAME.1.0.dylib \
-lz
lipolize_project() with dylib
relocate lib to a framework style
./fworkize.sh --framework_root="@executable_path/../Frameworks" --
framework_name=expat --framework_version=A --library=build/
libexpat.distproj/usr/local/lib/libexpat.0.5.0.dylib --builddir=build
--binaries="`find build -type file | grep -e 'bin/'`" --
headers="`find build -type file | grep -e 'include/'`" --
manuals="`find . -type file | grep -e '\.[0-9]$'`"
it's a little script to transform from a fresh build
usage()
{
cat <<EOF
Usage: lib.sh [OPTION]...
Relocate a library to an Apple framework Style.
Options:
--framework_root framework root (@executable_path/../Frameworks)
--framework_name framework name mynameLib
--framework_version framework version
--library library /somewhere/libmyname.dylib
--builddir build
--binaries=list (optional)
--headers =list (optional)
--version display the script version
EOF
}
Best Regards
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden