Add i386/dl-brk.S, mips/dl-brk.S, and sparc/dl-brk.S.
[platform/upstream/glibc.git] / locale / Makefile
1 # Copyright (C) 1991,92,1995-1999,2000,2001,2002 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
3
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, write to the Free
16 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 # 02111-1307 USA.
18
19 #
20 #       Makefile for locales.
21 #
22 subdir  := locale
23
24 headers         = locale.h bits/locale.h langinfo.h xlocale.h
25 distribute      = localeinfo.h categories.def iso-639.def iso-3166.def \
26                   iso-4217.def weight.h weightwc.h strlen-hash.h elem-hash.h \
27                   indigits.h indigitswc.h outdigits.h outdigitswc.h \
28                   coll-lookup.h C-translit.h.in C-translit.h gen-translit.pl \
29                   locarchive.h hashval.h \
30                   $(addprefix programs/, \
31                               locale.c localedef.c \
32                               $(localedef-modules:=.c) $(locale-modules:=.c) \
33                               $(lib-modules:=.c) config.h simple-hash.h \
34                               charmap-kw.gperf charmap-kw.h locfile-token.h \
35                               locfile-kw.gperf locfile-kw.h linereader.h \
36                               locfile.h charmap.h repertoire.h localedef.h \
37                               3level.h charmap-dir.h locarchive.c)
38 routines        = setlocale findlocale loadlocale loadarchive \
39                   localeconv nl_langinfo nl_langinfo_l mb_cur_max \
40                   newlocale duplocale freelocale uselocale
41 tests           = tst-C-locale
42 categories      = ctype messages monetary numeric time paper name \
43                   address telephone measurement identification collate
44 aux             = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
45                   xlocale localename
46 others          = localedef locale
47 #others-static  = localedef locale
48 install-bin     = localedef locale
49 extra-objs      = $(localedef-modules:=.o) $(locale-modules:=.o) \
50                   $(lib-modules:=.o)
51
52 extra-libs      = libBrokenLocale
53 extra-libs-others = $(extra-libs)
54
55 libBrokenLocale-routines = broken_cur_max
56
57 subdir-dirs     = programs
58 vpath %.c programs ../crypt
59 vpath %.h programs
60 vpath %.gperf programs
61
62 localedef-modules       := $(categories:%=ld-%) charmap linereader locfile \
63                            repertoire locarchive
64 localedef-aux           := md5
65 locale-modules          := locale-spec
66 lib-modules             := charmap-dir simple-hash xmalloc xstrdup
67
68
69 GPERF = gperf
70 GPERFFLAGS = -acCgopt -k1,2,5,9,$$ -L ANSI-C
71
72 include ../Rules
73
74 programs/%-kw.h: programs/%-kw.gperf
75         $(GPERF) $(GPERFFLAGS) -N $(@F:-kw.h=_hash) $< > $@.new
76         mv -f $@.new $@
77
78 $(objpfx)localedef: $(localedef-modules:%=$(objpfx)%.o)
79 $(objpfx)localedef: $(localedef-aux:%=$(objpfx)%.o)
80 $(objpfx)locale: $(locale-modules:%=$(objpfx)%.o)
81 $(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o)
82
83 C-translit.h: C-translit.h.in gen-translit.pl
84         $(PERL) gen-translit.pl < $< > $@.tmp
85         mv -f $@.tmp $@
86 ifeq ($(with-cvs),yes)
87         test ! -d CVS || cvs $(CVSOPTS) commit -mRegenerated $@
88 endif
89
90 localepath = "$(localedir):$(i18ndir)"
91
92 locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
93                    -DLOCALEDIR='"$(localedir)"' \
94                    -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
95                    -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
96                    -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
97                    -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
98                    -Iprograms
99
100 CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
101 CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
102 CFLAGS-charmap-dir.c = -Wno-write-strings
103
104 CPPFLAGS-locale = -DNOT_IN_libc
105 CPPFLAGS-localedef = -DNOT_IN_libc
106 CPPFLAGS-ld-ctype = -DNOT_IN_libc
107 CPPFLAGS-ld-time = -DNOT_IN_libc
108 CPPFLAGS-ld-numeric = -DNOT_IN_libc
109 CPPFLAGS-ld-monetary = -DNOT_IN_libc
110 CPPFLAGS-ld-collate = -DNOT_IN_libc
111 CPPFLAGS-ld-identification = -DNOT_IN_libc
112 CPPFLAGS-charmap = -DNOT_IN_libc
113 CPPFLAGS-locarchive = -DNOT_IN_libc
114 CPPFLAGS-linereader = -DNOT_IN_libc
115 CPPFLAGS-charmap-dir = -DNOT_IN_libc
116
117 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
118 # This ensures they will load libc.so for needed symbols if loaded by
119 # a statically-linked program that hasn't already loaded it.
120 $(objpfx)libBrokenLocale.so: $(common-objpfx)libc.so \
121                              $(common-objpfx)libc_nonshared.a