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