]> git.saurik.com Git - apple/cf.git/blob - Makefile
CF-368.27.tar.gz
[apple/cf.git] / Makefile
1 #
2 # Define sets of files to build, other info specific to this project.
3 #
4
5 NAME = CoreFoundation
6
7 SUBPROJECTS = AppServices Base Collections Locale NumberDate Parsing PlugIn Preferences \
8 RunLoop Stream String StringEncodings URL
9
10 AppServices_PUBHEADERS = CFUserNotification.h
11 AppServices_SOURCES = CFUserNotification.c
12 Base_PROJHEADERS = CFInternal.h ForFoundationOnly.h auto_stubs.h CFRuntime.h CFUtilities.h
13 Base_PRIVHEADERS = CFPriv.h CFRuntime.h CFUtilities.h CFUtilitiesPriv.h
14 Base_PUBHEADERS = CFBase.h CFByteOrder.h CoreFoundation.h CFUUID.h
15 Base_SOURCES = CFBase.c CFUtilities.c CFSortFunctions.c CFSystemDirectories.c \
16 CFRuntime.c CFFileUtilities.c CFPlatform.c CFUUID.c uuid.c
17 Collections_PRIVHEADERS = CFStorage.h
18 Collections_PUBHEADERS = CFArray.h CFBag.h CFBinaryHeap.h CFBitVector.h \
19 CFData.h CFDictionary.h CFSet.h CFStorage.h CFTree.h
20 Collections_SOURCES = CFArray.c CFBag.c CFBinaryHeap.c CFBitVector.c \
21 CFData.c CFDictionary.c CFSet.c CFStorage.c CFTree.c
22 Locale_PUBHEADERS = CFLocale.h
23 NumberDate_PUBHEADERS = CFDate.h CFNumber.h CFTimeZone.h
24 NumberDate_SOURCES = CFDate.c CFNumber.c CFTimeZone.c
25 Parsing_PROJHEADERS = CFXMLInputStream.h
26 Parsing_PUBHEADERS = CFPropertyList.h CFXMLParser.h CFXMLNode.h
27 Parsing_SOURCES = CFBinaryPList.c CFPropertyList.c CFXMLParser.c \
28 CFXMLInputStream.c CFXMLNode.c CFXMLTree.c
29 PlugIn_PROJHEADERS = CFBundle_BinaryTypes.h CFBundle_Internal.h CFPlugIn_Factory.h
30 PlugIn_PRIVHEADERS = CFBundlePriv.h
31 PlugIn_PUBHEADERS = CFBundle.h CFPlugIn.h CFPlugInCOM.h
32 PlugIn_SOURCES = CFBundle.c CFBundle_Resources.c CFPlugIn.c CFPlugIn_Factory.c \
33 CFPlugIn_Instance.c CFPlugIn_PlugIn.c
34 Preferences_PUBHEADERS = CFPreferences.h
35 Preferences_SOURCES = CFApplicationPreferences.c CFPreferences.c CFXMLPreferencesDomain.c
36 RunLoop_PUBHEADERS = CFMachPort.h CFMessagePort.h CFRunLoop.h CFSocket.h
37 RunLoop_PRIVHEADERS = CFRunLoopPriv.h
38 RunLoop_SOURCES = CFMachPort.c CFMessagePort.c CFRunLoop.c CFSocket.c
39 ifeq "$(PLATFORM)" "CYGWIN"
40 RunLoop_PUBHEADERS += CFWindowsMessageQueue.h
41 RunLoop_SOURCES += CFWindowsMessageQueue.c
42 endif
43 Stream_PRIVHEADERS = CFStreamPriv.h CFStreamAbstract.h
44 Stream_PUBHEADERS = CFStream.h
45 Stream_SOURCES = CFStream.c CFConcreteStreams.c CFSocketStream.c
46 String_PRIVHEADERS = CFCharacterSetPriv.h CFStringDefaultEncoding.h
47 String_PUBHEADERS = CFCharacterSet.h CFString.h CFStringEncodingExt.h
48 String_SOURCES = CFCharacterSet.c CFString.c CFStringEncodings.c \
49 CFStringScanner.c CFStringUtilities.c
50 StringEncodings_PROJHEADERS = CFUniCharPriv.h CFStringEncodingConverterPriv.h
51 StringEncodings_PRIVHEADERS = CFUniChar.h CFStringEncodingConverter.h \
52 CFUnicodeDecomposition.h CFUnicodePrecomposition.h \
53 CFStringEncodingConverterExt.h
54 StringEncodings_SOURCES = CFStringEncodingConverter.c CFBuiltinConverters.c \
55 CFUnicodeDecomposition.c CFUnicodePrecomposition.c CFUniChar.c
56 URL_PUBHEADERS = CFURL.h CFURLAccess.h
57 URL_SOURCES = CFURL.c CFURLAccess.c
58
59 OTHER_SOURCES = version.c Makefile APPLE_LICENSE PropertyList.dtd
60
61 # These are the actual vars that are used by framework.make
62 PUBLIC_HFILES = $(foreach S, $(SUBPROJECTS), $(foreach F, $($(S)_PUBHEADERS), $(SRCROOT)/$(S).subproj/$(F)))
63 PRIVATE_HFILES = $(foreach S, $(SUBPROJECTS), $(foreach F, $($(S)_PRIVHEADERS), $(SRCROOT)/$(S).subproj/$(F)))
64 PROJECT_HFILES = $(foreach S, $(SUBPROJECTS), $(foreach F, $($(S)_PROJHEADERS), $(SRCROOT)/$(S).subproj/$(F)))
65 CFILES = $(foreach S, $(SUBPROJECTS), $(foreach F, $($(S)_SOURCES), $(SRCROOT)/$(S).subproj/$(F)))
66
67
68 -include nonOpenSource.make
69
70 include framework.make
71
72
73 #
74 # Misc additional options
75 #
76
77 CURRENT_PROJECT_VERSION = 368.27
78
79 # common items all build styles should be defining
80 CFLAGS += -DCF_BUILDING_CF=1
81 CPPFLAGS += -DCF_BUILDING_CF=1
82
83 # base addr is set to come before CFNetwork - use the rebase MS command to see the sizes
84 # more info at http://msdn.microsoft.com/library/en-us/tools/tools/rebase.asp
85 ifeq "$(PLATFORM)" "CYGWIN"
86 C_WARNING_FLAGS += -Wno-endif-labels
87 CPP_WARNING_FLAGS += -Wno-endif-labels
88 LIBS += -lole32 -lws2_32
89 LFLAGS += -Wl,--image-base=0x66000000
90 endif
91
92 ifeq "$(PLATFORM)" "Darwin"
93 CFLAGS += -F/System/Library/Frameworks/CoreServices.framework/Frameworks
94 CPPFLAGS += -F/System/Library/Frameworks/CoreServices.framework/Frameworks
95 LIBS += -licucore -lobjc
96 LFLAGS += -compatibility_version 150 -current_version $(CURRENT_PROJECT_VERSION) -Wl,-init,___CFInitialize
97 endif
98
99 ifeq "$(PLATFORM)" "FreeBSD"
100 LFLAGS += -shared
101 endif
102
103 ifeq "$(PLATFORM)" "Linux"
104 LIBS += -lpthread
105 endif
106
107 ifeq "$(LIBRARY_STYLE)" "Library"
108 CHARACTERSETS_INSTALLDIR = /usr/local/share/$(NAME)
109 else
110 CHARACTERSETS_INSTALLDIR = /System/Library/CoreServices
111 endif
112
113 #
114 # Additional steps we add to predefined targets
115 #
116
117 install_after::
118 $(SILENT) $(MKDIRS) $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)
119 -$(SILENT) $(CHMOD) 755 $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)
120 $(SILENT) $(MKDIRS) $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)/CharacterSets
121 -$(SILENT) $(CHMOD) -R +w $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)/CharacterSets
122 $(SILENT) $(REMOVE_RECUR) $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)/CharacterSets
123 $(SILENT) $(COPY_RECUR) $(SRCROOT)/CharacterSets $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)
124 $(SILENT) $(REMOVE_RECUR) $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)/CharacterSets/CVS
125 $(SILENT) $(CHOWN) -R root:wheel $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)/CharacterSets
126 $(SILENT) $(CHMOD) 444 $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)/CharacterSets/* #*/
127 $(SILENT) $(CHMOD) 755 $(DSTROOT)/$(CHARACTERSETS_INSTALLDIR)/CharacterSets
128
129 prebuild_after::
130 ifeq "$(LIBRARY_STYLE)" "Library"
131 $(SILENT) $(COPY_RECUR) CharacterSets $(RESOURCE_DIR)
132 $(SILENT) $(REMOVE_RECUR) $(RESOURCE_DIR)/CharacterSets/CVS
133 ifneq "$(PLATFORM)" "Darwin"
134 # All other platforms need the compatibility headers
135 $(SILENT) $(COPY) OSXCompatibilityHeaders/*.h $(PUBLIC_HEADER_DIR)/.. #*/
136 $(SILENT) $(MKDIRS) $(PUBLIC_HEADER_DIR)/../GNUCompatibility
137 $(SILENT) $(COPY) OSXCompatibilityHeaders/GNUCompatibility/*.h $(PUBLIC_HEADER_DIR)/../GNUCompatibility #*/
138 endif
139 endif
140
141 ifeq "$(LIBRARY_STYLE)" "Library"
142 clean_after::
143 $(REMOVE_RECUR) -f $(RESOURCE_DIR)/CharacterSets
144 endif
145
146 compile-after::
147 $(SILENT) $(CC) $(CFLAGS) $(SRCROOT)/version.c -DVERSION=$(CURRENT_PROJECT_VERSION) -DUSER=$(USER) -c -o $(OFILE_DIR)/version.o
148
149 test:
150 cd Tests; $(MAKE) test SYMROOT=$(SYMROOT) USE_OBJC=NO