michael@0: #****************************************************************************** michael@0: # michael@0: # Copyright (C) 2002-2011, International Business Machines michael@0: # Corporation and others. All Rights Reserved. michael@0: # michael@0: #****************************************************************************** michael@0: michael@0: TOP=../.. michael@0: michael@0: srcdir = . michael@0: top_srcdir = $(TOP) michael@0: top_builddir = $(TOP) michael@0: michael@0: # override if you have an out-of-source build (not yet working.) michael@0: BUILDDIR = $(top_builddir) michael@0: michael@0: ICUDIR=ICUunrenamed michael@0: michael@0: # Extra flags to prevent internal API from being hidden. michael@0: # This is important because ELF (Linux) based platforms that don't hide internal michael@0: # API will allow a duplicate internal name to resolve to an external library. michael@0: # See the gcc manual on the "visibility" attribute for details. michael@0: FLAG_OVERRIDE= LIBCFLAGS= LIBCXXFLAGS= $(EXTRA_MAKE_OPTIONS) michael@0: michael@0: ## any local overrides michael@0: -include Makefile.local michael@0: michael@0: # load definition of .SO, etc (but not if we are doing 'make clean') michael@0: ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) michael@0: include $(BUILDDIR)/icudefs.mk michael@0: endif michael@0: michael@0: COM=$(ICUDIR)/lib/libicuuc.$(SO) michael@0: I18=$(ICUDIR)/lib/libicui18n.$(SO) michael@0: LAY=$(ICUDIR)/lib/libicule.$(SO) michael@0: LEX=$(ICUDIR)/lib/libiculx.$(SO) michael@0: DAT=$(ICUDIR)/stubdata/libicudata.$(SO) michael@0: UIO=$(ICUDIR)/lib/libicuio.$(SO) michael@0: michael@0: LIBS=$(COM) $(I18) $(LAY) $(LEX) $(UIO) michael@0: michael@0: ## Targets. michael@0: michael@0: michael@0: all: michael@0: @cat README michael@0: michael@0: clean: michael@0: -rm -rf $(ICUDIR) urename.* *~ michael@0: michael@0: # We use config.status to mean we have a valid out of source tree. michael@0: michael@0: $(ICUDIR)/config.status: michael@0: -mv $(ICUDIR) $(ICUDIR)old michael@0: -(rm -rf $(ICUDIR)old &) michael@0: mkdir $(ICUDIR) michael@0: ( cd $(ICUDIR) ; CPPFLAGS=-DU_DISABLE_RENAMING=1 $(GENREN_CONFIGURE_ENV) $(top_srcdir)/../configure --with-data-packaging=archive --enable-tests=no --prefix=`pwd` $(GENREN_CONFIGURE_OPTS) ) michael@0: # cause lib and bin to be created, and any other general sanity michael@0: $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) clean michael@0: $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) all-local michael@0: michael@0: # build the libraries michael@0: $(DAT): $(ICUDIR)/config.status Makefile michael@0: $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/stubdata all-local michael@0: michael@0: $(COM): $(DAT) $(ICUDIR)/config.status Makefile michael@0: $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/common all-local michael@0: michael@0: $(I18): $(DAT) $(COM) $(ICUDIR)/config.status Makefile michael@0: $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/i18n all-local michael@0: michael@0: $(LAY): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile michael@0: $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/layout all-local michael@0: michael@0: $(LEX): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile michael@0: $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/layoutex all-local michael@0: michael@0: $(UIO): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile michael@0: $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/io all-local michael@0: michael@0: # the header itself michael@0: urename.h: $(LIBS) genren.pl michael@0: -cp urename.h urename.h.old michael@0: perl ./genren.pl $(GENREN_PL_OPTS) $(LIBS) michael@0: michael@0: # This is still here, but less useful with the "new" macro-based rename. Just use 'svn diff'. michael@0: sorts: urename.sort urename.old.sort michael@0: @echo "*** Please check urename.h manually before committing it." michael@0: @echo "Try 'diff --side-by-side urename.old.sort urename.sort'" michael@0: michael@0: urename.sort: urename.h michael@0: sort urename.h > $@ michael@0: michael@0: urename.old.sort: $(top_srcdir)/common/unicode/urename.h michael@0: sort $(top_srcdir)/common/unicode/urename.h > $@ michael@0: michael@0: install-header: urename.h michael@0: cp urename.h $(top_srcdir)/common/unicode/ michael@0: @echo "*** Please check urename.h manually before committing it." michael@0: