summaryrefslogtreecommitdiff
path: root/kaldi_io/kaldi.mk
diff options
context:
space:
mode:
authorYimmon Zhuang <[email protected]>2015-08-14 17:40:18 +0800
committerYimmon Zhuang <[email protected]>2015-08-14 17:40:18 +0800
commitdfdd17afc2e984ec6c32ea01290f5c76309a456a (patch)
treebfea20e97c200cf734021e3756d749c892e658a4 /kaldi_io/kaldi.mk
parent70d52a3dc6c120fe76e1109e844303e2f5e61872 (diff)
parent10cce5f6a5c9e2f8e00d5a2a4d87c9cb7c26bf4c (diff)
solve dependencies
Diffstat (limited to 'kaldi_io/kaldi.mk')
-rw-r--r--kaldi_io/kaldi.mk70
1 files changed, 70 insertions, 0 deletions
diff --git a/kaldi_io/kaldi.mk b/kaldi_io/kaldi.mk
new file mode 100644
index 0000000..4a397f0
--- /dev/null
+++ b/kaldi_io/kaldi.mk
@@ -0,0 +1,70 @@
+# This file was generated using the following command:
+# ./configure
+
+# Rules that enable valgrind debugging ("make valgrind")
+
+valgrind: .valgrind
+
+.valgrind:
+ echo -n > valgrind.out
+ for x in $(TESTFILES); do echo $$x>>valgrind.out; valgrind ./$$x >/dev/null 2>> valgrind.out; done
+ ! ( grep 'ERROR SUMMARY' valgrind.out | grep -v '0 errors' )
+ ! ( grep 'definitely lost' valgrind.out | grep -v -w 0 )
+ rm valgrind.out
+ touch .valgrind
+
+
+CONFIGURE_VERSION := 2
+OPENFSTLIBS = -L/slwork/users/wd007/src/kaldi/tools/openfst/lib -lfst
+OPENFSTLDFLAGS = -Wl,-rpath=/slwork/users/wd007/src/kaldi/tools/openfst/lib
+FSTROOT = /slwork/users/wd007/src/kaldi/tools/openfst
+ATLASINC = /slwork/users/wd007/src/kaldi/tools/ATLAS/include
+ATLASLIBS = -L/usr/lib -llapack -lcblas -latlas -lf77blas
+# You have to make sure ATLASLIBS is set...
+
+ifndef FSTROOT
+$(error FSTROOT not defined.)
+endif
+
+ifndef ATLASINC
+$(error ATLASINC not defined.)
+endif
+
+ifndef ATLASLIBS
+$(error ATLASLIBS not defined.)
+endif
+
+
+CXXFLAGS = -msse -msse2 -Wall -I.. \
+ -fPIC \
+ -DKALDI_DOUBLEPRECISION=0 -DHAVE_POSIX_MEMALIGN \
+ -Wno-sign-compare -Wno-unused-local-typedefs -Winit-self \
+ -DHAVE_EXECINFO_H=1 -rdynamic -DHAVE_CXXABI_H \
+ -DHAVE_ATLAS -I$(ATLASINC) \
+ -I$(FSTROOT)/include \
+ $(EXTRA_CXXFLAGS) \
+ -g # -O0 -DKALDI_PARANOID
+
+ifeq ($(KALDI_FLAVOR), dynamic)
+CXXFLAGS += -fPIC
+endif
+
+LDFLAGS = -rdynamic $(OPENFSTLDFLAGS)
+LDLIBS = $(EXTRA_LDLIBS) $(OPENFSTLIBS) $(ATLASLIBS) -lm -lpthread -ldl
+CC = g++
+CXX = g++
+AR = ar
+AS = as
+RANLIB = ranlib
+
+#Next section enables CUDA for compilation
+CUDA = true
+CUDATKDIR = /usr/local/cuda
+
+CUDA_INCLUDE= -I$(CUDATKDIR)/include
+CUDA_FLAGS = -g -Xcompiler -fPIC --verbose --machine 64 -DHAVE_CUDA
+
+CXXFLAGS += -DHAVE_CUDA -I$(CUDATKDIR)/include
+CUDA_LDFLAGS += -L$(CUDATKDIR)/lib64 -Wl,-rpath,$(CUDATKDIR)/lib64
+CUDA_LDLIBS += -lcublas -lcudart #LDLIBS : The libs are loaded later than static libs in implicit rule
+