| 1 |
# Copyright (C) 2016 and later: Unicode, Inc. and others. |
| 2 |
# License & terms of use: http://www.unicode.org/copyright.html |
| 3 |
#****************************************************************************** |
| 4 |
# |
| 5 |
# Copyright (C) 2002-2011, International Business Machines |
| 6 |
# Corporation and others. All Rights Reserved. |
| 7 |
# |
| 8 |
#****************************************************************************** |
| 9 |
|
| 10 |
TOP=../.. |
| 11 |
|
| 12 |
srcdir = . |
| 13 |
top_srcdir = $(TOP) |
| 14 |
top_builddir = $(TOP) |
| 15 |
|
| 16 |
# override if you have an out-of-source build (not yet working.) |
| 17 |
BUILDDIR = $(top_builddir) |
| 18 |
|
| 19 |
ICUDIR=ICUunrenamed |
| 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. |
| 25 |
FLAG_OVERRIDE= LIBCFLAGS= LIBCXXFLAGS= $(EXTRA_MAKE_OPTIONS) |
| 26 |
|
| 27 |
## any local overrides |
| 28 |
-include Makefile.local |
| 29 |
|
| 30 |
# load definition of .SO, etc (but not if we are doing 'make clean') |
| 31 |
ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) |
| 32 |
include $(BUILDDIR)/icudefs.mk |
| 33 |
endif |
| 34 |
|
| 35 |
# For MinGW, do we want the DLL to go in the bin location? |
| 36 |
ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES) |
| 37 |
installdir = bin |
| 38 |
else |
| 39 |
installdir = lib |
| 40 |
endif |
| 41 |
|
| 42 |
COM=$(ICUDIR)/$(installdir)/libicuuc.$(SO) |
| 43 |
I18=$(ICUDIR)/$(installdir)/libicui18n.$(SO) |
| 44 |
LEX=$(ICUDIR)/$(installdir)/libiculx.$(SO) |
| 45 |
DAT=$(ICUDIR)/stubdata/libicudata.$(SO) |
| 46 |
UIO=$(ICUDIR)/$(installdir)/libicuio.$(SO) |
| 47 |
|
| 48 |
LIBS=$(COM) $(I18) $(LEX) $(UIO) |
| 49 |
|
| 50 |
## Targets. |
| 51 |
|
| 52 |
|
| 53 |
all: |
| 54 |
@cat README |
| 55 |
|
| 56 |
clean: |
| 57 |
-rm -rf $(ICUDIR) urename.* *~ |
| 58 |
|
| 59 |
# We use config.status to mean we have a valid out of source tree. |
| 60 |
|
| 61 |
$(ICUDIR)/config.status: |
| 62 |
-mv $(ICUDIR) $(ICUDIR)old |
| 63 |
-(rm -rf $(ICUDIR)old &) |
| 64 |
mkdir $(ICUDIR) |
| 65 |
( cd $(ICUDIR) ; CPPFLAGS="-DU_DISABLE_RENAMING=1 -DUCONFIG_ENABLE_PLUGINS" $(GENREN_CONFIGURE_ENV) $(top_srcdir)/../configure --with-data-packaging=archive --enable-tests=no --prefix=`pwd` $(GENREN_CONFIGURE_OPTS) ) |
| 66 |
# cause lib and bin to be created, and any other general sanity |
| 67 |
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) clean |
| 68 |
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) all-local |
| 69 |
|
| 70 |
# build the libraries |
| 71 |
$(DAT): $(ICUDIR)/config.status Makefile |
| 72 |
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/stubdata all-local |
| 73 |
|
| 74 |
$(COM): $(DAT) $(ICUDIR)/config.status Makefile |
| 75 |
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/common all-local |
| 76 |
|
| 77 |
$(I18): $(DAT) $(COM) $(ICUDIR)/config.status Makefile |
| 78 |
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/i18n all-local |
| 79 |
|
| 80 |
$(LEX): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile |
| 81 |
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/layoutex all-local |
| 82 |
|
| 83 |
$(UIO): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile |
| 84 |
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/io all-local |
| 85 |
|
| 86 |
# the header itself |
| 87 |
urename.h: $(LIBS) genren.pl |
| 88 |
-cp urename.h urename.h.old |
| 89 |
perl ./genren.pl $(GENREN_PL_OPTS) $(LIBS) |
| 90 |
|
| 91 |
# This is still here, but less useful with the "new" macro-based rename. Just use 'svn diff'. |
| 92 |
sorts: urename.sort urename.old.sort |
| 93 |
@echo "*** Please check urename.h manually before committing it." |
| 94 |
@echo "Try 'diff --side-by-side urename.old.sort urename.sort'" |
| 95 |
|
| 96 |
urename.sort: urename.h |
| 97 |
sort urename.h > $@ |
| 98 |
|
| 99 |
urename.old.sort: $(top_srcdir)/common/unicode/urename.h |
| 100 |
sort $(top_srcdir)/common/unicode/urename.h > $@ |
| 101 |
|
| 102 |
install-header: urename.h |
| 103 |
cp urename.h $(top_srcdir)/common/unicode/ |
| 104 |
@echo "*** Please check urename.h manually before committing it." |
| 105 |
|