Include <ioctl-types.h> for definition of struct winsize.
[glibc/history.git] / locale / Makefile
blob7acef573d6ce1241602c17e559450f0a6274f6b6
1 # Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
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.
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.
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 not,
16 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
20 # Makefile for locales.
22 subdir := locale
24 headers = locale.h langinfo.h xlocale.h
25 distribute = localeinfo.h categories.def iso-4217.def weight.h \
26 strlen-hash.h \
27 $(addprefix programs/, \
28 locale.c localedef.c \
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 \
33 locales.h locfile.h stringtrans.h charset.h)
34 routines = setlocale findlocale loadlocale localeconv nl_langinfo \
35 mb_cur_max codeset_name \
36 newlocale duplocale freelocale
37 categories = ctype messages monetary numeric time collate
38 aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name
39 others = localedef locale
40 install-bin = localedef locale
41 extra-objs = $(localedef-modules:=.o) $(locale-modules:=.o) \
42 $(lib-modules:=.o)
44 extra-libs = libBrokenLocale
45 extra-libs-others = $(extra-libs)
47 libBrokenLocale-routines = broken_cur_max
49 subdir-dirs = programs
50 vpath %.c programs
51 vpath %.h programs
52 vpath %.gperf programs
54 localedef-modules := $(categories:%=ld-%) charmap charset linereader \
55 locfile stringtrans
56 locale-modules := locale-spec
57 lib-modules := simple-hash xmalloc xstrdup
60 GPERF = gperf
61 GPERFFLAGS = -acCgopt -k1,2,5,$$
63 include ../Rules
65 programs/%-kw.h: programs/%-kw.gperf
66 $(GPERF) $(GPERFFLAGS) -N $(@F:-kw.h=_hash) $< > $@.new
67 mv -f $@.new $@
69 $(objpfx)localedef: $(localedef-modules:%=$(objpfx)%.o)
70 $(objpfx)locale: $(locale-modules:%=$(objpfx)%.o)
71 $(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o)
73 localepath = "$(localedir):$(i18ndir)"
75 CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
76 -DLOCALEDIR='"$(localedir)"' \
77 -DLOCALE_ALIAS_PATH='"$(localedir):$(i18ndir)"' \
78 -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
79 -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
80 -Iprograms $(CPPFLAGS)
82 CFLAGS-charmap.c = -Wno-write-strings
83 CFLAGS-locfile.c = -Wno-write-strings
85 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
86 # This ensures they will load libc.so for needed symbols if loaded by
87 # a statically-linked program that hasn't already loaded it.
88 $(objpfx)libBrokenLocale.so: $(common-objpfx)libc.so