SHELL := /bin/sh
SRCROOT=/tmp
OBJROOT=$(SRCROOT)
SYMROOT=$(OBJROOT)
DSTROOT=/tmp/build
APPLE_INTERNAL_DIR=/AppleInternal
RC_ARCHS=
ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
CFLAGS="-DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) -g -Os -fno-exceptions" \
CXXFLAGS="-DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) -g -Os -fno-exceptions" \
RC_ARCHS="$(RC_ARCHS)" \
DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
CFLAGS="-DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -g -Os -fno-exceptions" \
CXXFLAGS="-DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -g -Os -fno-exceptions" \
RC_ARCHS="$(RC_ARCHS)" \
DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
ENV_DEBUG = APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
CFLAGS="-DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) -O0 -g -fno-exceptions" \
CXXFLAGS="-DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) -O0 -g -fno-exceptions" \
RC_ARCHS="$(RC_ARCHS)" \
DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
EXTRA_HDRS =
HDR_MAKE_SUBDIR = ./common/ ./i18n/ $(EXTRA_HDRS)
INSTALL = /usr/bin/install
COMMON_OBJ = ./common/*.o
I18N_OBJ = ./i18n/*.o
STUB_DATA_OBJ = ./stubdata/*.o
EXTRA_LIBS =
EXTRA_CLEAN =
MANUAL_CLEAN_TOOLS = ./tools/dumpce
MANUAL_CLEAN_EXTRA = ./extra/scrptrun ./samples/layout ./extra/ustdio ./extra
MANUAL_CLEAN_TEST = ./test/collperf ./test/iotest ./test/letest ./test/thaitest ./test/threadtest ./test/testmap ./test
MANUAL_CLEAN_SAMPLE = ./samples/layout ./samples
CLEAN_SUBDIR = ./stubdata ./common ./i18n ./layout ./layoutex ./data ./tools ./$(MANUAL_CLEAN_TOOLS) $(MANUAL_CLEAN_EXTRA) $(MANUAL_CLEAN_TEST) $(MANUAL_CLEAN_SAMPLE)
CONFIG_FLAGS = --disable-renaming --disable-extras --disable-ustdio --disable-layout --disable-tests --disable-samples --with-data-packaging=archive --prefix=/usr/local
LIB_NAME = libicucore
ICU_VERS = 26
ICU_SUBVERS = 0
CORE_VERS = A
DYLIB_SUFF = dylib
libdir = /usr/lib/
INSTALLED_DYLIB = $(LIB_NAME).$(CORE_VERS).$(DYLIB_SUFF)
DYLIB = $(LIB_NAME).$(DYLIB_SUFF)
datadir=/usr/share/icu/
ICU_DATA_DIR= /data/out/
B_DATA_FILE=icudt$(ICU_VERS)b.dat
L_DATA_FILE=icudt$(ICU_VERS)l.dat
installsrc :
if test ! -d $(SRCROOT); then mkdir $(SRCROOT); fi;
if test -d $(SRCROOT)/icuSources ; then rm -rf $(SRCROOT)/icuSources; fi;
tar cf - ./makefile ./icuSources ./$(L_DATA_FILE) | (cd $(SRCROOT) ; tar xfp -); \
for i in `find $(SRCROOT)/icuSources/ | grep "CVS$$"` ; do \
if test -d $$i ; then \
rm -rf $$i; \
fi; \
done
for j in `find $(SRCROOT)/icuSources/ | grep ".cvsignore"` ; do \
if test -f $$j ; then \
rm -f $$j; \
fi; \
done
installhdrs : $(SRCROOT)/icuSources/Makefile
$(SHELL) -ec \
'cd $(SRCROOT)/icuSources; \
for subdir in $(HDR_MAKE_SUBDIR); do \
(cd $$subdir; $(MAKE) -e DESTDIR=$(DSTROOT) $(ENV) install-headers); \
done;'
install : installhdrs $(SRCROOT)/icuSources/Makefile
$(SHELL) -ec \
'cd $(SRCROOT)/icuSources; \
$(MAKE) $(ENV); \
$(ENV) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic $(RC_ARCHS:%=-arch %) $(CXXFLAGS) $(LDFLAGS) -single_module -sectorder __TEXT __text /usr/local/lib/OrderFiles/libicucore.order -install_name $(libdir)$(INSTALLED_DYLIB) -o ./$(INSTALLED_DYLIB) $(COMMON_OBJ) $(I18N_OBJ) $(STUB_DATA_OBJ); \
if test ! -d $(DSTROOT)$(libdir)/; then \
$(INSTALL) -d -m 0775 $(DSTROOT)$(libdir)/; \
fi; \
$(INSTALL) -b -m 0664 ./$(INSTALLED_DYLIB) $(DSTROOT)$(libdir)$(INSTALLED_DYLIB); \
cd $(DSTROOT)$(libdir); \
ln -fs $(INSTALLED_DYLIB) $(DYLIB); \
cp $(INSTALLED_DYLIB) $(SYMROOT)/$(INSTALLED_DYLIB); \
strip -x -u -r -S $(DSTROOT)$(libdir)$(INSTALLED_DYLIB);'
for subdir in $(EXTRA_LIBS); do \
(cd $(SRCROOT)/icuSources/$$subdir; $(MAKE) -e DESTDIR=$(DSTROOT) $(ENV) install-library;) \
done;
if test ! -d $(DSTROOT)$(datadir)/; then \
$(INSTALL) -d -m 0755 $(DSTROOT)$(datadir)/; \
fi;
if test -f $(SRCROOT)/icuSources/$(ICU_DATA_DIR)/$(B_DATA_FILE); then \
$(INSTALL) -b -m 0644 $(SRCROOT)/icuSources/$(ICU_DATA_DIR)/$(B_DATA_FILE) $(DSTROOT)$(datadir)$(B_DATA_FILE); \
fi;
if test -f $(SRCROOT)/$(L_DATA_FILE); then \
$(INSTALL) -b -m 0644 $(SRCROOT)/$(L_DATA_FILE) $(DSTROOT)$(datadir)$(L_DATA_FILE); \
fi;
for i in $(CLEAN_SUBDIR) ; do \
if test -e $(SRCROOT/icuSources/$$i); then \
(cd $(SRCROOT)/icuSources/$$i; $(MAKE) -e DESTDIR=$(DSTROOT) $(ENV) distclean); \
fi; \
done; \
(cd $(SRCROOT)/icuSources; $(MAKE) -e DESTDIR=$(DSTROOT) $(ENV) distclean-local;)
if test -f $(SRCROOT)/icuSources/config/icu-config; then \
rm -rf $(SRCROOT)/icuSources/config/icu-config; \
fi;
if test -f $(SRCROOT)/icuSources/$(INSTALLED_DYLIB); then \
rm -rf $(SRCROOT)/icuSources/$(INSTALLED_DYLIB); \
fi;
clean :
if test -d $(SRCROOT)/icuSources; then \
if test -e $(SRCROOT)/icuSources/Makefile; then \
for i in $(CLEAN_SUBDIR) ; do \
if test -e $(SRCROOT/icuSources/$$i); then \
(cd $(SRCROOT)/icuSources/$$i; $(MAKE) -e DESTDIR=$(DSTROOT) $(ENV) distclean); \
fi; \
done; \
(cd $(SRCROOT)/icuSources; $(MAKE) -e DESTDIR=$(DSTROOT) $(ENV) distclean-local;) \
fi; \
fi;
if test -f $(SRCROOT)/icuSources/config/icu-config; then \
rm -rf $(SRCROOT)/icuSources/config/icu-config; \
fi;
if test -f $(SRCROOT)/icuSources/$(INSTALLED_DYLIB); then \
rm -rf $(SRCROOT)/icuSources/$(INSTALLED_DYLIB); \
fi;
$(SRCROOT)/icuSources/Makefile :
$(SHELL) -ec \
'cd $(SRCROOT)/icuSources; \
$(ENV_CONFIGURE) ./configure $(CONFIG_FLAGS);'
debug: installhdrs $(SRCROOT)/icuSources/Makefile
$(SHELL) -ec \
'cd $(SRCROOT)/icuSources; \
$(MAKE) $(ENV_DEBUG); \
$(ENV_DEBUG) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic $(RC_ARCHS:%=-arch %) $(CXXFLAGS) $(LDFLAGS) -install_name $(libdir)$(INSTALLED_DYLIB) -o ./$(INSTALLED_DYLIB) $(COMMON_OBJ) $(I18N_OBJ) $(STUB_DATA_OBJ); \
if test ! -d $(DSTROOT)$(libdir)/; then \
$(INSTALL) -d -m 0775 $(DSTROOT)$(libdir)/; \
fi; \
$(INSTALL) -b -m 0664 ./$(INSTALLED_DYLIB) $(DSTROOT)$(libdir)$(INSTALLED_DYLIB); \
cd $(DSTROOT)$(libdir); \
ln -fs $(INSTALLED_DYLIB) $(DYLIB);'
debug-install: debug installhdrs $(SRCROOT)/icuSources/Makefile
for subdir in $(EXTRA_LIBS); do \
(cd $(SRCROOT)/icuSources/$$subdir; $(MAKE) -e DESTDIR=$(DSTROOT) $(ENV_DEBUG) install-library;) \
done;
if test ! -d $(DSTROOT)$(datadir)/; then \
$(INSTALL) -d -m 0755 $(DSTROOT)$(datadir)/; \
fi;
if test -f $(SRCROOT)/icuSources/$(ICU_DATA_DIR)/$(B_DATA_FILE); then \
$(INSTALL) -b -m 0644 $(SRCROOT)/icuSources/$(ICU_DATA_DIR)/$(B_DATA_FILE) $(DSTROOT)$(datadir)$(B_DATA_FILE); \
else \
$(INSTALL) -b -m 0644 $(SRCROOT)/icuSources/$(ICU_DATA_DIR)/$(L_DATA_FILE) $(DSTROOT)$(datadir)$(L_DATA_FILE); \
fi;
(cd $(SRCROOT)/icuSources; $(MAKE) -e DESTDIR=$(DSTROOT) $(ENV) distclean-local;)
if test -f $(SRCROOT)/icuSources/config/icu-config; then \
rm -rf $(SRCROOT)/icuSources/config/icu-config; \
fi;
if test -f $(SRCROOT)/icuSources/$(INSTALLED_DYLIB); then \
rm -rf $(SRCROOT)/icuSources/$(INSTALLED_DYLIB); \
fi;