# Makefile.am -- example level Makefile for the m17n library.
-# Copyright (C) 2003, 2004
+# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010
# National Institute of Advanced Industrial Science and Technology (AIST)
# Registration Number H15PRO112
# You should have received a copy of the GNU Lesser General Public
# License along with the m17n library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307, USA.
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
## Process this file with Automake to create Makefile.in
## Note: Source files have preifx "m" but executables have prefix
## "m17n-" to avoid confliction of program names.
-bin_PROGRAMS = m17n-conv
+BASICPROGS = m17n-conv
if WITH_GUI
-bin_PROGRAMS += m17n-view m17n-date m17n-dump m17n-edit
+bin_PROGRAMS = $(BASICPROGS) m17n-view m17n-date m17n-dump m17n-edit
+else
+bin_PROGRAMS = $(BASICPROGS)
endif
-common_ldflags = ${top_srcdir}/src/libm17n-core.la ${top_srcdir}/src/libm17n.la
-common_ldflags_gui = ${common_ldflags} ${top_srcdir}/src/libm17n-gui.la
+INCLUDES = -I$(top_srcdir)/src
+
+common_ldflags = ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la
+common_ldflags_gui = ${common_ldflags} ${top_builddir}/src/libm17n-flt.la ${top_builddir}/src/libm17n-gui.la
AM_CPPFLAGS=@CONFIG_FLAGS@
m17n_date_SOURCES = mdate.c
# External modules used by the above input methods.
-VINFO = -version-info @API_VERSION@
+moduledir = ${libdir}/@M17N_MODULE_DIR@
-BUILD_LIBS = libmimx-anthy.la
+BASICBUILDS = libmimx-anthy.la
if WITH_GUI
-BUILD_LIBS += libmimx-ispell.la
+BUILD_LIBS = $(BASICBUILDS) libmimx-ispell.la
+else
+BUILD_LIBS = $(BASICBUILDS)
endif
-lib_LTLIBRARIES = $(BUILD_LIBS)
+module_LTLIBRARIES = $(BUILD_LIBS)
libmimx_ispell_la_SOURCES = mimx-ispell.c
libmimx_ispell_la_LIBADD = ${common_ldflags_gui}
-libmimx_ispell_la_LDFLAGS = -module ${VINFO}
+libmimx_ispell_la_LDFLAGS = -avoid-version -module
libmimx_anthy_la_SOURCES = mimx-anthy.c
libmimx_anthy_la_LIBADD = ${common_ldflags} @ANTHY_LD_FLAGS@
-libmimx_anthy_la_LDFLAGS = -module ${VINFO}
+libmimx_anthy_la_LDFLAGS = -avoid-version -module
if MAINTAINER_MODE