【修改】修改名称
This commit is contained in:
36
test/Makefile
Normal file
36
test/Makefile
Normal file
@@ -0,0 +1,36 @@
|
||||
TOPDIR = ./..
|
||||
CC=gcc
|
||||
MAKE=make
|
||||
TARGET=example
|
||||
SIMPLE=simple_stellar_plugin.so
|
||||
|
||||
EXAMPLE_FLAG = -DLUAPLUGIN_EXAMPLE
|
||||
|
||||
SRC := example_plugin_manage.c
|
||||
OBJECTS := example_plugin_manage.o
|
||||
|
||||
SIMPLE_SRC := simple_example_plugin.c
|
||||
SIMPLE_OBJECTS := simple_example_plugin.o
|
||||
|
||||
INCLUDE = -I$(TOPDIR)/output/include -I$(TOPDIR)/dependence/include -I$(TOPDIR)/example/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 -lbitmap -lplugin_manager
|
||||
|
||||
TARGET:$(OBJECTS)
|
||||
$(CC) $(CFLAGS) -o $(TARGET) $(OBJECTS) $(LDLIBS)
|
||||
|
||||
$(OBJECTS):$(SRC)
|
||||
$(CC) $(TEST_FLAG) $(INCLUDE) $(CFLAGS) $(SRC) -c $^
|
||||
|
||||
SIMPLE:$(SIMPLE_OBJECTS)
|
||||
$(CC) $(CFLAGS) --shared -o $(SIMPLE) $(SIMPLE_OBJECTS) $(LDLIBS)
|
||||
cp $(SIMPLE) plugin
|
||||
|
||||
$(SIMPLE_OBJECTS):$(SIMPLE_SRC)
|
||||
$(CC) $(TEST_FLAG) $(INCLUDE) $(CFLAGS) $(SIMPLE_SRC) -c $^
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJECTS) $(TARGET) $(SIMPLE_OBJECTS) $(SIMPLE)
|
||||
rm -rf $(TOPDIR)/output/libs/$(TARGET)
|
||||
Reference in New Issue
Block a user