【新增】实现数据管理能力

This commit is contained in:
niubinghui
2024-08-06 16:16:34 +08:00
parent dc63983f77
commit 0f5cbff974
6 changed files with 601 additions and 87 deletions

33
src/Makefile Normal file
View File

@@ -0,0 +1,33 @@
TOPDIR = ./..
CC=gcc
MAKE=make
TARGET=libluaplugin.so
TEST_FLAG = -DLUAPLUGIN_BASIC_UNITTEST
SRC := lua_plugin_binding.c \
lua_plugin_data.c \
lua_plugin_cfunc.c \
lua_plugin_manage.c
OBJECTS := lua_plugin_binding.o \
lua_plugin_data.o \
lua_plugin_cfunc.o \
lua_plugin_manage.o
INCLUDE = -I$(TOPDIR)/dependence/include -I$(TOPDIR)/include
CFLAGS = -g -Wextra -Wall -O0 -fPIC
# CFLAGS += -pedantic -fsanitize=address
LDLIBS = -L$(TOPDIR)/dependence/lib -llua -ltoml -ldl -lm
all:$(OBJECTS)
$(CC) $(CFLAGS) -shared -o $(TARGET) $(OBJECTS) $(LDLIBS)
mkdir -p $(TOPDIR)/output/libs
cp -f $(TARGET) $(TOPDIR)/output/libs
$(OBJECTS):$(SRC)
$(CC) $(TEST_FLAG) $(INCLUDE) $(CFLAGS) $(SRC) -c $^
clean:
rm -rf $(OBJECTS) $(TARGET)
rm -rf $(TOPDIR)/output/libs/$(TARGET)