]>
Commit | Line | Data |
---|---|---|
4b10dd6c | 1 | # Copyright (C) 1991, 92, 95, 96, 97, 98, 99 Free Software Foundation, Inc. |
28f540f4 RM |
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 Library General Public License as | |
6 | # published by the Free Software Foundation; either version 2 of the | |
7 | # 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 | # Library General Public License for more details. | |
13 | ||
14 | # You should have received a copy of the GNU Library General Public | |
e4cf5070 UD |
15 | # License along with the GNU C Library; see the file COPYING.LIB. If not, |
16 | # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
17 | # Boston, MA 02111-1307, USA. | |
28f540f4 RM |
18 | |
19 | # | |
20 | # Makefile for locales. | |
21 | # | |
22 | subdir := locale | |
23 | ||
c84142e8 | 24 | headers = locale.h langinfo.h xlocale.h |
4b10dd6c UD |
25 | distribute = localeinfo.h categories.def iso-639.def iso-3166.def \ |
26 | iso-4217.def weight.h strlen-hash.h \ | |
a4242e25 | 27 | $(addprefix programs/, \ |
8ca5c11b | 28 | locale.c localedef.c \ |
a4242e25 RM |
29 | $(localedef-modules:=.c) $(locale-modules:=.c) \ |
30 | $(lib-modules:=.c) config.h simple-hash.h \ | |
31 | charmap-kw.gperf charmap-kw.h locfile-token.h \ | |
32 | locfile-kw.gperf locfile-kw.h linereader.h \ | |
4b10dd6c | 33 | locales.h locfile.h stringtrans.h charmap.h \ |
69f155d4 | 34 | repertoire.h) |
0200214b | 35 | routines = setlocale findlocale loadlocale localeconv nl_langinfo \ |
c84142e8 UD |
36 | mb_cur_max codeset_name \ |
37 | newlocale duplocale freelocale | |
4b10dd6c UD |
38 | #categories = ctype messages monetary numeric time collate paper name \ |
39 | # address telephone measurement versions | |
40 | categories = ctype messages monetary numeric time paper name \ | |
41 | address telephone measurement identification collate | |
db2286f6 | 42 | aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name |
4b10dd6c UD |
43 | # XXX For testing this is now others-static instead of others. |
44 | others-static = localedef locale | |
299a95b9 | 45 | install-bin = localedef locale |
2b83a2a4 RM |
46 | extra-objs = $(localedef-modules:=.o) $(locale-modules:=.o) \ |
47 | $(lib-modules:=.o) | |
48 | ||
6259ec0d UD |
49 | extra-libs = libBrokenLocale |
50 | extra-libs-others = $(extra-libs) | |
51 | ||
52 | libBrokenLocale-routines = broken_cur_max | |
53 | ||
df7c0d23 | 54 | subdir-dirs = programs |
19bc17a9 RM |
55 | vpath %.c programs |
56 | vpath %.h programs | |
f127cd28 | 57 | vpath %.gperf programs |
19bc17a9 | 58 | |
4b10dd6c UD |
59 | localedef-modules := $(categories:%=ld-%) charmap linereader locfile \ |
60 | repertoire | |
ce7a5ef4 | 61 | locale-modules := locale-spec |
19bc17a9 | 62 | lib-modules := simple-hash xmalloc xstrdup |
2b83a2a4 RM |
63 | |
64 | ||
65 | GPERF = gperf | |
4b10dd6c | 66 | GPERFFLAGS = -acCgopt -k1,2,5,9,$$ -L ANSI-C |
28f540f4 RM |
67 | |
68 | include ../Rules | |
2b83a2a4 | 69 | |
19bc17a9 RM |
70 | programs/%-kw.h: programs/%-kw.gperf |
71 | $(GPERF) $(GPERFFLAGS) -N $(@F:-kw.h=_hash) $< > $@.new | |
2b83a2a4 RM |
72 | mv -f $@.new $@ |
73 | ||
74 | $(objpfx)localedef: $(localedef-modules:%=$(objpfx)%.o) | |
75 | $(objpfx)locale: $(locale-modules:%=$(objpfx)%.o) | |
76 | $(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o) | |
77 | ||
47707456 | 78 | localepath = "$(localedir):$(i18ndir)" |
e4cf5070 | 79 | |
4b10dd6c UD |
80 | CPPFLAGS := -DLOCALE_PATH='$(localepath)' \ |
81 | -DLOCALEDIR='"$(localedir)"' \ | |
82 | -DLOCALE_ALIAS_PATH='"$(localedir):$(i18ndir)"' \ | |
83 | -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ | |
84 | -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \ | |
85 | -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \ | |
86 | -Iprograms $(CPPFLAGS) | |
0793d348 | 87 | |
6973fc01 UD |
88 | CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts |
89 | CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts | |
6259ec0d UD |
90 | |
91 | # Depend on libc.so so a DT_NEEDED is generated in the shared objects. | |
92 | # This ensures they will load libc.so for needed symbols if loaded by | |
93 | # a statically-linked program that hasn't already loaded it. | |
94 | $(objpfx)libBrokenLocale.so: $(common-objpfx)libc.so |