diff options
Diffstat (limited to 'kaldi_io/Makefile')
-rw-r--r-- | kaldi_io/Makefile | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/kaldi_io/Makefile b/kaldi_io/Makefile index 59393cf..75ad48e 100644 --- a/kaldi_io/Makefile +++ b/kaldi_io/Makefile @@ -1,4 +1,6 @@ -.PHONY: kaldi +# Change KDIR to `kaldi-trunk' path (Kaldi must be compiled with --share) +KDIR := /slfs6/users/ymz09/kaldi/ + SHELL := /bin/bash BUILD_DIR := $(CURDIR)/build INC_PATH := $(LUA_BINDIR)/../include/ @@ -10,7 +12,7 @@ INCLUDE := -I $(LUA_INCDIR) -I $(INC_PATH) -DLUA_USE_APICHECK SUBDIR := src OBJ_DIR := $(BUILD_DIR)/objs LUA_DIR := $(INST_LUADIR)/kaldi_io -KALDIINCLUDE := -I src/tools/ATLAS/include/ -I src/kaldi/ -I src/tools/openfst/include/ +KALDIINCLUDE := -I $(KDIR)/tools/ATLAS/include/ -I $(KDIR)/tools/openfst/include/ -I $(KDIR)/src/ OBJS := $(addprefix $(OBJ_DIR)/,$(OBJS)) LIBS := $(addprefix $(INST_LIBDIR)/,$(LIBS)) @@ -22,18 +24,15 @@ LIB_PATH := $(LUA_BINDIR)/../lib build: $(OBJ_DIR) $(OBJ_SUBDIR) $(OBJS) $(OBJ_DIR)/src/test install: $(LUA_DIR) $(LUA_SUBDIR) $(LUA_LIBS) $(LIBS) -include kaldi.mk - -KL := /home/stuymf/kaldi-trunk/src/feat/kaldi-feat.a /home/stuymf/kaldi-trunk/src/matrix/kaldi-matrix.a /home/stuymf/kaldi-trunk/src/base/kaldi-base.a /home/stuymf/kaldi-trunk/src/util/kaldi-util.a /home/stuymf/kaldi-trunk/src/hmm/kaldi-hmm.a /home/stuymf/kaldi-trunk/src/tree/kaldi-tree.a /usr/lib/libatlas.so.3 /usr/lib/libf77blas.so.3 /usr/lib/libcblas.so.3 /usr/lib/liblapack_atlas.so.3 - +include $(KDIR)/src/kaldi.mk +KL := $(KDIR)/src/feat/kaldi-feat.a $(KDIR)/src/matrix/kaldi-matrix.a $(KDIR)/src/base/kaldi-base.a $(KDIR)/src/util/kaldi-util.a $(KDIR)/src/hmm/kaldi-hmm.a $(KDIR)/src/tree/kaldi-tree.a -lcblas -llapack $(OBJ_DIR) $(LUA_DIR) $(OBJ_SUBDIR) $(LUA_SUBDIR): -mkdir -p $@ $(LUA_DIR)/%.lua: %.lua cp $< $@ $(LIBS): $(OBJ_DIR)/src/cwrapper_kaldi.o $(OBJ_DIR)/init.o $(OBJ_DIR)/src/init.o - gcc -shared -o $@ $(OBJ_DIR)/src/cwrapper_kaldi.o $(OBJ_DIR)/init.o $(OBJ_DIR)/src/init.o -lstdc++ -Wl,-rpath=$(LIB_PATH) -L$(LIB_PATH) -lnervcore -lluaT $(KL) - g++ -o $@ -c $< -DHAVE_ATLAS $(KALDIINCLUDE) -g -fPIC $(INCLUDE) -DKALDI_DOUBLEPRECISION=0 -msse2 -DHAVE_POSIX_MEMALIGN + gcc -shared -fPIC -o $@ $(OBJ_DIR)/src/cwrapper_kaldi.o $(OBJ_DIR)/init.o $(OBJ_DIR)/src/init.o -lstdc++ -Wl,-rpath=$(LIB_PATH) -L$(LIB_PATH) -lnervcore -lluaT $(KL) $(OBJ_DIR)/src/cwrapper_kaldi.o: src/cwrapper_kaldi.cpp g++ -o $@ -c $< -DHAVE_ATLAS $(KALDIINCLUDE) -g -fPIC $(INCLUDE) -DKALDI_DOUBLEPRECISION=0 -msse2 -DHAVE_POSIX_MEMALIGN $(OBJ_DIR)/src/test: $(OBJ_DIR)/src/cwrapper_kaldi.o $(OBJ_DIR)/src/test.o |