blob: b5c2e4c0ced6bad2eb82d4cbd5bd897b0cb6e656 [file] [log] [blame]
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00001##
2# libcpp Makefile
3##
4
5SRCDIRS = .
6DESTDIR = $(DSTROOT)
7
8OBJROOT=.
9SYMROOT=.
Howard Hinnantadff4892010-05-24 17:49:41 +000010TRIPLE=-apple-
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000011
12installsrc:: $(SRCROOT)
13
14 ditto $(SRCDIRS)/include $(SRCROOT)/include
15 ditto $(SRCDIRS)/lib/buildit $(SRCROOT)/lib/buildit
16 ditto $(SRCDIRS)/src $(SRCROOT)/src
17 ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
18
19clean::
20
21installhdrs::
22
Nick Kledzik56b373c2010-05-14 20:22:09 +000023 mkdir -p $(DSTROOT)/usr/include/c++/v1/ext
24 cp -r $(SRCDIRS)/include/* $(DSTROOT)/usr/include/c++/v1/
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000025 chown -R root:wheel $(DSTROOT)/usr/include
26 chmod 755 $(DSTROOT)/usr/include/c++/v1
27 chmod 644 $(DSTROOT)/usr/include/c++/v1/*
28
29install:: installhdrs $(DESTDIR)
30
31 cd lib && ./buildit
32 ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
33 cd lib && dsymutil -o $(SYMROOT)/libc++.1.dylib.dSYM $(SYMROOT)/usr/lib/libc++.1.dylib
34 mkdir -p $(DSTROOT)/usr/lib
Nick Kledzik56b373c2010-05-14 20:22:09 +000035 strip -S -o $(DSTROOT)/usr/lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000036 cd $(DSTROOT)/usr/lib && ln -s libc++.1.dylib libc++.dylib
37
38