summaryrefslogblamecommitdiff
path: root/Makefile
blob: d8612dd81bfad98cfe88bc8e571631edfa52c608 (plain) (tree)
1
2
3
                                                

                            





















                                                      
                            
       



                                                  
                                                             


                                                 
      
                             


                                            
                                            
.PHONY: all clean install luajit luarocks speech
SHELL := /bin/bash
PREFIX := $(CURDIR)/install/
#CUDA_BASE := /usr/local/cuda-7.0
CUDA_BASE := /usr/local/cuda
BLAS_BASE := /usr/lib/
BLAS_LDFLAGS := -L$(BLAS_BASE) -Wl,-rpath=$(BLAS_BASE)
BLAS_TYPE := atlas
KALDI_BASE := /speechlab/tools/KALDI/kaldi-master/

MKL_LDFLAGS := -lmkl_rt
ATLAS_LDFLAGS := -lcblas -llapack_atlas
ifeq ($(BLAS_TYPE), mkl)
BLAS_LDFLAGS += $(MKL_LDFLAGS)
else ifeq ($(BLAS_TYPE), atlas)
BLAS_LDFLAGS += $(ATLAS_LDFLAGS)
else
$(error Invalid blas type)
endif
export CUDA_BASE
export KALDI_BASE
export BLAS_LDFLAGS

.PHONY: htk_io kaldi_io kaldi_decode

all: luajit luarocks install
luajit:
	PREFIX=$(PREFIX) ./tools/build_luajit.sh
luarocks:
	PREFIX=$(PREFIX) ./tools/build_luarocks.sh
install:
	cd nerv; $(PREFIX)/bin/luarocks make CFLAGS=$(CFLAGS)
speech: htk_io kaldi_io kaldi_decode
htk_io kaldi_io kaldi_decode:
	cd speech/$@; $(PREFIX)/bin/luarocks make
clean:
	cd nerv && make clean
	cd speech/speech_utils && make clean
	cd speech/htk_io && make clean
	cd speech/kaldi_io && make clean
	cd speech/kaldi_decode && make clean