summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
blob: 72d4211b04376f094c2d5a476871f7718db3b825 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
## Makefile.am -- Process this file with automake to produce Makefile.in
## Copyright (C) 2007 Peng Wu
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.

AUTOMAKE_OPTIONS = gnu subdir-objects
SUBDIRS = include storage lookup

EXTRA_DIST = libpinyin.ver libzhuyin.ver

MAINTAINERCLEANFILES = Makefile.in

CLEANFILES = *.bak

ACLOCAL = aclocal -I $(ac_aux_dir)

AM_CPPFLAGS = -I$(top_srcdir)/src \
                          -I$(top_srcdir)/src/include \
                          -I$(top_srcdir)/src/storage \
                          -I$(top_srcdir)/src/lookup \
                          @GLIB2_CFLAGS@

libpinyinincludedir	= $(includedir)/libpinyin-@VERSION@

libpinyininclude_HEADERS = pinyin.h

if ENABLE_LIBZHUYIN
libpinyininclude_HEADERS += zhuyin.h
endif

pinyin_SOURCES = \
               storage/phrase_index.cpp \
               storage/phrase_large_table2.cpp \
               storage/phrase_large_table3.cpp \
               storage/ngram.cpp \
               storage/tag_utility.cpp \
               storage/chewing_key.cpp \
               storage/pinyin_parser2.cpp \
               storage/zhuyin_parser2.cpp \
               storage/phonetic_key_matrix.cpp \
               storage/chewing_large_table.cpp \
               storage/chewing_large_table2.cpp \
               storage/table_info.cpp \
               storage/punct_table.cpp \
               lookup/pinyin_lookup2.cpp \
               lookup/phrase_lookup.cpp \
               lookup/lookup.cpp \
               lookup/phonetic_lookup.cpp \
               $(NULL)

if BERKELEYDB
pinyin_SOURCES += storage/ngram_bdb.cpp \
                  storage/phrase_large_table3_bdb.cpp \
                  storage/chewing_large_table2_bdb.cpp \
                  storage/punct_table_bdb.cpp
endif

if KYOTOCABINET
pinyin_SOURCES += storage/ngram_kyotodb.cpp \
                  storage/phrase_large_table3_kyotodb.cpp \
                  storage/chewing_large_table2_kyotodb.cpp \
                  storage/punct_table_kyotodb.cpp
endif


noinst_HEADERS		= pinyin_internal.h

lib_LTLIBRARIES = libpinyin.la

noinst_LIBRARIES = libpinyin_internal.a

libpinyin_la_SOURCES = $(pinyin_SOURCES) pinyin.cpp

libpinyin_la_LIBADD	= @GLIB2_LIBS@

if LLVMLD
## LLVM linker does not support --version-script,
##   use -exported_symbols_list instead
libpinyin_la_LDFLAGS = -Wl,-exported_symbols_list,$(srcdir)/libpinyin.exp \
              -version-info @LT_VERSION_INFO@
else
libpinyin_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libpinyin.ver \
			  -version-info @LT_VERSION_INFO@
endif

if WINDOWS
libpinyin_la_LDFLAGS += -no-undefined
endif

if ENABLE_LIBZHUYIN
lib_LTLIBRARIES     += libzhuyin.la

libzhuyin_la_SOURCES = $(pinyin_SOURCES) zhuyin.cpp

libzhuyin_la_LIBADD	= @GLIB2_LIBS@

if LLVMLD
## LLVM linker does not support --version-script,
##   use -exported_symbols_list instead
libzhuyin_la_LDFLAGS = -Wl,-exported_symbols_list,$(srcdir)/libzhuyin.exp \
              -version-info @LT_VERSION_INFO@
else
libzhuyin_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libzhuyin.ver \
			  -version-info @LT_VERSION_INFO@
endif

if WINDOWS
libzhuyin_la_LDFLAGS += -no-undefined
endif

endif

libpinyin_internal_a_SOURCES = pinyin_internal.cpp

libpinyin_internal_a_LIBADD = storage/libstorage.a lookup/liblookup.a

## Note:
## As libpinyin internal interface will change, only provides static library
##   to catch errors when compiling instead of running.