-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (39 loc) · 1.3 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
# x86, x86_64, mips, mips64, armeabi, armeabi-v7a, arm64-v8a
PLATFORM=x86
ICU4J_MAJOR=60
ICU4J_MINOR=2
SQLITE_VERSION=3.21.0
ICU_JAR=icu4j-$(ICU4J_MAJOR)_$(ICU4J_MINOR).jar
#SQLITE_JAR=sqlite-jdbc-$(SQLITE_VERSION).jar
#/usr/local/lib/libsqlitejdbc.so
SQLITE_JAR=/usr/local/share/java/classes/sqlitejdbc-native.jar
WST_CLASSES=Expression.class Helper.class LetterSet.class Vocabulary.class VocabularySearch.class VocabularyTrainer.class
WST_LIBS=$(ICU_JAR) $(SQLITE_JAR)
all: $(WST_CLASSES) wordset.db
$(WST_CLASSES): $(WST_LIBS)
.PHONY: clean search train
CLASSPATH=$(ICU_JAR):$(SQLITE_JAR):.
clean:
rm -f *.class
search: $(WST_CLASSES)
java -cp $(CLASSPATH) VocabularySearch
train: $(WST_CLASSES)
java -cp $(CLASSPATH) VocabularyTrainer german.words
%.class: %.java
javac -cp $(CLASSPATH) -encoding UTF-8 -g $<
$(ICU_JAR):
curl -OL http://download.icu-project.org/files/icu4j/$(ICU4J_MAJOR).$(ICU4J_MINOR)/$@
$(SQLITE_JAR):
curl -OL https://bitbucket.org/xerial/sqlite-jdbc/downloads/$@
wordset.db: 00_create_db.sql
true | sqlite3 $@ -init $<
#libsqliteX.so: $(SQLITE_AAR)
# unzip -DD -j -o $< jni/$(PLATFORM)/$@
a.words: german.words
grep -i '^[aä]' $^ >$@
b.words: german.words
grep -i '^b' $^ >$@
a100.words: a.words
head -100 $^ >$@
a10.words: a.words
head -10 $^ >$@