diff options
author | Peng Wu <pwu@redhat.com> | 2019-11-28 16:05:48 +0800 |
---|---|---|
committer | Peng Wu <pwu@redhat.com> | 2019-11-28 16:20:19 +0800 |
commit | 648c5f863a43d3686dbea71a98ccd44a089a65c4 (patch) | |
tree | 5f2f5700db346adcc6bf9e253cfacb11208b86a1 /src | |
parent | 50a87b3efe0b10a9ae2ce989c0c0172e2984af32 (diff) | |
download | libpinyin-648c5f863a43d3686dbea71a98ccd44a089a65c4.tar.gz |
improve autoconf for libpinyin.la and libzhuyin.la
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 42 | ||||
-rw-r--r-- | src/include/Makefile.am | 6 | ||||
-rw-r--r-- | src/lookup/Makefile.am | 24 | ||||
-rw-r--r-- | src/storage/Makefile.am | 2 |
4 files changed, 51 insertions, 23 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 07153ce..f2b8f75 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ ## 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 +AUTOMAKE_OPTIONS = gnu subdir-objects SUBDIRS = include storage lookup EXTRA_DIST = libpinyin.ver libzhuyin.ver @@ -39,15 +39,47 @@ 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 \ + 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 +endif + +if KYOTOCABINET +pinyin_SOURCES += storage/ngram_kyotodb.cpp \ + storage/phrase_large_table3_kyotodb.cpp \ + storage/chewing_large_table2_kyotodb.cpp +endif + + noinst_HEADERS = pinyin_internal.h lib_LTLIBRARIES = libpinyin.la noinst_LIBRARIES = libpinyin_internal.a -libpinyin_la_SOURCES = pinyin.cpp +libpinyin_la_SOURCES = $(pinyin_SOURCES) pinyin.cpp -libpinyin_la_LIBADD = storage/libstorage.a lookup/liblookup.a @GLIB2_LIBS@ +libpinyin_la_LIBADD = @GLIB2_LIBS@ libpinyin_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libpinyin.ver \ -version-info @LT_VERSION_INFO@ @@ -55,9 +87,9 @@ libpinyin_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libpinyin.ver \ if ENABLE_LIBZHUYIN lib_LTLIBRARIES += libzhuyin.la -libzhuyin_la_SOURCES = zhuyin.cpp +libzhuyin_la_SOURCES = $(pinyin_SOURCES) zhuyin.cpp -libzhuyin_la_LIBADD = storage/libstorage.la lookup/liblookup.la @GLIB2_LIBS@ +libzhuyin_la_LIBADD = @GLIB2_LIBS@ libzhuyin_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libzhuyin.ver \ -version-info @LT_VERSION_INFO@ diff --git a/src/include/Makefile.am b/src/include/Makefile.am index 8f9b417..f6c6de3 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am @@ -14,11 +14,11 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see <http://www.gnu.org/licenses/>. -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in libpinyinincludedir = $(includedir)/libpinyin-@VERSION@ libpinyininclude_HEADERS= novel_types.h -noinst_HEADERS = memory_chunk.h \ - stl_lite.h +noinst_HEADERS = memory_chunk.h \ + stl_lite.h diff --git a/src/lookup/Makefile.am b/src/lookup/Makefile.am index a6000cb..75a7ae5 100644 --- a/src/lookup/Makefile.am +++ b/src/lookup/Makefile.am @@ -17,22 +17,20 @@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = -I$(top_srcdir)/src/include \ - -I$(top_srcdir)/src/storage \ - @GLIB2_CFLAGS@ + -I$(top_srcdir)/src/storage \ + @GLIB2_CFLAGS@ noinst_HEADERS = lookup.h \ - pinyin_lookup2.h \ - phrase_lookup.h \ - phonetic_lookup.h \ - phonetic_lookup_linear.h \ - phonetic_lookup_heap.h + pinyin_lookup2.h \ + phrase_lookup.h \ + phonetic_lookup.h \ + phonetic_lookup_linear.h \ + phonetic_lookup_heap.h noinst_LIBRARIES = liblookup.a -liblookup_a_CXXFLAGS = "-fPIC" - -liblookup_a_SOURCES = pinyin_lookup2.cpp \ - phrase_lookup.cpp \ - lookup.cpp \ - phonetic_lookup.cpp +liblookup_a_SOURCES = pinyin_lookup2.cpp \ + phrase_lookup.cpp \ + lookup.cpp \ + phonetic_lookup.cpp diff --git a/src/storage/Makefile.am b/src/storage/Makefile.am index 5e9d1d1..b64b9ea 100644 --- a/src/storage/Makefile.am +++ b/src/storage/Makefile.am @@ -66,8 +66,6 @@ noinst_HEADERS = chewing_enum.h \ noinst_LIBRARIES = libstorage.a -libstorage_a_CXXFLAGS = "-fPIC" - libstorage_a_SOURCES = phrase_index.cpp \ phrase_large_table2.cpp \ phrase_large_table3.cpp \ |