forked from OSchip/llvm-project
43 lines
709 B
Plaintext
43 lines
709 B
Plaintext
|
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
|