-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile.am
148 lines (127 loc) · 3.28 KB
/
Makefile.am
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Point to our macro directory and pick up user flags from the environment
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
# -- bin/ ----------------------------
bin_PROGRAMS = \
bin/libcangjie_cli \
bin/libcangjie_dbbuilder \
bin/libcangjie_char_type_builder \
bin/libcangjie_freqdbbuilder \
bin/libcangjie_classicfreqdbbuilder \
$(NULL)
bin_libcangjie_cli_SOURCES = \
src/cli.cpp \
$(NULL)
bin_libcangjie_cli_LDADD = $(DBCXX_LIBS) libutil.la libcangjie.la
bin_libcangjie_dbbuilder_SOURCES = \
src/dbbuilder.cpp \
$(NULL)
bin_libcangjie_dbbuilder_LDADD = $(DBCXX_LIBS) libutil.la
bin_libcangjie_char_type_builder_SOURCES = \
src/char_type_builder.cpp \
$(NULL)
bin_libcangjie_char_type_builder_LDADD = $(DBCXX_LIBS) libutil.la
bin_libcangjie_classicfreqdbbuilder_SOURCES = \
src/classicfreqdbbuilder.cpp \
$(NULL)
bin_libcangjie_classicfreqdbbuilder_LDADD = $(DBCXX_LIBS) libutil.la
bin_libcangjie_freqdbbuilder_SOURCES = \
src/freqbuilder.cpp \
$(NULL)
bin_libcangjie_freqdbbuilder_LDADD = $(DBCXX_LIBS)
# -- src/ ----------------------------
lib_LTLIBRARIES = libcangjie.la
libcangjie_la_SOURCES = \
src/fullchar.cpp \
src/chchar.cpp \
src/cangjie.cpp \
$(NULL)
libcangjie_la_CXXFLAGS = -I./src
libcangjie_la_LDFLAGS = -version-info $(CANGJIE_SO_VERSION)
libcangjie_la_LIBADD = $(DBCXX_LIBS) libutil.la
noinst_LTLIBRARIES = libutil.la
libutil_la_SOURCES = \
src/util.cpp \
src/util.h \
$(NULL)
libutil_la_CXXFLAGS = -I./src
libcangjie_la_include_HEADERS = \
src/cangjie.h \
src/chchar.h \
$(NULL)
libcangjie_la_includedir = $(includedir)/cangjie
src/cangjieconfig.h: src/cangjieconfig.h.in Makefile
$(MKDIR_P) src
sed -e 's&@PKGDATADIR@&$(pkgdatadir)&g' $< > $@
# -- data/ ---------------------------
pkgconfig_DATA = \
data/cangjie.pc \
$(NULL)
pkgconfigdir = $(libdir)/pkgconfig
data/%.mb: bin/libcangjie_dbbuilder tables/%.txt
$(MKDIR_P) data
$^ $@ >/dev/null
data/wordfreq.mb: bin/libcangjie_freqdbbuilder freq-data/frequency.txt
$(MKDIR_P) data
$^ $@ >/dev/null
data/classicfreq.mb: bin/libcangjie_classicfreqdbbuilder freq-data/classic-frequency.txt
$(MKDIR_P) data
$^ $@ >/dev/null
data/tc.mb: bin/libcangjie_char_type_builder filter/tc.txt
$(MKDIR_P) data
$^ $@ >/dev/null
data/sc.mb: bin/libcangjie_char_type_builder filter/sc.txt
$(MKDIR_P) data
$^ $@ >/dev/null
libcangjie_data_DATA = \
data/cj3-cc.mb \
data/cj3-cjk.mb \
data/cj3-sc.mb \
data/cj3-tc.mb \
data/cj5-cc.mb \
data/cj5-cjk.mb \
data/cj5-sc.mb \
data/cj5-tc.mb \
data/wordfreq.mb \
data/classicfreq.mb \
data/tc.mb \
data/sc.mb \
$(NULL)
libcangjie_datadir = $(pkgdatadir)
# -- Common --------------------------
BUILT_SOURCES = \
src/cangjieconfig.h \
$(NULL)
CLEANFILES = \
__db.* \
data/*.mb \
data/*.pc \
src/cangjieconfig.h \
$(NULL)
EXTRA_DIST = \
autogen.sh \
README.md \
src/cangjieconfig.h.in \
tables/cj3-cc.txt \
tables/cj3-cjk.txt \
tables/cj3-sc.txt \
tables/cj3-tc.txt \
tables/cj5-cc.txt \
tables/cj5-cjk.txt \
tables/cj5-sc.txt \
tables/cj5-tc.txt \
tables/jp.txt \
tables/COPYING.tables \
tables/README.tables \
tests/testdbs.pl \
freq-data/README \
freq-data/countfreq.sh \
freq-data/getcorpus.cpp \
freq-data/frequency.txt \
freq-data/classic-frequency.txt \
freq-data/get_classic_freq.py \
filter/tc.txt \
filter/sc.txt \
$(NULL)
TESTS = \
tests/testdbs.pl \
$(NULL)