diff options
author | Determinant <[email protected]> | 2015-05-14 08:08:32 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-05-14 08:08:32 +0800 |
commit | a774bfc860471ac880a9b33bbe68761ec9187caf (patch) | |
tree | 67be5f7a04719750441845698ab7426ce9fd8a63 /Makefile |
init
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..659774c --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +.PHONY: all clean +OBJS := oop_example.o nerv.o luaT.o +INCLUDE := -I luajit-2.0/build/include/luajit-2.0/ -DLUA_USE_APICHECK +LDFLAGS := -L luajit-2.0/build/lib/ -llua -lm +OBJ_DIR := build/objs +OBJS := $(addprefix $(OBJ_DIR)/,$(OBJS)) +all: libnerv.so +$(OBJS): $(OBJ_DIR) +$(OBJ_DIR): + -mkdir -p $(OBJ_DIR) +$(OBJ_DIR)/%.o: %.c + gcc -c -o $@ $< $(INCLUDE) -fPIC +$(OBJ_DIR)/luaT.o: + gcc -c -o $@ luaT/luaT.c $(INCLUDE) -fPIC +libnerv.so: $(OBJS) + gcc -shared -o $(OBJ_DIR)/$@ $(OBJS) +clean: + -rm -rf $(OBJ_DIR) |