]> git.ipfire.org Git - thirdparty/glibc.git/blob - iconv/Makefile
Remove non-ELF support
[thirdparty/glibc.git] / iconv / Makefile
1 # Copyright (C) 1997,1998,2000-2004,2007,2009,2012
2 # Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
4
5 # The GNU C Library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
9
10 # The GNU C Library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
14
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with the GNU C Library; if not, write to the Free
17 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 # 02111-1307 USA.
19
20 #
21 # Makefile for iconv.
22 #
23 subdir := iconv
24
25 include ../Makeconfig
26
27 headers = iconv.h gconv.h
28 routines = iconv_open iconv iconv_close \
29 gconv_open gconv gconv_close gconv_db gconv_conf \
30 gconv_builtin gconv_simple gconv_trans gconv_cache
31 routines += gconv_dl
32
33 vpath %.c ../locale/programs ../intl
34
35 iconv_prog-modules = iconv_charmap charmap charmap-dir linereader \
36 dummy-repertoire simple-hash xstrdup xmalloc
37 iconvconfig-modules = strtab xmalloc hash-string
38 extra-objs = $(iconv_prog-modules:=.o) $(iconvconfig-modules:=.o)
39 CFLAGS-iconv_prog.c = -I../locale/programs
40 CFLAGS-iconv_charmap.c = -I../locale/programs
41 CFLAGS-dummy-repertoire.c = -I../locale/programs
42 CFLAGS-charmap.c = -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
43 -DDEFAULT_CHARMAP=null_pointer -DNEED_NULL_POINTER
44 CFLAGS-linereader.c = -DNO_TRANSLITERATION
45 CFLAGS-simple-hash.c = -I../locale
46
47 tests = tst-iconv1 tst-iconv2 tst-iconv3 tst-iconv4 tst-iconv5
48
49 distribute = gconv_builtin.h gconv_int.h loop.c skeleton.c iconv_prog.h \
50 iconv_charmap.c dummy-repertoire.c gconv_charset.h strtab.c \
51 iconvconfig.h
52
53 others = iconv_prog iconvconfig
54 install-others-programs = $(inst_bindir)/iconv
55 install-sbin = iconvconfig
56
57 CFLAGS-gconv_cache.c += -DGCONV_DIR='"$(gconvdir)"'
58 CFLAGS-gconv_conf.c = -DGCONV_PATH='"$(gconvdir)"'
59 CFLAGS-iconvconfig.c = -DGCONV_PATH='"$(gconvdir)"' -DGCONV_DIR='"$(gconvdir)"'
60
61 CPPFLAGS-iconv_prog = -DNOT_IN_libc
62 CPPFLAGS-iconv_charmap = -DNOT_IN_libc
63 CPPFLAGS-iconvconfig = -DNOT_IN_libc
64 CPPFLAGS-linereader = -DNOT_IN_libc
65 CPPFLAGS-strtab = -DNOT_IN_libc
66 CPPFLAGS-charmap = -DNOT_IN_libc
67 CPPFLAGS-charmap-dir = -DNOT_IN_libc
68
69 include ../Rules
70
71 $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force)
72 $(do-install-program)
73
74 $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
75 $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
76
77 ifneq ($(cross-compiling),yes)
78 xtests: test-iconvconfig
79 endif
80
81 .PHONY: test-iconvconfig
82 test-iconvconfig: /dev/null $(objpfx)iconvconfig
83 tmp=$(objpfx)gconv-modules.cache.$$$$; \
84 rm -f $$tmp; \
85 $(make-test-out) --output=$$tmp --nostdlib $(inst_gconvdir) && \
86 cmp $$tmp $(inst_gconvdir)/gconv-modules.cache && \
87 rm -f $$tmp