2010-05-11 21:42:16 +02:00
|
|
|
##
|
2013-04-23 21:26:55 +02:00
|
|
|
# libc++ Makefile
|
2010-05-11 21:42:16 +02:00
|
|
|
##
|
|
|
|
|
|
|
|
SRCDIRS = .
|
|
|
|
DESTDIR = $(DSTROOT)
|
|
|
|
|
|
|
|
OBJROOT=.
|
|
|
|
SYMROOT=.
|
2010-06-28 19:19:47 +02:00
|
|
|
export TRIPLE=-apple-
|
2010-05-11 21:42:16 +02:00
|
|
|
|
2011-05-24 22:27:31 +02:00
|
|
|
ifeq (,$(RC_INDIGO))
|
|
|
|
INSTALL_PREFIX=""
|
|
|
|
else
|
|
|
|
INSTALL_PREFIX="$(SDKROOT)"
|
|
|
|
endif
|
2011-11-27 06:39:58 +01:00
|
|
|
INSTALL_DIR=$(DSTROOT)/$(INSTALL_PREFIX)
|
|
|
|
|
2012-08-13 18:32:15 +02:00
|
|
|
.PHONY: help installsrc clean installheaders install
|
2011-05-24 22:27:31 +02:00
|
|
|
|
2011-07-04 16:12:27 +02:00
|
|
|
help::
|
2012-06-26 01:51:05 +02:00
|
|
|
@echo "Use make install DSTROOT=<destination>"
|
2011-07-04 16:12:27 +02:00
|
|
|
|
2010-05-11 21:42:16 +02:00
|
|
|
installsrc:: $(SRCROOT)
|
|
|
|
|
|
|
|
ditto $(SRCDIRS)/include $(SRCROOT)/include
|
2010-09-10 22:42:36 +02:00
|
|
|
ditto $(SRCDIRS)/lib $(SRCROOT)/lib
|
2010-05-11 21:42:16 +02:00
|
|
|
ditto $(SRCDIRS)/src $(SRCROOT)/src
|
|
|
|
ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
|
|
|
|
|
|
|
|
clean::
|
|
|
|
|
2012-09-21 22:49:54 +02:00
|
|
|
# The installheaders target is used by clang's runtime/libcxx makefile.
|
2012-08-13 18:32:15 +02:00
|
|
|
installheaders::
|
2012-09-21 22:49:54 +02:00
|
|
|
mkdir -p $(HEADER_DIR)/c++/v1/ext
|
2014-02-26 18:14:09 +01:00
|
|
|
(cd $(SRCDIRS)/include && \
|
2014-03-13 17:13:54 +01:00
|
|
|
tar cf - --exclude=".*" --exclude=support \
|
|
|
|
--exclude=CMakeLists.txt *) | \
|
2013-04-23 20:51:51 +02:00
|
|
|
(cd $(HEADER_DIR)/c++/v1 && tar xf -)
|
2012-09-21 22:49:54 +02:00
|
|
|
chmod 755 $(HEADER_DIR)/c++/v1
|
|
|
|
chmod 644 $(HEADER_DIR)/c++/v1/*
|
|
|
|
chmod 755 $(HEADER_DIR)/c++/v1/ext
|
|
|
|
chmod 644 $(HEADER_DIR)/c++/v1/ext/*
|
2013-11-18 08:01:16 +01:00
|
|
|
chmod 755 $(HEADER_DIR)/c++/v1/experimental
|
|
|
|
chmod 644 $(HEADER_DIR)/c++/v1/experimental/*
|
2012-01-18 18:44:31 +01:00
|
|
|
|
2012-01-17 17:09:32 +01:00
|
|
|
install::
|
2010-05-11 21:42:16 +02:00
|
|
|
|
|
|
|
cd lib && ./buildit
|
|
|
|
ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
|
2011-11-27 06:39:58 +01: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
|