]> git.saurik.com Git - apple/cf.git/blame - Makefile
CF-1153.18.tar.gz
[apple/cf.git] / Makefile
CommitLineData
8ca704e1
A
1
2include MakefileVersion
3
d7384798
A
4MIN_MACOSX_VERSION=10.10
5MAX_MACOSX_VERSION=MAC_OS_X_VERSION_10_10
8ca704e1
A
6
7OBJECTS = $(patsubst %.c,%.o,$(wildcard *.c))
8OBJECTS += CFBasicHash.o
9HFILES = $(wildcard *.h)
10INTERMEDIATE_HFILES = $(addprefix $(OBJBASE)/CoreFoundation/,$(HFILES))
11
a48904a4 12PUBLIC_HEADERS=CFArray.h CFBag.h CFBase.h CFBinaryHeap.h CFBitVector.h CFBundle.h CFByteOrder.h CFCalendar.h CFCharacterSet.h CFData.h CFDate.h CFDateFormatter.h CFDictionary.h CFError.h CFLocale.h CFMessagePort.h CFNumber.h CFNumberFormatter.h CFPlugIn.h CFPlugInCOM.h CFPreferences.h CFPropertyList.h CFRunLoop.h CFSet.h CFSocket.h CFStream.h CFString.h CFStringEncodingExt.h CFTimeZone.h CFTree.h CFURL.h CFURLAccess.h CFUUID.h CFUserNotification.h CFXMLNode.h CFXMLParser.h CFAvailability.h CFUtilities.h CoreFoundation.h
8ca704e1 13
a48904a4 14PRIVATE_HEADERS=CFBundlePriv.h CFCharacterSetPriv.h CFError_Private.h CFLogUtilities.h CFPriv.h CFRuntime.h CFStorage.h CFStreamAbstract.h CFStreamPriv.h CFStreamInternal.h CFStringDefaultEncoding.h CFStringEncodingConverter.h CFStringEncodingConverterExt.h CFUniChar.h CFUnicodeDecomposition.h CFUnicodePrecomposition.h ForFoundationOnly.h CFBurstTrie.h CFICULogging.h
8ca704e1
A
15
16MACHINE_TYPE := $(shell uname -p)
17unicode_data_file_name = $(if $(or $(findstring i386,$(1)),$(findstring i686,$(1)),$(findstring x86_64,$(1))),CFUnicodeData-L.mapping,CFUnicodeData-B.mapping)
18
19OBJBASE_ROOT = CF-Objects
20OBJBASE = $(OBJBASE_ROOT)/$(STYLE)
21DSTBASE = $(if $(DSTROOT),$(DSTROOT)/System/Library/Frameworks,../CF-Root)
22
23STYLE=normal
24STYLE_CFLAGS=-O2
25STYLE_LFLAGS=
26ARCHFLAGS=-arch i386 -arch x86_64
27INSTALLNAME=/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation_$(STYLE)
28
856091c5 29CC = /usr/bin/clang
8ca704e1 30
d7384798 31CFLAGS=-c -x c -pipe -std=gnu99 -Wmost -Wno-trigraphs -Wno-deprecated -mmacosx-version-min=$(MIN_MACOSX_VERSION) -fconstant-cfstrings -fexceptions -DCF_BUILDING_CF=1 -DDEPLOYMENT_TARGET_MACOSX=1 -DMAC_OS_X_VERSION_MAX_ALLOWED=$(MAX_MACOSX_VERSION) -DU_SHOW_DRAFT_API=1 -DU_SHOW_CPLUSPLUS_API=0 -I$(OBJBASE) -DVERSION=$(VERSION) -include CoreFoundation_Prefix.h
8ca704e1
A
32
33LFLAGS=-dynamiclib -mmacosx-version-min=$(MIN_MACOSX_VERSION) -twolevel_namespace -fexceptions -init ___CFInitialize -compatibility_version 150 -current_version $(VERSION) -Wl,-alias_list,SymbolAliases -sectcreate __UNICODE __csbitmaps CFCharacterSetBitmaps.bitmap -sectcreate __UNICODE __properties CFUniCharPropertyDatabase.data -sectcreate __UNICODE __data $(call unicode_data_file_name,$(MACHINE_TYPE)) -segprot __UNICODE r r
34
35
36.PHONY: all install clean
37.PRECIOUS: $(OBJBASE)/CoreFoundation/%.h
38
39all: install
40
41clean:
42 -/bin/rm -rf $(OBJBASE_ROOT)
43
44$(OBJBASE)/CoreFoundation:
45 /bin/mkdir -p $(OBJBASE)/CoreFoundation
46
47$(OBJBASE)/CoreFoundation/%.h: %.h $(OBJBASE)/CoreFoundation
48 /bin/cp $< $@
49
50$(OBJBASE)/%.o: %.c $(INTERMEDIATE_HFILES)
51 $(CC) $(STYLE_CFLAGS) $(ARCHFLAGS) $(CFLAGS) $< -o $@
52
53$(OBJBASE)/%.o: %.m $(INTERMEDIATE_HFILES)
54 $(CC) $(STYLE_CFLAGS) $(ARCHFLAGS) $(CFLAGS) $< -o $@
55
56$(OBJBASE)/CoreFoundation_$(STYLE): $(addprefix $(OBJBASE)/,$(OBJECTS))
57 $(CC) $(STYLE_LFLAGS) -install_name $(INSTALLNAME) $(ARCHFLAGS) $(LFLAGS) $^ -licucore.A -o $(OBJBASE)/CoreFoundation_$(STYLE)
58
59install: $(OBJBASE)/CoreFoundation_$(STYLE)
60 /bin/rm -rf $(DSTBASE)/CoreFoundation.framework
61 /bin/mkdir -p $(DSTBASE)/CoreFoundation.framework/Versions/A/Resources
62 /bin/mkdir -p $(DSTBASE)/CoreFoundation.framework/Versions/A/Headers
63 /bin/mkdir -p $(DSTBASE)/CoreFoundation.framework/Versions/A/PrivateHeaders
64 /bin/ln -sf A $(DSTBASE)/CoreFoundation.framework/Versions/Current
65 /bin/ln -sf Versions/Current/Resources $(DSTBASE)/CoreFoundation.framework/Resources
66 /bin/ln -sf Versions/Current/Headers $(DSTBASE)/CoreFoundation.framework/Headers
67 /bin/ln -sf Versions/Current/PrivateHeaders $(DSTBASE)/CoreFoundation.framework/PrivateHeaders
68 /bin/ln -sf Versions/Current/CoreFoundation $(DSTBASE)/CoreFoundation.framework/CoreFoundation
69 /bin/cp Info.plist $(DSTBASE)/CoreFoundation.framework/Versions/A/Resources
70 /bin/mkdir -p $(DSTBASE)/CoreFoundation.framework/Versions/A/Resources/en.lproj
71 /bin/cp $(PUBLIC_HEADERS) $(DSTBASE)/CoreFoundation.framework/Versions/A/Headers
72 /bin/cp $(PRIVATE_HEADERS) $(DSTBASE)/CoreFoundation.framework/Versions/A/PrivateHeaders
73 #/usr/bin/strip -S -o $(DSTBASE)/CoreFoundation.framework/Versions/A/CoreFoundation $(OBJBASE)/CoreFoundation_$(STYLE)
74 /bin/cp $(OBJBASE)/CoreFoundation_$(STYLE) $(DSTBASE)/CoreFoundation.framework/Versions/A/CoreFoundation
75 /usr/bin/dsymutil $(DSTBASE)/CoreFoundation.framework/Versions/A/CoreFoundation -o $(DSTBASE)/CoreFoundation.framework.dSYM
76 /usr/sbin/chown -RH -f root:wheel $(DSTBASE)/CoreFoundation.framework
77 /bin/chmod -RH a-w,a+rX $(DSTBASE)/CoreFoundation.framework
78 /bin/chmod -RH u+w $(DSTBASE)
79 install_name_tool -id /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation $(DSTBASE)/CoreFoundation.framework/Versions/A/CoreFoundation
80 @echo "Installing done. The framework is in $(DSTBASE)"
81