]> git.ipfire.org Git - thirdparty/glibc.git/blame - iconvdata/Makefile
Update.
[thirdparty/glibc.git] / iconvdata / Makefile
CommitLineData
f4017d20
UD
1# Copyright (C) 1997 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 iconv data and code.
21#
22subdir := iconvdata
23
24# Names of all the shared objects which implement the transformations.
25modules := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 \
26 ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10 \
27 T.61 ISO_6937
28modules.so := $(addsuffix .so, $(modules))
29
30
31ISO8859-1-routines := iso8859-1
32ISO8859-2-routines := iso8859-2
33ISO8859-3-routines := iso8859-3
34ISO8859-4-routines := iso8859-4
35ISO8859-5-routines := iso8859-5
36ISO8859-6-routines := iso8859-6
37ISO8859-7-routines := iso8859-7
38ISO8859-8-routines := iso8859-8
39ISO8859-9-routines := iso8859-9
40ISO8859-10-routines := iso8859-10
41T.61-routines := t61
42ISO_6937-routines := iso6937
43
44distribute := iso8859-generic.c \
45 iso8859-1.c iso8859-2.c iso8859-3.c iso8859-4.c iso8859-5.c \
46 iso8859-6.c iso8859-7.c iso8859-8.c iso8859-9.c iso8859-10.c\
47 iso8859-2.h iso8859-3.h iso8859-4.h iso8859-5.h iso8859-6.h \
48 iso8859-7.h iso8859-8.h iso8859-9.h iso8859-10.h t61.c \
49 iso6937.c
50
51include ../Makeconfig
52
53# We build the transformation modules only when we build shared libs.
54ifeq (yes,$(build-shared))
55
56# This macro is similar to build-shlib but it does not define a soname
57# and it does not depend on the destination name to start with `lib'.
58define build-module
59$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
60 -B$(csu-objpfx) $(load-map-file:%=-Wl,--version-script=%) \
61 $(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
62 -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
63 -Wl,--whole-archive \
64 $(filter-out $($(@F:.so=)-map) $(+preinit) $(+postinit),$^) \
65 $(no-whole-archive) $(LDLIBS-$(@F:%.so=%).so)
66endef
67
68# Rule to generate the shared objects.
69extra-modules-left := $(modules)
70include extra-module.mk
71
72
73extra-objs += $(modules.so)
74install-others = $(addprefix $(inst_gconvdir)/, $(modules.so)) \
75 $(inst_gconvdir)/gconv-modules
76
77# If we have the localedata add-on available we can build the conversion
78# tables for numerous charsets.
79ifneq (,$(findstring localedata,$(add-ons)))
80define generate-8bit-table
81( echo "static const wchar_t to_ucs4[256] = {"; \
82 sed -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/ [0x\1] = 0x\2,/p' -e d $^ | sort -u; \
83 echo "};"; \
84 echo "static const char from_ucs4[] = {"; \
85 sed -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/ [0x\2] = 0x\1,/p' -e d $^ | sort -u; \
86 echo "};" ) > $@.new && rm -f $@ && mv $@.new $@
87endef
88
89iso8859-2.h: ../localedata/charmaps/ISO-8859-2
90 $(generate-8bit-table)
91iso8859-3.h: ../localedata/charmaps/ISO-8859-3
92 $(generate-8bit-table)
93iso8859-4.h: ../localedata/charmaps/ISO-8859-4
94 $(generate-8bit-table)
95iso8859-5.h: ../localedata/charmaps/ISO-8859-5
96 $(generate-8bit-table)
97iso8859-6.h: ../localedata/charmaps/ISO-8859-6
98 $(generate-8bit-table)
99iso8859-7.h: ../localedata/charmaps/ISO-8859-7
100 $(generate-8bit-table)
101iso8859-8.h: ../localedata/charmaps/ISO-8859-8
102 $(generate-8bit-table)
103iso8859-9.h: ../localedata/charmaps/ISO-8859-9
104 $(generate-8bit-table)
105iso8859-10.h: ../localedata/charmaps/ISO-8859-10
106 $(generate-8bit-table)
107
108headers: iso8859-2.h iso8859-3.h iso8859-4.h iso8859-5.h iso8859-6.h \
109 iso8859-7.h iso8859-8.h iso8859-9.h iso8859-10.h
110endif
111
112
113$(addprefix $(inst_gconvdir)/, $(modules.so)): $(inst_gconvdir)/%: $(objpfx)%
114 $(do-install-program)
115$(inst_gconvdir)/gconv_modules: gconv-modules
116 $(do-install)
117endif
118
119include ../Rules