llvm-project/libcxx/lib/buildit

43 lines
709 B
Plaintext
Raw Normal View History

2010-05-12 03:42:16 +08:00
if [ `basename $(pwd)` != "lib" ]
then
echo "current directory must be lib"
exit 1
fi
if [ -z $CC ]
then
CC=g++
fi
if [ -z $RC_BUILDIT ]
then
RC_CFLAGS="-arch i386 -arch ppc -arch x86_64"
fi
if [ -z $RC_BUILDIT ]
then
rm libc++.1.dylib
fi
set -x
for FILE in $(ls ../src/*.cpp); do
$CC -c -g -Os $RC_CFLAGS -nostdinc++ -I../include $FILE
done
$CC -dynamiclib -nodefaultlibs $RC_CFLAGS -current_version 1 \
-compatibility_version 1 \
-o libc++.1.dylib *.o \
-install_name /usr/lib/libc++.dylib \
-Wl,-reexport_library,/usr/lib/libc++abi.dylib \
/usr/lib/libSystem.B.dylib
#libtool -static -o libc++.a *.o
set +x
if [ -z $RC_BUILDIT ]
then
rm *.o
fi