blob: cfe8e2132bc8feb140cdf84724473d54b35c0877 [file] [log] [blame]
Marc Kupietzd6f9c712016-03-16 11:50:56 +01001CC = gcc
2#Using -Ofast instead of -O3 might result in faster code, but is supported only by newer GCC versions
3CFLAGS = -lm -pthread -O3 -march=k8 -mtune=k8 -Wall -funroll-loops
4#CFLAGS = -m64 -march=k8 -mtune=k8 -lm -pthread -O3 -Wall -funroll-loops
5
6
Peter Fankhauser8c7f24e2020-04-19 15:26:17 +02007all: word2vec word2vec1 cngram2vec weightedWord2vec wordless2vec word2phrase distance word-analogy compute-accuracy distance_txt distance_fast kmeans_txt
Marc Kupietzd6f9c712016-03-16 11:50:56 +01008
Peter Fankhauser8c7f24e2020-04-19 15:26:17 +02009word2vec : word2vecExt.c makefile /vol/work/kupietz/Work2/kl/trunk/CollocatorDB/libcollocatordb.a
10 $(CC) $(CFLAGS) word2vecExt.c /vol/work/kupietz/Work2/kl/trunk/CollocatorDB/libcollocatordb.a /vol/work/kupietz/rocksdb/librocksdb.a -o word2vec -I/vol/work/kupietz/Work2/kl/trunk/CollocatorDB -L/vol/work/kupietz/Work2/kl/trunk/CollocatorDB -L/usr/local/lib -lstdc++ -lm -lrt -lsnappy -lz -lbz2 -llz4 -lzstd
11
12word2vec1 : word2vecExt1.c makefile /vol/work/kupietz/Work2/kl/trunk/CollocatorDB/libcollocatordb.a
13 $(CC) $(CFLAGS) word2vecExt1.c /vol/work/kupietz/Work2/kl/trunk/CollocatorDB/libcollocatordb.a /vol/work/kupietz/rocksdb/librocksdb.a -o word2vec1 -I/vol/work/kupietz/Work2/kl/trunk/CollocatorDB -L/vol/work/kupietz/Work2/kl/trunk/CollocatorDB -L/usr/local/lib -lstdc++ -lm -lrt -lsnappy -lz -lbz2 -llz4 -lzstd
Marc Kupietz613edbf2018-01-11 21:38:03 +010014
Marc Kupietzd6f9c712016-03-16 11:50:56 +010015weightedWord2vec : weightedWord2vec.c
16 $(CC) weightedWord2vec.c -o weightedWord2vec $(CFLAGS)
17cngram2vec : cngram2vec.c
18 $(CC) cngram2vec.c -o cngram2vec $(CFLAGS)
19wordless2vec : wordless2vec.c
20 $(CC) wordless2vec.c -o wordless2vec $(CFLAGS)
21word2phrase : word2phrase.c
22 $(CC) word2phrase.c -o word2phrase $(CFLAGS)
23distance : distance.c
24 $(CC) distance.c -o distance $(CFLAGS)
25distance_txt : distance_txt.c
26 $(CC) distance_txt.c -o distance_txt $(CFLAGS)
27distance_fast : distance_fast.c
28 $(CC) distance_fast.c -o distance_fast $(CFLAGS)
29kmeans_txt : kmeans_txt.c
30 $(CC) kmeans_txt.c -o kmeans_txt $(CFLAGS)
31word-analogy : word-analogy.c
32 $(CC) word-analogy.c -o word-analogy $(CFLAGS)
33compute-accuracy : compute-accuracy.c
34 $(CC) compute-accuracy.c -o compute-accuracy $(CFLAGS)
35clean:
Peter Fankhauser8c7f24e2020-04-19 15:26:17 +020036 rm -rf word2vec word2vec1 weightedWord2vec cngram2vec wiord2phrase distance word-analogy compute-accuracy distance_txt kmeans_txt