【修改】修改example样例,调用方式修改为传入已经加载完成的config specifig
This commit is contained in:
26
example/Makefile
Normal file
26
example/Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
TOPDIR = ./..
|
||||
CC=gcc
|
||||
MAKE=make
|
||||
TARGET=example
|
||||
|
||||
EXAMPLE_FLAG = -DLUAPLUGIN_EXAMPLE
|
||||
|
||||
SRC := example.c
|
||||
|
||||
OBJECTS := example.o
|
||||
|
||||
INCLUDE = -I$(TOPDIR)/output/include -I$(TOPDIR)/dependence/include
|
||||
CFLAGS = -g -Wextra -Wall -O0 -fPIC
|
||||
# CFLAGS += -pedantic -fsanitize=address
|
||||
# LDLIBS = -L$(TOPDIR)/output/lib -llua -ldl -lm
|
||||
LDLIBS += -L$(TOPDIR)/output/libs -lluaplugin -L$(TOPDIR)/dependence/lib -ltoml
|
||||
|
||||
all:$(OBJECTS)
|
||||
$(CC) $(CFLAGS) -o $(TARGET) $(OBJECTS) $(LDLIBS)
|
||||
|
||||
$(OBJECTS):$(SRC)
|
||||
$(CC) $(TEST_FLAG) $(INCLUDE) $(CFLAGS) $(SRC) -c $^
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJECTS) $(TARGET)
|
||||
rm -rf $(TOPDIR)/output/libs/$(TARGET)
|
||||
Reference in New Issue
Block a user