31 lines
689 B
Makefile
31 lines
689 B
Makefile
# This makefile is used for testing purposes and makes no attempt
|
|
# to be portable. Use "luarocks make" to build and install.
|
|
|
|
CC ?= gcc
|
|
CFLAGS = -g -O2
|
|
XCFLAGS += -std=c99 -pedantic-errors -fPIC
|
|
CWARNS = -Wall -Wextra -Wshadow -Wundef -Wconversion -Wc90-c99-compat
|
|
LUA = lua
|
|
|
|
default:
|
|
@echo 'The Makefile is for development only.' >&2
|
|
@echo 'Use "luarocks make" to install.' >&2
|
|
|
|
all: discount3.so
|
|
|
|
discount3.so: discount3.o
|
|
$(CC) $(LDFLAGS) -fPIC -shared -o $@ $^ -lmarkdown
|
|
|
|
discount3.o: discount3.c
|
|
$(CC) $(XCFLAGS) $(CPPFLAGS) $(CFLAGS) $(CWARNS) -c -o $@ $<
|
|
|
|
check: all
|
|
$(LUA) test.lua
|
|
|
|
clean:
|
|
rm -f discount3.so discount3.o
|
|
|
|
|
|
.PHONY: default all check clean
|
|
.DELETE_ON_ERROR:
|