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