Update copyright years
[m17n/m17n-lib.git] / src / Makefile.am
1 # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012
2 #   National Institute of Advanced Industrial Science and Technology (AIST)
3 #   Registration Number H15PRO112
4
5 # This file is part of the m17n library.
6
7 # The m17n library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public License
9 # as published by the Free Software Foundation; either version 2.1 of
10 # the License, or (at your option) any later version.
11
12 # The m17n library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 # Lesser General Public License for more details.
16
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with the m17n library; if not, write to the Free
19 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02110-1301, USA.
21
22 VINFO = -version-info @API_VERSION@
23
24 BASICBUILDS = libm17n-core.la libm17n.la libm17n-flt.la
25 if WITH_GUI
26 BUILD_LIBS = $(BASICBUILDS) libm17n-gui.la
27 else
28 BUILD_LIBS = $(BASICBUILDS)
29 endif
30
31 lib_LTLIBRARIES = $(BUILD_LIBS)
32
33 libm17n_core_la_SOURCES = \
34         character.h character.c \
35         chartab.h chartab.c \
36         database.h database.c \
37         internal.h \
38         plist.h plist.c \
39         m17n-core.h m17n-core.c \
40         m17n-misc.h \
41         mtext.h mtext.c \
42         symbol.h symbol.c \
43         textprop.h textprop.c \
44         mtext-lbrk.c mtext-wseg.c
45
46 libm17n_core_la_LIBADD = @XML2_LD_FLAGS@ @THAI_WORDSEG_LD_FLAGS@
47 libm17n_core_la_LDFLAGS = -export-dynamic ${VINFO}
48
49 libm17n_la_SOURCES = \
50         charset.h charset.c \
51         coding.h coding.c \
52         input.h input.c \
53         language.h language.c \
54         mlocale.h locale.c \
55         m17n.h m17n.c
56 libm17n_la_LIBADD = ${top_builddir}/src/libm17n-core.la -ldl
57 libm17n_la_LDFLAGS = -export-dynamic ${VINFO}
58
59 FLT_SOURCES = \
60         internal-flt.h \
61         m17n-flt.h m17n-flt.c
62
63 libm17n_flt_la_SOURCES = ${FLT_SOURCES}
64 libm17n_flt_la_LIBADD = ${top_builddir}/src/libm17n-core.la
65 libm17n_flt_la_LDFLAGS = -export-dynamic ${VINFO}
66
67 GUI_SOURCES = \
68         face.h face.c \
69         font.h font.c font-ft.c \
70         fontset.h fontset.c \
71         draw.c \
72         input-gui.c \
73         internal-gui.h \
74         m17n-gui.h m17n-gui.c
75
76 OPTIONAL_LD_FLAGS = \
77         @FREETYPE_LD_FLAGS@ \
78         @FRIBIDI_LD_FLAGS@ \
79         @OTF_LD_FLAGS@ \
80         @FONTCONFIG_LD_FLAGS@
81
82 libm17n_gui_la_SOURCES = ${GUI_SOURCES}
83 libm17n_gui_la_LIBADD = ${OPTIONAL_LD_FLAGS} ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la ${top_builddir}/src/libm17n-flt.la
84 libm17n_gui_la_LDFLAGS = -export-dynamic ${VINFO}
85
86 if WITH_GUI
87
88 moduledir = ${libdir}/@M17N_MODULE_DIR@
89 module_LTLIBRARIES = libm17n-X.la libm17n-gd.la
90 X_LD_FLAGS = ${X_PRE_LIBS} ${X_LIBS} @X11_LD_FLAGS@ ${X_EXTRA_LIBS}
91
92 libm17n_X_la_SOURCES = m17n-X.h m17n-X.c
93 libm17n_X_la_LIBADD = ${X_LD_FLAGS} @XFT2_LD_FLAGS@ @FONTCONFIG_LD_FLAGS@ ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la ${top_builddir}/src/libm17n-flt.la ${top_builddir}/src/libm17n-gui.la
94 libm17n_X_la_LDFLAGS = -avoid-version -module
95
96 libm17n_gd_la_SOURCES = m17n-gd.c
97 libm17n_gd_la_LIBADD = @GD_LD_FLAGS@ @FREETYPE_LD_FLAGS@ ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la ${top_builddir}/src/libm17n-flt.la ${top_builddir}/src/libm17n-gui.la
98 libm17n_gd_la_LDFLAGS = -avoid-version -module
99
100 endif
101
102 AM_CPPFLAGS = -DM17NDIR=\"@M17NDIR@\" -DM17N_MODULE_DIR=\"${libdir}/@M17N_MODULE_DIR@\" -DGETTEXTDIR=\"@GETTEXTDIR@\"
103
104 BASICHEADERS = m17n-core.h m17n.h m17n-misc.h m17n-flt.h
105 if WITH_GUI
106 include_HEADERS = $(BASICHEADERS) m17n-gui.h m17n-X.h
107 else
108 include_HEADERS = $(BASICHEADERS)
109 endif
110
111 SRC =   ${libm17n_core_la_SOURCES} \
112         ${libm17n_la_SOURCES} \
113         ${libm17n_gui_la_SOURCES} \
114         ${libm17n_X_la_SOURCES} \
115         ${libm17n_gd_la_SOURCES}
116
117 TAGS: ${SRC}
118         etags ${SRC}
119
120 if MAINTAINER_MODE
121 noinst_PROGRAMS = linkcore linkshell linkgui
122
123 linkcore_SOURCES = linkcore.c
124 linkcore_LDADD = ${top_builddir}/src/libm17n-core.la
125 linkcore_LDFLAGS = -static
126
127 linkshell_SOURCES = linkshell.c
128 linkshell_LDADD = ${top_builddir}/src/libm17n.la
129 linkshell_LDFLAGS = -static
130
131 linkgui_SOURCES = linkgui.c
132 linkgui_LDADD = ${top_builddir}/src/libm17n-gui.la
133 linkgui_LDFLAGS = -static
134 endif