1# Makefile for libiconv/src
2
3#### Start of system configuration section. ####
4
5# Directories used by "make":
6srcdir = .
7top_srcdir = ..
8
9# Directories used by "make install":
10prefix = /usr/local
11local_prefix = /usr/local
12exec_prefix = ${prefix}
13bindir = ${exec_prefix}/bin
14libdir = ${exec_prefix}/lib
15datarootdir = ${prefix}/share
16datadir = ${datarootdir}
17localedir = ${datarootdir}/locale
18
19# Programs used by "make":
20CC = gcc
21CFLAGS = -g -O2
22CPPFLAGS =
23LDFLAGS =
24INCLUDES = -I. -I$(srcdir) -I.. -I../include -I$(srcdir)/../include -I../srclib -I$(srcdir)/../srclib
25LIBTOOL = /bin/bash $(top_builddir)/libtool
26LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
27LIBTOOL_LINK = $(LIBTOOL) --mode=link
28LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
29LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
30WINDRES =
31RM = rm -f
32
33
34# Programs used by "make install":
35INSTALL = /usr/bin/install -c
36INSTALL_PROGRAM = ${INSTALL}
37INSTALL_DATA = ${INSTALL} -m 644
38mkinstalldirs = $(SHELL) ../build-aux/mkinstalldirs
39
40# Programs used by "make install-strip":
41STRIP = /usr/bin/strip
42INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
43install_sh = ${SHELL} /home/sonicadvance1/dolphin-emu/Externals/libiconv-1.14/build-aux/install-sh
44
45#### End of system configuration section. ####
46
47SHELL = /bin/sh
48
49PACKAGE_VERSION = 1.14
50
51# Needed by $(LIBTOOL).
52top_builddir = ..
53
54# Needed by SET_RELOCATABLE.
55EXEEXT =
56
57# Needed by RELOCATABLE_LDFLAGS.
58host = x86_64-unknown-linux-gnu
59
60OBJECTS_RES_yes = iconv.res
61OBJECTS_RES_no =
62
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.
72
73all : iconv_no_i18n$(EXEEXT) iconv.o $(OBJECTS_RES_no)
74	test `ls -ld . | sed -e 's/^d\(.........\).*/\1/'` = rwxrwxrwx || chmod 777 .
75
76# This is the temporary iconv executable, without internationalization.
77iconv_no_i18n$(EXEEXT) : iconv_no_i18n.o ../lib/libiconv.la $(OBJECTS_RES_no)
78	$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) iconv_no_i18n.o ../srclib/libicrt.a ../lib/libiconv.la $(OBJECTS_RES_no) -o $@
79
80iconv_no_i18n.o : $(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
82
83iconv.o : $(srcdir)/iconv.c
84	$(CC) -c $(INCLUDES) -I../lib $(CFLAGS) $(CPPFLAGS) -DINSTALLDIR=\"$(bindir)\" -DLOCALEDIR=\"$(localedir)\" $(srcdir)/iconv.c
85
86iconv.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
88
89# The following rule is necessary to avoid a toplevel "make -n check" failure.
90../lib/libiconv.la :
91	cd ../lib && $(MAKE) libiconv.la
92
93# Support for relocatability.
94RELOCATABLE_LIBRARY_PATH = $(libdir)
95RELOCATABLE_SRC_DIR = $(top_srcdir)/srclib
96RELOCATABLE_BUILD_DIR = ../srclib
97RELOCATABLE_CONFIG_H_DIR = ..
98RELOCATABLE_LDFLAGS =
99RELOCATABLE_STRIP = :
100INSTALL_PROGRAM_ENV =
101iconv_LDFLAGS = `if test -n '$(RELOCATABLE_LDFLAGS)'; then $(RELOCATABLE_LDFLAGS) $(bindir); fi`
102
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.
112install : all force
113	if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
114	case "linux-gnu" in \
115	  hpux*) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.o ../srclib/libicrt.a -L$(DESTDIR)$(libdir) -liconv  $(OBJECTS_RES_no) `if test -n '$(DESTDIR)'; then echo " -Wl,+b -Wl,$(libdir)"; fi` -o iconv$(EXEEXT);; \
116	  *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.o ../srclib/libicrt.a $(DESTDIR)$(libdir)/libiconv.la  $(OBJECTS_RES_no) -o iconv$(EXEEXT);; \
117	esac
118	$(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) iconv$(EXEEXT) $(DESTDIR)$(bindir)/iconv$(EXEEXT)
119
120install-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
127
128installdirs : force
129	if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
130
131uninstall : force
132	$(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(bindir)/iconv$(EXEEXT)
133
134check : all
135
136mostlyclean : clean
137
138clean : force
139	$(RM) *.o *.lo iconv.res iconv_no_i18n iconv_no_i18n$(EXEEXT) iconv$(EXEEXT) core *.stackdump
140	$(RM) -r .libs _libs
141
142distclean : clean
143	$(RM) Makefile
144
145maintainer-clean : distclean
146
147force :
148
149