Makefile 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ##
  2. # libcpp Makefile
  3. ##
  4. SRCDIRS = .
  5. DESTDIR = $(DSTROOT)
  6. OBJROOT=.
  7. SYMROOT=.
  8. export TRIPLE=-apple-
  9. ifeq (,$(RC_INDIGO))
  10. INSTALL_PREFIX=""
  11. else
  12. INSTALL_PREFIX="$(SDKROOT)"
  13. endif
  14. help::
  15. echo Use make install DSTROOT=<destination>
  16. installsrc:: $(SRCROOT)
  17. ditto $(SRCDIRS)/include $(SRCROOT)/include
  18. ditto $(SRCDIRS)/lib $(SRCROOT)/lib
  19. ditto $(SRCDIRS)/src $(SRCROOT)/src
  20. ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
  21. clean::
  22. installhdrs::
  23. mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/ext
  24. mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/ext
  25. mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/ext
  26. mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/ext
  27. mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/ext
  28. rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/
  29. rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/
  30. rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/
  31. rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/
  32. rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/
  33. chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++
  34. chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++
  35. chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++
  36. chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++
  37. chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++
  38. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1
  39. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1
  40. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1
  41. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1
  42. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1
  43. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/*
  44. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/*
  45. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/*
  46. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/*
  47. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/*
  48. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/ext
  49. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/ext
  50. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/ext
  51. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/ext
  52. chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/ext
  53. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/ext/*
  54. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/ext/*
  55. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/ext/*
  56. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/ext/*
  57. chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/ext/*
  58. install:: installhdrs $(DESTDIR)
  59. cd lib && ./buildit
  60. ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
  61. cd lib && dsymutil -o $(SYMROOT)/libc++.1.dylib.dSYM $(SYMROOT)/usr/lib/libc++.1.dylib
  62. mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib
  63. strip -S -o $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
  64. cd $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib && ln -s libc++.1.dylib libc++.dylib