blob: 09c3eaa9aec64c309cfecbcb5b98d4d9dcb49e77 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
PROG = slowcgi
OBJS = slowcgi.o getdtablecount.o strlcpy.o strtonum.o
LIBS = libevent
PREFIX ?= /usr/local
BINDIR ?= ${PREFIX}/bin
MANDIR ?= ${PREFIX}/share/man
CFLAGS ?= -O2 -pipe
CFLAGS += -MMD -Wall -Wextra -Wno-unused-parameter
CFLAGS += -Wmissing-declarations
CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual
CFLAGS += -Wsign-compare
CFLAGS += -Werror-implicit-function-declaration
CPPFLAGS += -D_GNU_SOURCE $(shell pkg-config --cflags ${LIBS})
LDLIBS += $(shell pkg-config --libs ${LIBS})
${PROG}: ${OBJS}
${CC} -o $@ ${CFLAGS} ${OBJS} ${LDLIBS}
install:
install -D -m 0755 -t '${DESTDIR}${BINDIR}' ${PROG}
install -D -m 0644 -t '${DESTDIR}${MANDIR}/man8' ${PROG}.8
clean:
rm -f ${OBJS} ${OBJS:.o=.d} ${PROG}
.PHONY: clean install
-include ${OBJS:.o=.d}
|