]> git.ipfire.org Git - thirdparty/glibc.git/blob - locale/Makefile
Tue Jun 25 09:55:47 1996 David Mosberger-Tang <davidm@AZStarNet.com>
[thirdparty/glibc.git] / locale / Makefile
1 # Copyright (C) 1991, 1992, 1995, 1996 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 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
15 # License along with the GNU C Library; see the file COPYING.LIB. If
16 # not, write to the Free Software Foundation, Inc.,
17 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 #
20 # Makefile for locales.
21 #
22 subdir := locale
23
24 headers = locale.h langinfo.h
25 distribute = localeinfo.h categories.def iso-4217.def weight.h \
26 $(addprefix programs/, \
27 $(localedef-modules:=.c) $(locale-modules:=.c) \
28 $(lib-modules:=.c) config.h simple-hash.h \
29 charmap-kw.gperf charmap-kw.h locfile-token.h \
30 locfile-kw.gperf locfile-kw.h linereader.h \
31 locales.h locfile.h stringtrans.h charset.h)
32 routines = setlocale findlocale loadlocale localeconv nl_langinfo \
33 mb_cur_max codeset_name
34 categories = ctype messages monetary numeric time collate
35 aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name
36 others = localedef locale
37 install-bin = localedef locale
38 extra-objs = $(localedef-modules:=.o) $(locale-modules:=.o) \
39 $(lib-modules:=.o)
40
41 subdir-dirs = programs
42 vpath %.c programs
43 vpath %.h programs
44 vpath %.gperf programs
45
46 localedef-modules := $(categories:%=ld-%) charmap charset linereader \
47 locfile stringtrans
48 lib-modules := simple-hash xmalloc xstrdup
49
50
51 GPERF = gperf
52 GPERFFLAGS = -acCgopt -k1,2,5,$$
53
54 include ../Rules
55
56 programs/%-kw.h: programs/%-kw.gperf
57 $(GPERF) $(GPERFFLAGS) -N $(@F:-kw.h=_hash) $< > $@.new
58 mv -f $@.new $@
59
60 $(objpfx)localedef: $(localedef-modules:%=$(objpfx)%.o)
61 $(objpfx)locale: $(locale-modules:%=$(objpfx)%.o)
62 $(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o)
63
64 CPPFLAGS := -DLOCALE_PATH='"$(localedir)"' \
65 -DCHARMAP_PATH='"$(i18ndir)/charmap"' \
66 -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
67 -Iprograms $(CPPFLAGS)
68
69 CFLAGS-charmap.c = -Wno-write-strings
70 CFLAGS-locfile.c = -Wno-write-strings