blob: 95cd170fdf4326f5b7f102c5a5b49141e205b435 (
plain) (
tree)
|
|
PROG = slowcgi
OBJS = slowcgi.o getdtablecount.o strlcpy.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}
|