-# First figure out the platform if not specified, so we can use it in the
-# rest of this file. Currently defined values: Darwin, Linux, FreeBSD, WIN32
-ifeq "$(PLATFORM)" ""
-PLATFORM := $(shell uname)
-endif
-
-ifeq "$(PLATFORM)" "Darwin"
-PLATFORM_CFLAGS = -D__MACH__=1 -fconstant-cfstrings
-endif
-
-ifeq "$(PLATFORM)" "Linux"
-PLATFORM_CFLAGS = -D__LINUX__=1
-endif
-
-ifeq "$(PLATFORM)" "FreeBSD"
-PLATFORM_CFLAGS = -D__FREEBSD__=1
-endif
-
-ifeq "$(PLATFORM)" "WIN32"
-PLATFORM_CFLAGS = -D__WIN32__=1
-OBJROOT = CoreFoundation.obj
-SYMROOT = CoreFoundation.sym
-DSTROOT = CoreFoundation.dst
-endif
-
-ifndef SRCROOT
-SRCROOT = .
-endif
-
-ifndef OBJROOT
-OBJROOT = /tmp/CoreFoundation.obj
-endif
-
-ifndef SYMROOT
-SYMROOT = /tmp/CoreFoundation.sym
-endif
-
-ifndef DSTROOT
-DSTROOT = /tmp/CoreFoundation.dst
-endif
-
-SILENT = @
-ifeq "$(PLATFORM)" "WIN32"
-CC = gcc
-ECHO = echo
-MKDIRS = mkdir -p
-COPY = cp
-COPY_RECUR = cp -r
-REMOVE = rm
-REMOVE_RECUR = rm -rf
-SYMLINK = ln -s
-CHMOD = chmod
-CHOWN = chown
-TAR = tar
-STRIP = strip
-DLLTOOL = dlltool
-else
-ifeq "$(PLATFORM)" "Darwin"
-CC = /usr/bin/cc
-else
-CC = /usr/bin/gcc
-endif
-ECHO = /bin/echo
-MKDIRS = /bin/mkdir -p
-COPY = /bin/cp
-COPY_RECUR = /bin/cp -r
-REMOVE = /bin/rm
-REMOVE_RECUR = /bin/rm -rf
-SYMLINK = /bin/ln -s
-CHMOD = /bin/chmod
-CHOWN = /usr/sbin/chown
-TAR = /usr/bin/tar
-STRIP = /usr/bin/strip
-endif
-
-ifeq "$(PLATFORM)" "Darwin"
-WARNING_FLAGS = -Wno-precomp -Wno-four-char-constants
-endif
-
-ifeq "$(PLATFORM)" "Darwin"
-ifneq "$(ARCHS)" ""
-ARCH_FLAGS = $(foreach A, $(ARCHS), $(addprefix -arch , $(A)))
-else
-ifneq "$(RC_ARCHS)" ""
-ARCH_FLAGS = $(foreach A, $(RC_ARCHS), $(addprefix -arch , $(A)))
-else
-ARCH_FLAGS = -arch ppc
-endif
-endif
-endif
-
-ifeq "$(PLATFORM)" "FreeBSD"
-ARCH_FLAGS = -march=i386
-endif
-
-ifeq "$(PLATFORM)" "Linux"
-ARCH_FLAGS =
-endif
-
-ifeq "$(USER)" ""
-USER = unknown
-endif
-
-CFLAGS = -DCF_BUILDING_CF=1 -g -fno-common -pipe $(PLATFORM_CFLAGS) \
- $(WARNING_FLAGS) -I$(SYMROOT)/ProjectHeaders -I.
-
-ifeq "$(PLATFORM)" "WIN32"
-LFLAGS = -lmsvcrt -lnetapi32 -lobjc -lole32 -lws2_32
-else
-LFLAGS =
-endif
-
-ifeq "$(wildcard /System/Library/Frameworks)" ""
-LIBRARY_STYLE = Library
-LIBRARY_EXT = .so
-ifeq "$(PLATFORM)" "Linux"
-LIBRARY_EXT = .a
-endif
-ifeq "$(PLATFORM)" "WIN32"
-LIBRARY_EXT = .dll
-endif
-HEADER_INSTALLDIR = /usr/local/include/CoreFoundation
-INSTALLDIR = /usr/local/lib
-CHARACTERSETS_INSTALLDIR = /usr/local/share/CoreFoundation
-else
-LIBRARY_STYLE = Framework
-INSTALLDIR = /System/Library/Frameworks
-FRAMEWORK_DIR = /System/Library/Frameworks/CoreFoundation.framework
-CHARACTERSETS_INSTALLDIR = /System/Library/CoreServices
-endif
-
-ifeq "$(PLATFORM)" "Darwin"
-CFLAGS += $(ARCH_FLAGS) -F$(SYMROOT)
-LFLAGS += $(ARCH_FLAGS) -dynamiclib -dynamic -compatibility_version 150 \
- -current_version $(CURRENT_PROJECT_VERSION) -Wl,-init,___CFInitialize
-endif
-
-ifeq "$(PLATFORM)" "FreeBSD"
-LFLAGS += -shared
-endif
-
-ifeq "$(PLATFORM)" "Linux"
-LFLAGS += -lpthread
-endif
-
-CFLAGS += $(OTHER_CFLAGS) $(RC_CFLAGS)
-LFLAGS += $(OTHER_LFLAGS)
-
-
-SUBPROJECTS = AppServices Base Collections Locale NumberDate Parsing PlugIn \
- RunLoop String StringEncodings URL