(INCLUDES): Set -I$(top_srcdir)/src.
[m17n/m17n-lib.git] / example / Makefile.am
1 # Makefile.am -- example level Makefile for the m17n library.
2 # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010
3 #   National Institute of Advanced Industrial Science and Technology (AIST)
4 #   Registration Number H15PRO112
5
6 # This file is part of the m17n library.
7
8 # The m17n library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public License
10 # as published by the Free Software Foundation; either version 2.1 of
11 # the License, or (at your option) any later version.
12
13 # The m17n library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 # Lesser General Public License for more details.
17
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with the m17n library; if not, write to the Free
20 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 # Boston, MA 02110-1301, USA.
22
23 ## Process this file with Automake to create Makefile.in
24
25 ## Note: Source files have preifx "m" but executables have prefix
26 ## "m17n-" to avoid confliction of program names.
27
28 BASICPROGS = m17n-conv
29 if WITH_GUI
30 bin_PROGRAMS = $(BASICPROGS) m17n-view m17n-date m17n-dump m17n-edit
31 else
32 bin_PROGRAMS = $(BASICPROGS)
33 endif
34
35 INCLUDES = -I$(top_srcdir)/src
36
37 common_ldflags = ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la
38 common_ldflags_gui = ${common_ldflags} ${top_builddir}/src/libm17n-flt.la ${top_builddir}/src/libm17n-gui.la
39 AM_CPPFLAGS=@CONFIG_FLAGS@
40
41 m17n_date_SOURCES = mdate.c
42 m17n_date_LDADD = ${common_ldflags}
43
44 m17n_conv_SOURCES = mconv.c
45 m17n_conv_LDADD = ${common_ldflags}
46
47 X_LD_FLAGS = ${X_PRE_LIBS} ${X_LIBS} @XAW_LD_FLAGS@ @X11_LD_FLAGS@ ${X_EXTRA_LIBS}
48
49 m17n_edit_SOURCES = medit.c
50 m17n_edit_LDADD = ${X_LD_FLAGS} ${common_ldflags_gui} -ldl
51
52 m17n_view_SOURCES = mview.c
53 m17n_view_LDADD = ${X_LD_FLAGS} ${common_ldflags_gui}
54
55 m17n_dump_SOURCES = mdump.c
56 m17n_dump_LDADD = @GD_LD_FLAGS@ ${common_ldflags_gui}
57
58 # Input method data files.
59
60 pkgdatadir=$(datadir)/m17n
61
62 EXTRA_DIST = \
63         .gdbinit .gdb.util \
64         HELLO.utf8 HELLO.xml HELLO-ja.utf8 HELLO-ja.xml HELLO.html M17NEdit.ja
65
66 # External modules used by the above input methods.
67
68 moduledir = ${libdir}/@M17N_MODULE_DIR@
69
70 BASICBUILDS = libmimx-anthy.la
71 if WITH_GUI
72 BUILD_LIBS = $(BASICBUILDS) libmimx-ispell.la 
73 else
74 BUILD_LIBS = $(BASICBUILDS)
75 endif
76 module_LTLIBRARIES = $(BUILD_LIBS)
77
78 libmimx_ispell_la_SOURCES = mimx-ispell.c
79 libmimx_ispell_la_LIBADD = ${common_ldflags_gui}
80 libmimx_ispell_la_LDFLAGS = -avoid-version -module
81 libmimx_anthy_la_SOURCES = mimx-anthy.c
82 libmimx_anthy_la_LIBADD = ${common_ldflags} @ANTHY_LD_FLAGS@ 
83 libmimx_anthy_la_LDFLAGS = -avoid-version -module
84
85 if MAINTAINER_MODE
86
87 # Special targets to test the m17n library with Purify.
88
89 PURIFY=/usr/local/rational/releases/purify.sol.2002.05.00/purify
90
91 purify_medit: medit ../src/.libs/libm17n-core.so ../src/.libs/libm17n.so ../src/.libs/libm17n-X.so linebreak.c
92         ${PURIFY} gcc -g medit.o linebreak.o -lXaw -lXmu -L/usr/X11R6/lib -R/usr/X11R6/lib -lSM -lICE -lX11 -lXt -L../src/.libs -lm17n-core -lm17n -lm17n-X -ldl
93
94 purify_mdate: mdate.o ../src/.libs/libm17n.so ../src/.libs/libm17n-X.so
95         ${PURIFY} gcc -g mdate.o -lXaw -lXmu -L/usr/X11R6/lib -R/usr/X11R6/lib -lSM -lICE -lX11 -lXt -L../src/.libs -lm17n -lm17n-X -ldl
96
97 endif