summaryrefslogtreecommitdiff
path: root/klm/compile.sh
diff options
context:
space:
mode:
authorKenneth Heafield <kheafiel@cluster10.lti.ece.cmu.local>2011-04-06 17:19:05 -0400
committerKenneth Heafield <kheafiel@cluster10.lti.ece.cmu.local>2011-04-06 17:19:05 -0400
commitbca7c502d92150af9cd7a7fea389eb21e8852ab0 (patch)
treeaad0b83891d42ca2e9b24a593d9f3fdadd841fa1 /klm/compile.sh
parent302c5a9de27469e7b6fe44f7093619e04314e719 (diff)
Update build scripts and minor string_piece header changes
Diffstat (limited to 'klm/compile.sh')
-rwxr-xr-xklm/compile.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/klm/compile.sh b/klm/compile.sh
index d16dbe66..49e04db8 100755
--- a/klm/compile.sh
+++ b/klm/compile.sh
@@ -1,11 +1,14 @@
#!/bin/bash
#This is just an example compilation. You should integrate these files into your build system. I can provide boost jam if you want.
#If your code uses ICU, edit util/string_piece.hh and uncomment #define USE_ICU
+#I use zlib by default. If you don't want to depend on zlib, remove #define USE_ZLIB from util/file_piece.hh
+
+#don't need to use if compiling with moses Makefiles already
set -e
-for i in util/{ersatz_progress,exception,file_piece,murmur_hash,scoped,string_piece,mmap} lm/{exception,virtual_interface,ngram}; do
- g++ -I. -O3 -c $i.cc -o $i.o
+for i in util/{bit_packing,ersatz_progress,exception,file_piece,murmur_hash,scoped,mmap} lm/{binary_format,config,lm_exception,model,read_arpa,search_hashed,search_trie,trie,virtual_interface,vocab}; do
+ g++ -I. -O3 $CXXFLAGS -c $i.cc -o $i.o
done
-g++ -I. -O3 lm/ngram_build_binary.cc {lm,util}/*.o -o build_binary
-g++ -I. -O3 lm/ngram_query.cc {lm,util}/*.o -o query
+g++ -I. -O3 $CXXFLAGS lm/build_binary.cc {lm,util}/*.o -lz -o build_binary
+g++ -I. -O3 $CXXFLAGS lm/ngram_query.cc {lm,util}/*.o -lz -o query