blob: f8ea8bca99b0be3b250b5dc52b69a3757aba3d7d [file] [log] [blame]
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00001##
2# libcpp Makefile
3##
4
5SRCDIRS = .
6DESTDIR = $(DSTROOT)
7
8OBJROOT=.
9SYMROOT=.
Howard Hinnantdb0bc342010-06-28 17:19:47 +000010export TRIPLE=-apple-
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000011
Nick Kledzik8feadca2011-05-24 20:27:31 +000012ifeq (,$(RC_INDIGO))
13 INSTALL_PREFIX=""
14else
15 INSTALL_PREFIX="$(SDKROOT)"
16endif
Bob Wilson0dd0b4d2011-11-27 05:39:58 +000017INSTALL_DIR=$(DSTROOT)/$(INSTALL_PREFIX)
18
Howard Hinnant364e9452012-08-13 16:32:15 +000019.PHONY: help installsrc clean installheaders install
Nick Kledzik8feadca2011-05-24 20:27:31 +000020
Howard Hinnant3c8894b2011-07-04 14:12:27 +000021help::
Nuno Lopes67c80822012-06-25 23:51:05 +000022 @echo "Use make install DSTROOT=<destination>"
Howard Hinnant3c8894b2011-07-04 14:12:27 +000023
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000024installsrc:: $(SRCROOT)
25
26 ditto $(SRCDIRS)/include $(SRCROOT)/include
Nick Kledzikc7e4d822010-09-10 20:42:36 +000027 ditto $(SRCDIRS)/lib $(SRCROOT)/lib
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000028 ditto $(SRCDIRS)/src $(SRCROOT)/src
29 ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
30
31clean::
32
Howard Hinnant364e9452012-08-13 16:32:15 +000033installheaders::
Howard Hinnant6e4971f2012-01-18 17:44:31 +000034
Howard Hinnantfcf7bd12012-01-17 16:09:32 +000035install::
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000036
37 cd lib && ./buildit
38 ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
Bob Wilson0dd0b4d2011-11-27 05:39:58 +000039 cd lib && dsymutil -o $(SYMROOT)/libc++.1.dylib.dSYM \
40 $(SYMROOT)/usr/lib/libc++.1.dylib
41 mkdir -p $(INSTALL_DIR)/usr/lib
42 strip -S -o $(INSTALL_DIR)/usr/lib/libc++.1.dylib \
43 $(SYMROOT)/usr/lib/libc++.1.dylib
44 cd $(INSTALL_DIR)/usr/lib && ln -s libc++.1.dylib libc++.dylib