Update after gnulib changed.
[libiconv.git] / src / Makefile.in
blobe8fff47483ebe9b986e264ddba80156a3ee70790
1 # Makefile for libiconv/src
3 #### Start of system configuration section. ####
5 # Directories used by "make":
6 srcdir = @srcdir@
7 top_srcdir = @top_srcdir@
9 # Directories used by "make install":
10 prefix = @prefix@
11 local_prefix = /usr/local
12 exec_prefix = @exec_prefix@
13 bindir = @bindir@
14 libdir = @libdir@
15 datarootdir = @datarootdir@
16 datadir = @datadir@
17 localedir = @localedir@
19 # Programs used by "make":
20 CC = @CC@
21 CFLAGS = @CFLAGS@
22 CPPFLAGS = @CPPFLAGS@
23 LDFLAGS = @LDFLAGS@
24 INCLUDES = -I. -I$(srcdir) -I.. -I../include -I$(srcdir)/../include -I../srclib -I$(srcdir)/../srclib
25 LIBTOOL = @LIBTOOL@
26 LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
27 LIBTOOL_LINK = $(LIBTOOL) --mode=link
28 LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
29 LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
30 WINDRES = @WINDRES@
31 RM = rm -f
32 @SET_MAKE@
34 # Programs used by "make install":
35 INSTALL = @INSTALL@
36 INSTALL_PROGRAM = @INSTALL_PROGRAM@
37 INSTALL_DATA = @INSTALL_DATA@
38 mkinstalldirs = $(SHELL) @top_srcdir@/build-aux/mkinstalldirs
40 # Programs used by "make install-strip":
41 STRIP = @STRIP@
42 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
43 install_sh = @install_sh@
45 #### End of system configuration section. ####
47 SHELL = @SHELL@
49 PACKAGE_VERSION = @VERSION@
51 # Needed by $(LIBTOOL).
52 top_builddir = ..
54 # Needed by SET_RELOCATABLE.
55 EXEEXT = @EXEEXT@
57 # Needed by RELOCATABLE_LDFLAGS.
58 host = @host@
60 OBJECTS_RES_yes = iconv.res
61 OBJECTS_RES_no =
63 # We cannot link with libintl until libiconv is installed. (When we call
64 # libtool with arguments "../lib/libiconv.la -lintl", libtool will call ld
65 # with "../lib/.libs/libiconv.so $libdir/libintl.so $libdir/libiconv.so",
66 # (remember that $libdir/libintl.la lists $libdir/libiconv.so as a dependency),
67 # and this gives a fatal linker error on Solaris because the two libiconv.so
68 # files are different but have the same soname.
69 # So we can link the iconv executable only after we have installed libiconv,
70 # i.e. during "make install". The intermediate 'iconv' executable is built
71 # without internationalization and not linked with libintl.
73 all : iconv_no_i18n$(EXEEXT) iconv.@OBJEXT@ $(OBJECTS_RES_@WOE32@)
74 test `ls -ld . | sed -e 's/^d\(.........\).*/\1/'` = rwxrwxrwx || chmod 777 .
76 # This is the temporary iconv executable, without internationalization.
77 iconv_no_i18n$(EXEEXT) : iconv_no_i18n.@OBJEXT@ ../lib/libiconv.la $(OBJECTS_RES_@WOE32@)
78 $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) iconv_no_i18n.@OBJEXT@ ../srclib/libicrt.a ../lib/libiconv.la $(OBJECTS_RES_@WOE32@) -o $@
80 iconv_no_i18n.@OBJEXT@ : $(srcdir)/iconv_no_i18n.c $(srcdir)/iconv.c
81 $(CC) -c $(INCLUDES) -I../lib $(CFLAGS) $(CPPFLAGS) -DINSTALLDIR=\"$(bindir)\" -DLOCALEDIR=\"$(localedir)\" $(srcdir)/iconv_no_i18n.c
83 iconv.@OBJEXT@ : $(srcdir)/iconv.c
84 $(CC) -c $(INCLUDES) -I../lib $(CFLAGS) $(CPPFLAGS) -DINSTALLDIR=\"$(bindir)\" -DLOCALEDIR=\"$(localedir)\" $(srcdir)/iconv.c
86 iconv.res : $(srcdir)/../windows/iconv.rc
87 $(WINDRES) `$(SHELL) $(srcdir)/../windows/windres-options --escape $(PACKAGE_VERSION)` -i $(srcdir)/../windows/iconv.rc -o iconv.res --output-format=coff
89 # The following rule is necessary to avoid a toplevel "make -n check" failure.
90 ../lib/libiconv.la :
91 cd ../lib && $(MAKE) libiconv.la
93 # Support for relocatability.
94 RELOCATABLE_LIBRARY_PATH = $(libdir)
95 RELOCATABLE_SRC_DIR = $(top_srcdir)/srclib
96 RELOCATABLE_BUILD_DIR = ../srclib
97 RELOCATABLE_CONFIG_H_DIR = ..
98 RELOCATABLE_LDFLAGS = @RELOCATABLE_LDFLAGS@
99 RELOCATABLE_STRIP = :
100 INSTALL_PROGRAM_ENV = @INSTALL_PROGRAM_ENV@
101 iconv_LDFLAGS = `if test -n '$(RELOCATABLE_LDFLAGS)'; then $(RELOCATABLE_LDFLAGS) $(bindir); fi`
103 # During "make install", we can build the final iconv executable.
104 # On HP-UX, in order to ensure that the new libiconv.sl will override the old
105 # one that is hardcoded in libintl.sl, we need to mention libiconv.sl before
106 # libintl.sl on the link command line. We have to bypass libtool in order to
107 # achieve this.
108 # On Solaris, the linker gives an error if we are using libintl.so and it
109 # refers to a libiconv.so in $prefix/lib since then it sees two libiconv.so's,
110 # one in $prefix/lib and one in ../lib/.libs. So we have to avoid using
111 # ../lib/libiconv.la entirely.
112 install : all force
113 if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
114 case "@host_os@" in \
115 hpux*) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a -L$(DESTDIR)$(libdir) -liconv @LIBINTL@ $(OBJECTS_RES_@WOE32@) `if test -n '$(DESTDIR)'; then echo " -Wl,+b -Wl,$(libdir)"; fi` -o iconv$(EXEEXT);; \
116 *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a @LTLIBINTL@ $(DESTDIR)$(libdir)/libiconv.la $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
117 esac
118 $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) iconv$(EXEEXT) $(DESTDIR)$(bindir)/iconv$(EXEEXT)
120 install-strip : force
121 case '$(INSTALL_PROGRAM)' in \
122 */install-reloc) \
123 $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)' RELOCATABLE_STRIP='$(STRIP)' ;; \
124 *) \
125 $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)' INSTALL_PROGRAM='$(INSTALL_STRIP_PROGRAM)' ;; \
126 esac
128 installdirs : force
129 if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
131 uninstall : force
132 $(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(bindir)/iconv$(EXEEXT)
134 check : all
136 mostlyclean : clean
138 clean : force
139 $(RM) *.@OBJEXT@ *.lo iconv.res iconv_no_i18n iconv_no_i18n$(EXEEXT) iconv$(EXEEXT) core *.stackdump
140 $(RM) -r .libs _libs
142 distclean : clean
143 $(RM) Makefile
145 maintainer-clean : distclean
147 # List of source files.
148 SOURCE_FILES = \
149 Makefile.in \
150 iconv.c iconv_no_i18n.c \
151 zos-tag.h
152 # List of distributed files imported from other packages.
153 IMPORTED_FILES =
154 # List of distributed files generated by autotools or Makefile.devel.
155 GENERATED_FILES =
156 # List of distributed files generated by "make".
157 DISTRIBUTED_BUILT_FILES =
158 # List of distributed files.
159 DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
161 distdir : $(DISTFILES)
162 for file in $(DISTFILES); do \
163 if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
164 cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
165 done
167 force :