diff options
author | Determinant <[email protected]> | 2015-08-14 11:51:42 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-08-14 11:51:42 +0800 |
commit | 96a32415ab43377cf1575bd3f4f2980f58028209 (patch) | |
tree | 30a2d92d73e8f40ac87b79f6f56e227bfc4eea6e /kaldi_io/kaldi.mk | |
parent | c177a7549bd90670af4b29fa813ddea32cfe0f78 (diff) |
add implementation for kaldi io (by ymz)
Diffstat (limited to 'kaldi_io/kaldi.mk')
-rw-r--r-- | kaldi_io/kaldi.mk | 70 |
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 + |