Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | ## |
| 2 | # libcpp Makefile |
| 3 | ## |
| 4 | |
| 5 | SRCDIRS = . |
| 6 | DESTDIR = $(DSTROOT) |
| 7 | |
| 8 | OBJROOT=. |
| 9 | SYMROOT=. |
Howard Hinnant | adff489 | 2010-05-24 17:49:41 +0000 | [diff] [blame] | 10 | TRIPLE=-apple- |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 11 | |
| 12 | installsrc:: $(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 | |
| 19 | clean:: |
| 20 | |
| 21 | installhdrs:: |
| 22 | |
Nick Kledzik | 56b373c | 2010-05-14 20:22:09 +0000 | [diff] [blame] | 23 | mkdir -p $(DSTROOT)/usr/include/c++/v1/ext |
| 24 | cp -r $(SRCDIRS)/include/* $(DSTROOT)/usr/include/c++/v1/ |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 25 | chown -R root:wheel $(DSTROOT)/usr/include |
| 26 | chmod 755 $(DSTROOT)/usr/include/c++/v1 |
| 27 | chmod 644 $(DSTROOT)/usr/include/c++/v1/* |
| 28 | |
| 29 | install:: 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 Kledzik | 56b373c | 2010-05-14 20:22:09 +0000 | [diff] [blame] | 35 | strip -S -o $(DSTROOT)/usr/lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 36 | cd $(DSTROOT)/usr/lib && ln -s libc++.1.dylib libc++.dylib |
| 37 | |
| 38 | |