llvm-project/libcxx/Makefile

39 lines
1.0 KiB
Makefile
Raw Normal View History

2010-05-12 03:42:16 +08:00
##
# libcpp Makefile
##
SRCDIRS = .
DESTDIR = $(DSTROOT)
OBJROOT=.
SYMROOT=.
2010-06-29 01:19:47 +08:00
export TRIPLE=-apple-
2010-05-12 03:42:16 +08:00
installsrc:: $(SRCROOT)
ditto $(SRCDIRS)/include $(SRCROOT)/include
ditto $(SRCDIRS)/lib $(SRCROOT)/lib
2010-05-12 03:42:16 +08:00
ditto $(SRCDIRS)/src $(SRCROOT)/src
ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
clean::
installhdrs::
mkdir -p $(DSTROOT)/usr/include/c++/v1/ext
2010-06-29 01:19:47 +08:00
rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/usr/include/c++/v1/
2010-05-12 03:42:16 +08:00
chown -R root:wheel $(DSTROOT)/usr/include
chmod 755 $(DSTROOT)/usr/include/c++/v1
chmod 644 $(DSTROOT)/usr/include/c++/v1/*
2010-06-29 01:19:47 +08:00
chmod 755 $(DSTROOT)/usr/include/c++/v1/ext
chmod 644 $(DSTROOT)/usr/include/c++/v1/ext/*
2010-05-12 03:42:16 +08:00
install:: installhdrs $(DESTDIR)
cd lib && ./buildit
ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
cd lib && dsymutil -o $(SYMROOT)/libc++.1.dylib.dSYM $(SYMROOT)/usr/lib/libc++.1.dylib
mkdir -p $(DSTROOT)/usr/lib
strip -S -o $(DSTROOT)/usr/lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
2010-05-12 03:42:16 +08:00
cd $(DSTROOT)/usr/lib && ln -s libc++.1.dylib libc++.dylib