Marc Kupietz | d6f9c71 | 2016-03-16 11:50:56 +0100 | [diff] [blame] | 1 | CC = gcc |
| 2 | #Using -Ofast instead of -O3 might result in faster code, but is supported only by newer GCC versions |
Marc Kupietz | 2fa0866 | 2020-06-22 17:58:58 +0200 | [diff] [blame^] | 3 | CFLAGS = -lm -pthread -O3 -march=native -mtune=native -Wall -funroll-loops |
Marc Kupietz | d6f9c71 | 2016-03-16 11:50:56 +0100 | [diff] [blame] | 4 | #CFLAGS = -m64 -march=k8 -mtune=k8 -lm -pthread -O3 -Wall -funroll-loops |
Marc Kupietz | 2fa0866 | 2020-06-22 17:58:58 +0200 | [diff] [blame^] | 5 | STATICCDB=../../CollocatorDB |
| 6 | ROCKSDB=/usr/local/lib |
Marc Kupietz | d6f9c71 | 2016-03-16 11:50:56 +0100 | [diff] [blame] | 7 | |
Peter Fankhauser | 8c7f24e | 2020-04-19 15:26:17 +0200 | [diff] [blame] | 8 | all: word2vec word2vec1 cngram2vec weightedWord2vec wordless2vec word2phrase distance word-analogy compute-accuracy distance_txt distance_fast kmeans_txt |
Marc Kupietz | d6f9c71 | 2016-03-16 11:50:56 +0100 | [diff] [blame] | 9 | |
Marc Kupietz | 2fa0866 | 2020-06-22 17:58:58 +0200 | [diff] [blame^] | 10 | word2vec : word2vecExt.c makefile $(STATICCDB)/libcollocatordb.a |
| 11 | $(CC) $(CFLAGS) word2vecExt.c $(STATICCDB)/libcollocatordb.a $(ROCKSDB)/librocksdb.a -o word2vec -I$(STATICCDB) -L$(STATICCDB) -L/usr/local/lib -ldl -lstdc++ -lm -lrt -lsnappy -lz -lbz2 -llz4 -lzstd |
Peter Fankhauser | 8c7f24e | 2020-04-19 15:26:17 +0200 | [diff] [blame] | 12 | |
Marc Kupietz | 2fa0866 | 2020-06-22 17:58:58 +0200 | [diff] [blame^] | 13 | word2vec1 : word2vecExt1.c makefile $(STATICCDB)/libcollocatordb.a |
| 14 | $(CC) $(CFLAGS) word2vecExt1.c $(STATICCDB)/libcollocatordb.a $(ROCKSDB)/librocksdb.a -o word2vec1 -I$(STATICCDB) -L$(STATICCDB) -L/usr/local/lib -ldl -lstdc++ -lm -lrt -lsnappy -lz -lbz2 -llz4 -lzstd |
Marc Kupietz | 613edbf | 2018-01-11 21:38:03 +0100 | [diff] [blame] | 15 | |
Marc Kupietz | d6f9c71 | 2016-03-16 11:50:56 +0100 | [diff] [blame] | 16 | weightedWord2vec : weightedWord2vec.c |
| 17 | $(CC) weightedWord2vec.c -o weightedWord2vec $(CFLAGS) |
| 18 | cngram2vec : cngram2vec.c |
| 19 | $(CC) cngram2vec.c -o cngram2vec $(CFLAGS) |
| 20 | wordless2vec : wordless2vec.c |
| 21 | $(CC) wordless2vec.c -o wordless2vec $(CFLAGS) |
| 22 | word2phrase : word2phrase.c |
| 23 | $(CC) word2phrase.c -o word2phrase $(CFLAGS) |
| 24 | distance : distance.c |
| 25 | $(CC) distance.c -o distance $(CFLAGS) |
| 26 | distance_txt : distance_txt.c |
| 27 | $(CC) distance_txt.c -o distance_txt $(CFLAGS) |
| 28 | distance_fast : distance_fast.c |
| 29 | $(CC) distance_fast.c -o distance_fast $(CFLAGS) |
| 30 | kmeans_txt : kmeans_txt.c |
| 31 | $(CC) kmeans_txt.c -o kmeans_txt $(CFLAGS) |
| 32 | word-analogy : word-analogy.c |
| 33 | $(CC) word-analogy.c -o word-analogy $(CFLAGS) |
| 34 | compute-accuracy : compute-accuracy.c |
| 35 | $(CC) compute-accuracy.c -o compute-accuracy $(CFLAGS) |
| 36 | clean: |
Peter Fankhauser | 8c7f24e | 2020-04-19 15:26:17 +0200 | [diff] [blame] | 37 | rm -rf word2vec word2vec1 weightedWord2vec cngram2vec wiord2phrase distance word-analogy compute-accuracy distance_txt kmeans_txt |