1#****************************************************************************** 2# 3# Copyright (C) 2002-2007, International Business Machines 4# Corporation and others. All Rights Reserved. 5# 6#****************************************************************************** 7 8ICUDIR=ICUunrenamed 9TOP=../.. 10SO=so 11 12COM=$(ICUDIR)/lib/libicuuc.$(SO) 13I18=$(ICUDIR)/lib/libicui18n.$(SO) 14LAY=$(ICUDIR)/lib/libicule.$(SO) 15LEX=$(ICUDIR)/lib/libiculx.$(SO) 16DAT=$(ICUDIR)/stubdata/libicudata.$(SO) 17UIO=$(ICUDIR)/lib/libicuio.$(SO) 18 19LIBS=$(COM) $(I18) $(LAY) $(LEX) $(UIO) 20 21# Extra flags to prevent internal API from being hidden. 22# This is important because ELF (Linux) based platforms that don't hide internal 23# API will allow a duplicate internal name to resolve to an external library. 24# See the gcc manual on the "visibility" attribute for details. 25FLAG_OVERRIDE="LIBCFLAGS= LIBCXXFLAGS=" 26 27all: 28 @cat README 29 30clean: 31 -rm -rf $(ICUDIR) urename.* *~ 32 33# We use config.status to mean we have a valid out of source tree. 34 35$(ICUDIR)/config.status: 36 -mv $(ICUDIR) $(ICUDIR)old 37 -(rm -rf $(ICUDIR)old &) 38 mkdir $(ICUDIR) 39 ( cd $(ICUDIR) ; CPPFLAGS=-DURENAME_H $(TOP)/../configure --with-data-packaging=archive --enable-tests=no --prefix=`pwd` $(GENREN_CONFIGURE_OPTS) ) 40 41# build the libraries 42$(DAT): $(ICUDIR)/config.status Makefile 43 gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/stubdata libicudata.$(SO) 44 45$(COM): $(DAT) $(ICUDIR)/config.status Makefile 46 gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/common libicuuc.$(SO) 47 48$(I18): $(DAT) $(COM) $(ICUDIR)/config.status Makefile 49 gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/i18n libicui18n.$(SO) 50 51$(LAY): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile 52 gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/layout libicule.$(SO) 53 54$(LEX): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile 55 gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/layoutex libiculx.$(SO) 56 57$(UIO): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile 58 gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/io libicuio.$(SO) 59 60# the header itself 61urename.h: $(LIBS) genren.pl 62 -cp urename.h urename.h.old 63 perl ./genren.pl $(LIBS) 64 65sorts: urename.sort urename.old.sort 66 @echo "*** Please check urename.h manually before committing it." 67 @echo "Try 'diff --side-by-side urename.old.sort urename.sort'" 68 69urename.sort: urename.h 70 sort urename.h > $@ 71 72urename.old.sort: $(TOP)/common/unicode/urename.h 73 sort $(TOP)/common/unicode/urename.h > $@ 74 75install-header: urename.h sorts 76 cp $(TOP)/common/unicode/urename.h $(TOP)/common/unicode/urename.h.old 77 cp urename.h $(TOP)/common/unicode/ 78 79 80