diff options
author | Determinant <[email protected]> | 2015-05-15 02:36:55 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-05-15 02:36:55 +0800 |
commit | efb786d716363dde8f90ef0672f479790befc79c (patch) | |
tree | 1d7a6f07db9cae3fd65a437d3ca6ff398a2b684b /Makefile | |
parent | b03471e2b0d604806773b540551cd047979b7b3b (diff) |
use C macro to implement matrix template
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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: |