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)
|
|
|
|
|
2012-08-14 00:32:15 +08:00
|
|
|
.PHONY: help installsrc clean installheaders install
|
2011-05-25 04:27:31 +08:00
|
|
|
|
2011-07-04 22:12:27 +08:00
|
|
|
help::
|
2012-06-26 07:51:05 +08:00
|
|
|
@echo "Use make install DSTROOT=<destination>"
|
2011-07-04 22:12:27 +08:00
|
|
|
|
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-08-14 00:32:15 +08:00
|
|
|
installheaders::
|
2012-01-19 01:44:31 +08:00
|
|
|
|
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
|