aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 55510a7..75e1317 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
.PHONY: all clean luajit
-OBJS := oop_example.o nerv.o luaT.o common.o matrix.o
+OBJS := oop_example.o nerv.o luaT.o common.o matrix/matrix.o matrix/init.o
LIBS := libnerv.so
-LUA_LIBS := matrix.lua
+LUA_LIBS := matrix/matrix.lua
INCLUDE := -I build/luajit-2.0/include/luajit-2.0/ -DLUA_USE_APICHECK
LDFLAGS := -L luajit-2.0/build/lib/ -llua -lm
CFLAGS :=
@@ -17,10 +17,14 @@ luajit:
./build_luajit.sh
$(OBJ_DIR):
-mkdir -p $(OBJ_DIR)
+ -mkdir -p $(OBJ_DIR)/matrix
+ -mkdir -p $(LUA_DIR)/matrix
$(LUA_DIR):
-mkdir -p $(LUA_DIR)
$(OBJ_DIR)/%.o: %.c
gcc -c -o $@ $< $(INCLUDE) -fPIC $(CFLAGS)
+$(OBJ_DIR)/matrix/%.o: matrix/%.c
+ gcc -c -o $@ $< $(INCLUDE) -fPIC $(CFLAGS)
$(LUA_DIR)/%.lua: %.lua
cp $< $@
$(OBJ_DIR)/luaT.o: