1 # Makefile for libcharset/lib
3 #### Start of system configuration section. ####
5 # Directories used by "make":
8 # Directories used by "make install":
10 local_prefix
= /usr
/local
11 exec_prefix = @
exec_prefix@
14 # Programs used by "make":
19 INCLUDES
= -I.
-I
$(srcdir) -I..
-I
$(srcdir)/..
21 LIBTOOL_COMPILE
= $(LIBTOOL
) --mode
=compile
22 LIBTOOL_LINK
= $(LIBTOOL
) --mode
=link
23 LIBTOOL_INSTALL
= $(LIBTOOL
) --mode
=install
24 LIBTOOL_UNINSTALL
= $(LIBTOOL
) --mode
=uninstall
27 # Programs used by "make install":
29 INSTALL_DATA
= @INSTALL_DATA@
30 MKINSTALLDIRS
= $(SHELL
) $(srcdir)/..
/autoconf
/mkinstalldirs
32 #### End of system configuration section. ####
39 # Before making a release, change this according to the libtool documentation,
40 # section "Library interface versions".
41 LIBCHARSET_VERSION_INFO
= 1:0:0
43 # Needed by $(LIBTOOL).
46 SOURCES
= $(srcdir)/localcharset.c
48 OBJECTS
= localcharset.lo
50 all : libcharset.la charset.alias ref-add.sed ref-del.sed
52 libcharset.la
: $(OBJECTS
)
53 $(LIBTOOL_LINK
) $(CC
) $(LDFLAGS
) -o libcharset.la
-rpath
$(libdir) -version-info
$(LIBCHARSET_VERSION_INFO
) -no-undefined
$(OBJECTS
)
55 localcharset.lo
: $(srcdir)/localcharset.c
56 $(LIBTOOL_COMPILE
) $(CC
) $(CFLAGS
) $(CPPFLAGS
) $(INCLUDES
) -DHAVE_CONFIG_H
-DLIBDIR
=\"$(libdir)\" -c
$(srcdir)/localcharset.c
58 charset.alias
: $(srcdir)/config.charset
59 $(SHELL
) $(srcdir)/config.charset
'@host@' > t-
$@
62 ref-add.sed
: $(srcdir)/ref-add.sin
63 sed
-e
'/^#/d' -e
's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin
> t-
$@
66 ref-del.sed
: $(srcdir)/ref-del.sin
67 sed
-e
'/^#/d' -e
's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin
> t-
$@
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
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.
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
; \
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
; \
104 $(MKINSTALLDIRS
) $(DESTDIR
)$(libdir)
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
; \
113 $(INSTALL_DATA
) $(DESTDIR
)$(libdir)/t-charset.alias
$(DESTDIR
)$(libdir)/charset.alias
; \
115 rm -f
$(DESTDIR
)$(libdir)/t-charset.alias
; \
123 $(RM
) *.o
*.lo
*.a
*.la core charset.alias ref-add.sed ref-del.sed
127 $(RM
) config.status config.log config.cache Makefile libtool
129 maintainer-clean
: distclean