]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | #****************************************************************************** |
2 | # | |
4388f060 | 3 | # Copyright (C) 2002-2011, International Business Machines |
b75a7d8f A |
4 | # Corporation and others. All Rights Reserved. |
5 | # | |
6 | #****************************************************************************** | |
7 | ||
b75a7d8f | 8 | TOP=../.. |
4388f060 | 9 | |
46f4442e A |
10 | srcdir = . |
11 | top_srcdir = $(TOP) | |
46f4442e A |
12 | top_builddir = $(TOP) |
13 | ||
4388f060 A |
14 | # override if you have an out-of-source build (not yet working.) |
15 | BUILDDIR = $(top_builddir) | |
16 | ||
46f4442e | 17 | ICUDIR=ICUunrenamed |
4388f060 A |
18 | |
19 | # Extra flags to prevent internal API from being hidden. | |
20 | # This is important because ELF (Linux) based platforms that don't hide internal | |
21 | # API will allow a duplicate internal name to resolve to an external library. | |
22 | # See the gcc manual on the "visibility" attribute for details. | |
23 | FLAG_OVERRIDE= LIBCFLAGS= LIBCXXFLAGS= $(EXTRA_MAKE_OPTIONS) | |
24 | ||
25 | ## any local overrides | |
26 | -include Makefile.local | |
27 | ||
28 | # load definition of .SO, etc (but not if we are doing 'make clean') | |
29 | ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) | |
30 | include $(BUILDDIR)/icudefs.mk | |
31 | endif | |
b75a7d8f | 32 | |
374ca955 A |
33 | COM=$(ICUDIR)/lib/libicuuc.$(SO) |
34 | I18=$(ICUDIR)/lib/libicui18n.$(SO) | |
35 | LAY=$(ICUDIR)/lib/libicule.$(SO) | |
36 | LEX=$(ICUDIR)/lib/libiculx.$(SO) | |
b75a7d8f | 37 | DAT=$(ICUDIR)/stubdata/libicudata.$(SO) |
374ca955 | 38 | UIO=$(ICUDIR)/lib/libicuio.$(SO) |
b75a7d8f A |
39 | |
40 | LIBS=$(COM) $(I18) $(LAY) $(LEX) $(UIO) | |
41 | ||
4388f060 A |
42 | ## Targets. |
43 | ||
46f4442e | 44 | |
b75a7d8f A |
45 | all: |
46 | @cat README | |
47 | ||
48 | clean: | |
49 | -rm -rf $(ICUDIR) urename.* *~ | |
50 | ||
51 | # We use config.status to mean we have a valid out of source tree. | |
52 | ||
53 | $(ICUDIR)/config.status: | |
54 | -mv $(ICUDIR) $(ICUDIR)old | |
55 | -(rm -rf $(ICUDIR)old &) | |
56 | mkdir $(ICUDIR) | |
4388f060 | 57 | ( 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) ) |
46f4442e A |
58 | # cause lib and bin to be created, and any other general sanity |
59 | $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) clean | |
60 | $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) all-local | |
b75a7d8f A |
61 | |
62 | # build the libraries | |
63 | $(DAT): $(ICUDIR)/config.status Makefile | |
46f4442e | 64 | $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/stubdata all-local |
b75a7d8f A |
65 | |
66 | $(COM): $(DAT) $(ICUDIR)/config.status Makefile | |
46f4442e | 67 | $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/common all-local |
b75a7d8f A |
68 | |
69 | $(I18): $(DAT) $(COM) $(ICUDIR)/config.status Makefile | |
46f4442e | 70 | $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/i18n all-local |
b75a7d8f A |
71 | |
72 | $(LAY): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile | |
46f4442e | 73 | $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/layout all-local |
b75a7d8f A |
74 | |
75 | $(LEX): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile | |
46f4442e | 76 | $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/layoutex all-local |
b75a7d8f A |
77 | |
78 | $(UIO): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile | |
46f4442e | 79 | $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/io all-local |
b75a7d8f A |
80 | |
81 | # the header itself | |
82 | urename.h: $(LIBS) genren.pl | |
83 | -cp urename.h urename.h.old | |
46f4442e | 84 | perl ./genren.pl $(GENREN_PL_OPTS) $(LIBS) |
b75a7d8f | 85 | |
4388f060 | 86 | # This is still here, but less useful with the "new" macro-based rename. Just use 'svn diff'. |
b75a7d8f A |
87 | sorts: urename.sort urename.old.sort |
88 | @echo "*** Please check urename.h manually before committing it." | |
89 | @echo "Try 'diff --side-by-side urename.old.sort urename.sort'" | |
90 | ||
91 | urename.sort: urename.h | |
92 | sort urename.h > $@ | |
93 | ||
4388f060 A |
94 | urename.old.sort: $(top_srcdir)/common/unicode/urename.h |
95 | sort $(top_srcdir)/common/unicode/urename.h > $@ | |
b75a7d8f | 96 | |
4388f060 A |
97 | install-header: urename.h |
98 | cp urename.h $(top_srcdir)/common/unicode/ | |
99 | @echo "*** Please check urename.h manually before committing it." | |
b75a7d8f | 100 |