memoryd-http ist ein C99-CGI-Programm (HTML 4.01) ueber den MCP-Server von memoryd (vendor/cgi/cgi.h, tests/test-http.sh); Makefile baut und installiert es, README beschreibt es, tests/run.py angepasst.
29 lines
700 B
Makefile
29 lines
700 B
Makefile
CC ?= cc
|
|
CFLAGS ?= -std=c99 -O2 -Wall -Wextra -Werror
|
|
LIBDIR ?= vendor/libmcp
|
|
PREFIX ?= /usr/local
|
|
CGIDIR ?= $(PREFIX)/lib/cgi-bin
|
|
|
|
all: memoryd memoryd-http
|
|
|
|
memoryd: memoryd.c $(LIBDIR)/mcp.h
|
|
$(CC) $(CFLAGS) -I$(LIBDIR) -o $@ memoryd.c -lm
|
|
|
|
memoryd-http: memoryd-http.c vendor/cgi/cgi.h $(LIBDIR)/mcp.h
|
|
$(CC) $(CFLAGS) -I$(LIBDIR) -Ivendor/cgi -o $@ memoryd-http.c
|
|
|
|
test: memoryd memoryd-http
|
|
./tests/run.sh
|
|
./tests/test-http.sh
|
|
|
|
install: memoryd memoryd-http
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
cp memoryd $(DESTDIR)$(PREFIX)/bin/
|
|
install -d $(DESTDIR)$(CGIDIR)
|
|
install -m 0755 memoryd-http $(DESTDIR)$(CGIDIR)/memoryd-http
|
|
|
|
clean:
|
|
rm -f memoryd memoryd-http
|
|
|
|
.PHONY: all test install clean
|