]>
Commit | Line | Data |
---|---|---|
8ca704e1 A |
1 | |
2 | include MakefileVersion | |
3 | ||
a48904a4 A |
4 | MIN_MACOSX_VERSION=10.9 |
5 | MAX_MACOSX_VERSION=MAC_OS_X_VERSION_10_9 | |
8ca704e1 | 6 | |
856091c5 | 7 | OBJECTS = CFCharacterSet.o CFPreferences.o CFApplicationPreferences.o CFXMLPreferencesDomain.o CFStringEncodingConverter.o CFUniChar.o CFArray.o CFOldStylePList.o CFPropertyList.o CFStringEncodingDatabase.o CFUnicodeDecomposition.o CFBag.o CFData.o CFStringEncodings.o CFUnicodePrecomposition.o CFBase.o CFDate.o CFNumber.o CFRuntime.o CFStringScanner.o CFBinaryHeap.o CFDateFormatter.o CFNumberFormatter.o CFSet.o CFStringUtilities.o CFUtilities.o CFBinaryPList.o CFDictionary.o CFPlatform.o CFSystemDirectories.o CFVersion.o CFBitVector.o CFError.o CFPlatformConverters.o CFTimeZone.o CFBuiltinConverters.o CFFileUtilities.o CFSortFunctions.o CFTree.o CFICUConverters.o CFURL.o CFLocale.o CFURLAccess.o CFCalendar.o CFLocaleIdentifier.o CFString.o CFUUID.o CFStorage.o CFLocaleKeys.o |
8ca704e1 A |
8 | OBJECTS += CFBasicHash.o |
9 | HFILES = $(wildcard *.h) | |
10 | INTERMEDIATE_HFILES = $(addprefix $(OBJBASE)/CoreFoundation/,$(HFILES)) | |
11 | ||
a48904a4 | 12 | PUBLIC_HEADERS=CFArray.h CFBag.h CFBase.h CFBinaryHeap.h CFBitVector.h CFByteOrder.h CFCalendar.h CFCharacterSet.h CFData.h CFDate.h CFDateFormatter.h CFDictionary.h CFError.h CFLocale.h CFMachPort.h CFNumber.h CFNumberFormatter.h CFPreferences.h CFPropertyList.h CFSet.h CFString.h CFStringEncodingExt.h CFTimeZone.h CFTree.h CFURL.h CFURLAccess.h CFUUID.h CFAvailability.h CFUtilities.h CoreFoundation.h TargetConditionals.h |
8ca704e1 | 13 | |
a48904a4 | 14 | PRIVATE_HEADERS= CFCharacterSetPriv.h CFError_Private.h CFLogUtilities.h CFPriv.h CFRuntime.h CFStorage.h CFStringDefaultEncoding.h CFStringEncodingConverter.h CFStringEncodingConverterExt.h CFUniChar.h CFUnicodeDecomposition.h CFUnicodePrecomposition.h ForFoundationOnly.h CFICULogging.h |
8ca704e1 A |
15 | |
16 | RESOURCES = CFCharacterSetBitmaps.bitmap CFUnicodeData-L.mapping CFUnicodeData-B.mapping | |
17 | ||
18 | OBJBASE_ROOT = CF-Objects | |
19 | OBJBASE = $(OBJBASE_ROOT)/$(STYLE) | |
20 | DSTBASE = /usr/local | |
21 | ||
22 | STYLE=normal | |
23 | STYLE_CFLAGS=-O0 -g | |
24 | STYLE_LFLAGS= | |
25 | ||
26 | CC = /usr/bin/clang | |
27 | ||
28 | CFLAGS=-c -x c -fblocks -fpic -pipe -std=gnu99 -Wno-trigraphs -fexceptions -DCF_BUILDING_CF=1 -DDEPLOYMENT_TARGET_LINUX=1 -DMAC_OS_X_VERSION_MAX_ALLOWED=$(MAX_MACOSX_VERSION) -DU_SHOW_DRAFT_API=1 -DU_SHOW_CPLUSPLUS_API=0 -I$(OBJBASE) -I$(OBJBASE)/CoreFoundation -DVERSION=$(VERSION) -include CoreFoundation_Prefix.h | |
29 | ||
30 | LFLAGS=-shared -fpic -init=___CFInitialize -Wl,--no-undefined,-soname,libCoreFoundation.so | |
31 | ||
32 | # Libs for open source version of ICU | |
c2869fe4 | 33 | LIBS=-lc -lpthread -lm -lrt -licuuc -licudata -licui18n -lBlocksRuntime |
8ca704e1 A |
34 | |
35 | .PHONY: all install clean | |
36 | .PRECIOUS: $(OBJBASE)/CoreFoundation/%.h | |
37 | ||
38 | all: $(OBJBASE)/libCoreFoundation.so | |
39 | ||
40 | clean: | |
41 | -/bin/rm -rf $(OBJBASE_ROOT) | |
42 | ||
43 | $(OBJBASE)/CoreFoundation: | |
44 | /bin/mkdir -p $(OBJBASE)/CoreFoundation | |
45 | ||
46 | $(OBJBASE)/CoreFoundation/%.h: %.h $(OBJBASE)/CoreFoundation | |
47 | /bin/cp $< $@ | |
48 | ||
49 | $(OBJBASE)/%.o: %.c $(INTERMEDIATE_HFILES) | |
50 | $(CC) $(STYLE_CFLAGS) $(CFLAGS) $< -o $@ | |
51 | ||
52 | $(OBJBASE)/%.o: %.m $(INTERMEDIATE_HFILES) | |
53 | $(CC) $(STYLE_CFLAGS) $(CFLAGS) $< -o $@ | |
54 | ||
55 | $(OBJBASE)/libCoreFoundation.so: $(addprefix $(OBJBASE)/,$(OBJECTS)) | |
56 | $(CC) $(STYLE_LFLAGS) $(LFLAGS) $^ -L/usr/local/lib $(LIBS) -o $(OBJBASE)/libCoreFoundation.so | |
57 | @echo "Building done. 'sudo make install' to put the result into $(DSTBASE)/lib and $(DSTBASE)/include." | |
58 | ||
59 | install: $(OBJBASE)/libCoreFoundation.so | |
60 | /bin/mkdir -p $(DSTBASE) | |
61 | /bin/mkdir -p $(DSTBASE)/include/CoreFoundation | |
62 | /bin/mkdir -p $(DSTBASE)/share/CoreFoundation | |
63 | -/bin/rm $(DSTBASE)/include/CoreFoundation/*.h | |
64 | /bin/mkdir -p $(DSTBASE)/lib | |
65 | /bin/cp $(PRIVATE_HEADERS) $(DSTBASE)/include/CoreFoundation | |
66 | /bin/cp $(PUBLIC_HEADERS) $(DSTBASE)/include/CoreFoundation | |
67 | /bin/cp $(OBJBASE)/libCoreFoundation.so $(DSTBASE)/lib | |
68 | /bin/cp $(RESOURCES) $(DSTBASE)/share/CoreFoundation | |
69 | # this one goes outside the base directory | |
70 | /bin/cp TargetConditionals.h $(DSTBASE)/include | |
71 | /sbin/ldconfig -n $(DSTBASE)/lib | |
72 | @echo "Installing done. The library is in $(DSTBASE)/lib and the headers are in $(DSTBASE)/include/CoreFoundation" |