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
|
|
|
|
2011-05-25 04:27:31 +08:00
|
|
|
ifeq (,$(RC_INDIGO))
|
|
|
|
INSTALL_PREFIX=""
|
|
|
|
else
|
|
|
|
INSTALL_PREFIX="$(SDKROOT)"
|
|
|
|
endif
|
2011-11-27 13:39:58 +08:00
|
|
|
INSTALL_DIR=$(DSTROOT)/$(INSTALL_PREFIX)
|
|
|
|
|
|
|
|
.PHONY: help installsrc clean installhdrs do-installhdrs install
|
2011-05-25 04:27:31 +08:00
|
|
|
|
2011-07-04 22:12:27 +08:00
|
|
|
help::
|
|
|
|
echo Use make install DSTROOT=<destination>
|
|
|
|
|
2010-05-12 03:42:16 +08:00
|
|
|
installsrc:: $(SRCROOT)
|
|
|
|
|
|
|
|
ditto $(SRCDIRS)/include $(SRCROOT)/include
|
2010-09-11 04:42:36 +08:00
|
|
|
ditto $(SRCDIRS)/lib $(SRCROOT)/lib
|
2010-05-12 03:42:16 +08:00
|
|
|
ditto $(SRCDIRS)/src $(SRCROOT)/src
|
|
|
|
ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
|
|
|
|
|
|
|
|
clean::
|
|
|
|
|
2012-01-18 00:09:32 +08:00
|
|
|
install::
|
2010-05-12 03:42:16 +08:00
|
|
|
|
|
|
|
cd lib && ./buildit
|
|
|
|
ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
|
2011-11-27 13:39:58 +08:00
|
|
|
cd lib && dsymutil -o $(SYMROOT)/libc++.1.dylib.dSYM \
|
|
|
|
$(SYMROOT)/usr/lib/libc++.1.dylib
|
|
|
|
mkdir -p $(INSTALL_DIR)/usr/lib
|
|
|
|
strip -S -o $(INSTALL_DIR)/usr/lib/libc++.1.dylib \
|
|
|
|
$(SYMROOT)/usr/lib/libc++.1.dylib
|
|
|
|
cd $(INSTALL_DIR)/usr/lib && ln -s libc++.1.dylib libc++.dylib
|