-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.linux
78 lines (57 loc) · 2.3 KB
/
Makefile.linux
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
CFLAGS=-Wall -c -std=gnu99 -O0 -g
LFLAGS=-lbsd -lm
TOOL_NBPERF=nbperf
TOOL_SED=sed
CC=clang
all: spell dictionary soundex metaphone spell2 bigspell
spell: libspell.o spell.o rb.o mi_vector_hash.o trie.o look.o
${CC} -o spell libspell.o spell.o rb.o mi_vector_hash.o trie.o look.o ${LFLAGS}
bigspell: libspell.o bigspell.o rb.o mi_vector_hash.o trie.o look.o
${CC} -o bigspell libspell.o bigspell.o rb.o mi_vector_hash.o trie.o look.o ${LFLAGS}
spell2: libspell.o spell2.o rb.o mi_vector_hash.o trie.o look.o
${CC} -o spell2 libspell.o spell2.o rb.o mi_vector_hash.o trie.o look.o ${LFLAGS}
dictionary: dictionary.o libspell.o rb.o mi_vector_hash.o trie.o spellutils.o look.o
${CC} -o dictionary libspell.o dictionary.o rb.o mi_vector_hash.o trie.o spellutils.o look.o ${LFLAGS}
soundex: soundex.o libspell.o rb.o mi_vector_hash.o trie.o look.o
${CC} -o soundex soundex.o libspell.o rb.o mi_vector_hash.o trie.o look.o ${LFLAGS}
metaphone: metaphone.o libspell.o rb.o mi_vector_hash.o trie.o look.o
${CC} -o metaphone metaphone.o libspell.o rb.o mi_vector_hash.o trie.o look.o ${LFLAGS}
look.o: look.c
${CC} ${CFLAGS} look.c
spell.o: spell.c
${CC} ${CFLAGS} spell.c
spell2.o: spell2.c
${CC} ${CFLAGS} spell2.c
dictionary.o: dictionary.c
${CC} ${CFLAGS} dictionary.c
libspell.o: libspell.c mi_vector_hash.c
${CC} ${CFLAGS} libspell.c mi_vector_hash.c
rb.o: rb.c
${CC} ${CFLAGS} rb.c
trie.o: trie.c
${CC} ${CFLAGS} trie.c
spellutils.o: spellutils.c
${CC} ${CFLAGS} spellutils.c
metaphone.o: metaphone.c
${CC} ${CFLAGS} metaphone.c
bigspell.o: bigspell.c
${CC} ${CFLAGS} bigspell.c
mi_vector_hash.o: mi_vector_hash.c
${CC} ${CFLAGS} mi_vector_hash.c
libspell.c: websters.c
#websters.c: dict/web3
# ( set -e; ${TOOL_NBPERF} -L ANSI-C -H dict_hash dict/web3; \
# echo 'static const char *dict[] = {'; \
# ${TOOL_SED} -e 's|^\(.*\)$$| "\1",|' dict/web3; \
# echo '};' \
# ) > websters.c
websters.c: dict/web3
( set -e; \
${TOOL_NBPERF} -n dict_hash -s -p dict/web3; \
echo 'static const char *dict[] = {'; \
${TOOL_SED} -e 's|^\(.*\)$$| "\1",|' dict/web3; \
echo '};' \
) > websters.c; \
sed -i '2 a void mi_vector_hash(const void * restrict , size_t , uint32_t ,uint32_t hashes[3]);' websters.c;
clean:
rm -f *.o spell spell2 dictionary websters.c