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 | db0bc34 | 2010-06-28 17:19:47 +0000 | [diff] [blame] | 10 | export 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 |
Nick Kledzik | c7e4d82 | 2010-09-10 20:42:36 +0000 | [diff] [blame] | 15 | ditto $(SRCDIRS)/lib $(SRCROOT)/lib |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 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 |
Howard Hinnant | db0bc34 | 2010-06-28 17:19:47 +0000 | [diff] [blame] | 24 | rsync -r --exclude=".*" $(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/* |
Howard Hinnant | db0bc34 | 2010-06-28 17:19:47 +0000 | [diff] [blame] | 28 | chmod 755 $(DSTROOT)/usr/include/c++/v1/ext |
| 29 | chmod 644 $(DSTROOT)/usr/include/c++/v1/ext/* |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 30 | |
| 31 | install:: installhdrs $(DESTDIR) |
| 32 | |
| 33 | cd lib && ./buildit |
| 34 | ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib |
| 35 | cd lib && dsymutil -o $(SYMROOT)/libc++.1.dylib.dSYM $(SYMROOT)/usr/lib/libc++.1.dylib |
| 36 | mkdir -p $(DSTROOT)/usr/lib |
Nick Kledzik | 56b373c | 2010-05-14 20:22:09 +0000 | [diff] [blame] | 37 | 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] | 38 | cd $(DSTROOT)/usr/lib && ln -s libc++.1.dylib libc++.dylib |