This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
niubinghui-luapluginmanage/example/Makefile

26 lines
615 B
Makefile

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)