Initial revision
[TestXSLT.git] / libiconv / libcharset / lib / Makefile.in
1 # Makefile for libcharset/lib
2
3 #### Start of system configuration section. ####
4
5 # Directories used by "make":
6 srcdir = @srcdir@
7
8 # Directories used by "make install":
9 prefix = @prefix@
10 local_prefix = /usr/local
11 exec_prefix = @exec_prefix@
12 libdir = @libdir@
13
14 # Programs used by "make":
15 CC = @CC@
16 CFLAGS = @CFLAGS@
17 CPPFLAGS = @CPPFLAGS@
18 LDFLAGS = @LDFLAGS@
19 INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/..
20 LIBTOOL = @LIBTOOL@
21 LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
22 LIBTOOL_LINK = $(LIBTOOL) --mode=link
23 LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
24 LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
25 RM = rm -f
26
27 # Programs used by "make install":
28 INSTALL = @INSTALL@
29 INSTALL_DATA = @INSTALL_DATA@
30 MKINSTALLDIRS = $(SHELL) $(srcdir)/../autoconf/mkinstalldirs
31
32 #### End of system configuration section. ####
33
34 PACKAGE = @PACKAGE@
35 VERSION = @VERSION@
36
37 SHELL = /bin/sh
38
39 # Before making a release, change this according to the libtool documentation,
40 # section "Library interface versions".
41 LIBCHARSET_VERSION_INFO = 1:0:0
42
43 # Needed by $(LIBTOOL).
44 top_builddir = ..
45
46 SOURCES = $(srcdir)/localcharset.c
47
48 OBJECTS = localcharset.lo
49
50 all : libcharset.la charset.alias ref-add.sed ref-del.sed
51
52 libcharset.la : $(OBJECTS)
53         $(LIBTOOL_LINK) $(CC) $(LDFLAGS) -o libcharset.la -rpath $(libdir) -version-info $(LIBCHARSET_VERSION_INFO) -no-undefined $(OBJECTS)
54
55 localcharset.lo : $(srcdir)/localcharset.c
56         $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H -DLIBDIR=\"$(libdir)\" -c $(srcdir)/localcharset.c
57
58 charset.alias: $(srcdir)/config.charset
59         $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
60         mv t-$@ $@
61
62 ref-add.sed : $(srcdir)/ref-add.sin
63         sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-$@
64         mv t-$@ $@
65
66 ref-del.sed : $(srcdir)/ref-del.sin
67         sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-$@
68         mv t-$@ $@
69
70 # Installs the library and include files only. Typically called with only
71 # $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
72 install-lib : all force
73         $(MKINSTALLDIRS) $(libdir)
74         $(LIBTOOL_INSTALL) $(INSTALL_DATA) libcharset.la $(libdir)/libcharset.la
75         test -f $(libdir)/charset.alias && orig=$(libdir)/charset.alias \
76                                         || orig=charset.alias; \
77         sed -f ref-add.sed $$orig > $(libdir)/t-charset.alias; \
78         $(INSTALL_DATA) $(libdir)/t-charset.alias $(libdir)/charset.alias; \
79         rm -f $(libdir)/t-charset.alias
80
81 # The following is needed in order to install a simple file in $(libdir)
82 # which is shared with other installed packages. We use a list of referencing
83 # packages so that "make uninstall" will remove the file if and only if it
84 # is not used by another installed package.
85 # On systems with glibc-2.1 or newer, the file is redundant, therefore we
86 # avoid installing it.
87
88 install : all force
89         $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
90         $(LIBTOOL_INSTALL) $(INSTALL_DATA) libcharset.la $(DESTDIR)$(libdir)/libcharset.la
91         if test -f $(DESTDIR)$(libdir)/charset.alias; then \
92           sed -f ref-add.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
93           $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
94           rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
95         else \
96           if test @GLIBC21@ = no; then \
97             sed -f ref-add.sed charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
98             $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
99             rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
100           fi ; \
101         fi
102
103 installdirs : force
104         $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
105
106 uninstall : force
107         $(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libcharset.la
108         if test -f $(DESTDIR)$(libdir)/charset.alias; then \
109           sed -f ref-del.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
110           if grep '^# Packages using this file: $$' $(DESTDIR)$(libdir)/t-charset.alias > /dev/null; then \
111             rm -f $(DESTDIR)$(libdir)/charset.alias; \
112           else \
113             $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
114           fi; \
115           rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
116         fi
117
118 check : all
119
120 mostlyclean : clean
121
122 clean : force
123         $(RM) *.o *.lo *.a *.la *.o.lock core charset.alias ref-add.sed ref-del.sed
124         $(RM) -r .libs _libs
125
126 distclean : clean
127         $(RM) config.status config.log config.cache Makefile libtool
128
129 maintainer-clean : distclean
130
131 force :
132