diff options
Diffstat (limited to 'example/Makefile')
| -rw-r--r-- | example/Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/example/Makefile b/example/Makefile new file mode 100644 index 0000000..47a4b3d --- /dev/null +++ b/example/Makefile @@ -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)
\ No newline at end of file |
