aboutsummaryrefslogtreecommitdiff
path: root/embedding_example/Makefile
diff options
context:
space:
mode:
authortxh18 <[email protected]>2015-10-23 19:36:31 +0800
committertxh18 <[email protected]>2015-10-23 19:36:31 +0800
commit1234c026869ab052e898cc2541143fe4a22312b6 (patch)
treebd4b980ae12340b4ea3a8aa6259d43dc891b5568 /embedding_example/Makefile
parentf0937ae6e6401f25f15bb0e83e764ca888e81f11 (diff)
parent64fce92b7845b716f3c168036691c37b2467d99b (diff)
Just come back, let's merge the new master
Merge branch 'master' into txh18/rnnlm
Diffstat (limited to 'embedding_example/Makefile')
-rw-r--r--embedding_example/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/embedding_example/Makefile b/embedding_example/Makefile
new file mode 100644
index 0000000..73287f4
--- /dev/null
+++ b/embedding_example/Makefile
@@ -0,0 +1,20 @@
+CFLAG += -I ../install/include/luajit-2.0/ -I ../install/include/nerv/
+LDFLAG += -L../install/lib/ -lluajit-5.1 -Wl,-rpath=../install/lib/ -lluaT -lnervcore
+GCC := gcc
+
+.PHONY: FORCE
+
+all: main FORCE
+clean:
+ -rm -f *.o
+ -rm main
+
+FORCE: ../install/bin/luarocks
+ echo "#!/bin/bash" > run.sh
+ $< path >> run.sh
+ echo "./main" >> run.sh
+main: main.o
+ $(GCC) -o $@ $< $(LDFLAG)
+
+main.o: main.c
+ $(GCC) $(CFLAG) -o $@ $< -c