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