summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-30 15:27:01 +0800
committerDeterminant <[email protected]>2015-05-30 15:27:01 +0800
commit3b156cd0cd19aa7db97082161921064a0a871328 (patch)
treef58a2f25edbc5b3495756370fae6c33aab4f54c9 /Makefile
parent54546414d1700ed34bf2fe896f36e86e59850b63 (diff)
add nerv interface for TNet IO
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..086527a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,15 @@
+.PHONY: tnet
+all: tnet $(OBJ_DIR)/tnet_io/test $(LIB_DIR)/libspeech.so
+$(LIB_DIR)/libspeech.so: $(OBJ_DIR)/tnet_io/cwrapper.o $(OBJ_DIR)/init.o $(OBJ_DIR)/tnet_io/init.o $(OBJ_DIR)/tnet_io/libKaldiLib.a
+ gcc -shared -o $@ $(OBJ_DIR)/tnet_io/cwrapper.o $(OBJ_DIR)/init.o $(OBJ_DIR)/tnet_io/libKaldiLib.a $(OBJ_DIR)/tnet_io/init.o -lstdc++ -Wl,-rpath=$(LIB_DIR) -L$(LIB_DIR) -lnerv
+$(OBJ_DIR)/tnet_io/test: $(OBJ_DIR)/tnet_io/cwrapper.o $(OBJ_DIR)/tnet_io/test.o $(OBJ_DIR)/tnet_io/libKaldiLib.a
+ gcc -o $@ $^ -Wl,-rpath=$(LIB_DIR) -L$(LIB_DIR) -lnerv -Wl,-rpath=$(BUILD_DIR)/luajit-2.0/lib -L$(BUILD_DIR)/luajit-2.0/lib -lluajit-5.1 -lstdc++ -lm
+$(OBJ_DIR)/tnet_io/cwrapper.o: tnet_io/cwrapper.cpp
+ g++ -o $@ -c $< -DHAVE_ATLAS -I tnet_io/KaldiLib/ -g -fPIC
+$(OBJ_DIR)/%.o: %.c
+ gcc -o $@ -c $< -g -I $(BUILD_DIR)/luajit-2.0/include/luajit-2.0 -fPIC
+clean:
+ -rm $(OBJ_DIR)/tnet_io/*.o
+ $(MAKE) -C tnet_io/KaldiLib/ clean
+tnet:
+ $(MAKE) -C tnet_io/KaldiLib/ OBJ_DIR=$(OBJ_DIR)/tnet_io