1 # Makefile for libiconv/src
3 #### Start of system configuration section. ####
5 # Directories used by "make":
7 top_srcdir
= @top_srcdir@
9 # Directories used by "make install":
11 local_prefix
= /usr
/local
12 exec_prefix = @
exec_prefix@
15 datarootdir
= @datarootdir@
17 localedir
= @localedir@
19 # Programs used by "make":
24 INCLUDES
= -I.
-I
$(srcdir) -I..
-I..
/include -I
$(srcdir)/..
/include -I..
/srclib
-I
$(srcdir)/..
/srclib
26 LIBTOOL_COMPILE
= $(LIBTOOL
) --mode
=compile
27 LIBTOOL_LINK
= $(LIBTOOL
) --mode
=link
28 LIBTOOL_INSTALL
= $(LIBTOOL
) --mode
=install
29 LIBTOOL_UNINSTALL
= $(LIBTOOL
) --mode
=uninstall
34 # Programs used by "make 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":
42 INSTALL_STRIP_PROGRAM
= @INSTALL_STRIP_PROGRAM@
43 install_sh
= @install_sh@
45 #### End of system configuration section. ####
49 PACKAGE_VERSION
= @VERSION@
51 # Needed by $(LIBTOOL).
54 # Needed by SET_RELOCATABLE.
57 # Needed by RELOCATABLE_LDFLAGS.
60 OBJECTS_RES_yes
= iconv.res
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.
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@
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
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.
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
);; \
118 $(INSTALL_PROGRAM_ENV
) $(LIBTOOL_INSTALL
) $(INSTALL_PROGRAM
) iconv
$(EXEEXT
) $(DESTDIR
)$(bindir)/iconv
$(EXEEXT
)
120 install-strip
: force
121 case
'$(INSTALL_PROGRAM)' in \
123 $(MAKE
) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)' RELOCATABLE_STRIP
='$(STRIP)' ;; \
125 $(MAKE
) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)' INSTALL_PROGRAM
='$(INSTALL_STRIP_PROGRAM)' ;; \
129 if
[ ! -d
$(DESTDIR
)$(bindir) ] ; then
$(mkinstalldirs
) $(DESTDIR
)$(bindir) ; fi
132 $(LIBTOOL_UNINSTALL
) $(RM
) $(DESTDIR
)$(bindir)/iconv
$(EXEEXT
)
139 $(RM
) *.@OBJEXT@
*.lo iconv.res iconv_no_i18n iconv_no_i18n
$(EXEEXT
) iconv
$(EXEEXT
) core
*.stackdump
145 maintainer-clean
: distclean
147 # List of source files.
150 iconv.c iconv_no_i18n.c \
152 # List of distributed files imported from other packages.
154 # List of distributed files generated by autotools or Makefile.devel.
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; \