forked from hime-ime/hime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
117 lines (83 loc) · 2.81 KB
/
Makefile
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
include ../config.mak
SRC_DIR = ../src
IM_CLIENT_DIR = $(SRC_DIR)/im-client
.SUFFIXES: .kbmsrc .kbm .cin .gtab
CFLAGS+= -DUNIX=1 $(WALL) $(OPTFLAGS) $(GTKINC) -I$(SRC_DIR)
export HIME_NO_RELOAD=
DATA=pho.tab2 tsin32.idx gtab.list \
cj.gtab ar30.gtab ar30-big.gtab array40.gtab pinyin.gtab jyutping.gtab cj5.gtab \
et.kbm et26.kbm zo.kbm pinyin.kbm dvorak.kbm mitac.kbm colemak.kbm \
ibm.kbm tsin32 hsu.kbm pho-huge.tab2 simplex.gtab symbols.gtab russian.gtab \
greek.gtab cj-punc.gtab latin-letters.gtab tsin-1.src pin-juyin.xlt \
t2s.dat s2t.dat cj543.gtab s-tsin32 s-tsin32.idx s-pho.tab2 s-pho-huge.tab2 \
pinyin-no-tone.kbm simplex-punc.gtab hangul.gtab vims.gtab
DATAKEEP = symbol-table phrase.table phrase-ctrl.table
PHO_A2D = $(SRC_DIR)/hime-phoa2d
TS_A2D = $(SRC_DIR)/hime-tsa2d32
CIN2GTAB = $(SRC_DIR)/hime-cin2gtab
KBMCV = $(SRC_DIR)/kbmcv
PIN_JUYIN = $(SRC_DIR)/pin-juyin
ifeq ($(USE_TSIN),Y)
REMOVE_TSIN = keep_tsin
endif
ifeq ($(USE_TSIN),N)
REMOVE_TSIN = remove_tsin
endif
ifeq ($(INSTALL_DFSG_INCOMPATIBLE),Y)
DATA += dayi3.gtab
endif
all: $(DATA)
$(PHO_A2D):
$(MAKE) -C $(SRC_DIR) hime-phoa2d
$(TS_A2D):
$(MAKE) -C $(SRC_DIR) hime-tsa2d32
$(CIN2GTAB):
$(MAKE) -C $(SRC_DIR) hime-cin2gtab
$(KBMCV):
$(MAKE) -C $(SRC_DIR) kbmcv
$(PIN_JUYIN):
$(MAKE) -C $(SRC_DIR) pin-juyin
tsin32: tsin.src $(TS_A2D)
export LD_LIBRARY_PATH=$(IM_CLIENT_DIR); $(TS_A2D) $<
tsin32.idx: tsin32
s-tsin32: s-tsin.src $(TS_A2D)
export LD_LIBRARY_PATH=$(IM_CLIENT_DIR); $(TS_A2D) $< $@
s-tsin32.idx: s-tsin32
pho.tab2: pho.tab2.src $(PHO_A2D)
export LD_LIBRARY_PATH=$(IM_CLIENT_DIR); $(PHO_A2D) $<
s-pho.tab2: s-pho.tab2.src $(PHO_A2D)
export LD_LIBRARY_PATH=$(IM_CLIENT_DIR); $(PHO_A2D) $<
pho-huge.tab2: pho-huge.tab2.src $(PHO_A2D)
export LD_LIBRARY_PATH=$(IM_CLIENT_DIR); $(PHO_A2D) $<
s-pho-huge.tab2: s-pho-huge.tab2.src $(PHO_A2D)
export LD_LIBRARY_PATH=$(IM_CLIENT_DIR); $(PHO_A2D) $<
t2s.dat: t2s-file t2s-file.table
./t2s-file
s2t.dat: t2s-file
pin-juyin.xlt: $(PIN_JUYIN) pin-juyin.src
$(PIN_JUYIN)
extr1: extr1.c
@echo "building $@ ..."
$(CC) $(CFLAGS) $< $(SRC_DIR)/util.o $(SRC_DIR)/locale.o -o $@ $(LDFLAGS)
t2s-file: t2s-file.c
@echo "building $@ ..."
$(CC) $(CFLAGS) $< $(SRC_DIR)/util.o $(SRC_DIR)/locale.o -o $@ $(LDFLAGS)
tsin-1.src: extr1
./extr1 > $@
.cin.gtab: $(CIN2GTAB)
$(CIN2GTAB) $<
.kbmsrc.kbm: $(KBMCV)
$(KBMCV) $<
keep_tsin: gtab.list.in
cp gtab.list.in gtab.list
remove_tsin: gtab.list.in
grep -v TSIN gtab.list.in > gtab.list
gtab.list: $(REMOVE_TSIN)
touch gtab.list
install:
install -d "$(HIME_TABLE_DIR_i)"
install -m 644 $(DATA) $(DATAKEEP) "$(HIME_TABLE_DIR_i)"
# cd "$(HIME_TABLE_DIR_i)"; bzip2 -f *.gtab
clean:
@echo "clean up"
@rm -f *~ tags core.* $(DATA) *.gtab extr1 t2s-file tsin-1.src tsin-gtabidx* tsin-ch-idx gtab.list