Blame


1 80189b3a 2022-08-13 op .PHONY: all clean distclean install
2 80189b3a 2022-08-13 op
3 80189b3a 2022-08-13 op # Follow the OpenBSD release scheme.
4 329850de 2022-10-30 op VERSION = 7.2
5 80189b3a 2022-08-13 op PROG = slowcgi
6 80189b3a 2022-08-13 op DISTNAME = ${PROG}-${VERSION}
7 80189b3a 2022-08-13 op
8 80189b3a 2022-08-13 op SOURCES = compats.c \
9 80189b3a 2022-08-13 op slowcgi.c
10 80189b3a 2022-08-13 op
11 80189b3a 2022-08-13 op OBJS = ${SOURCES:.c=.o}
12 80189b3a 2022-08-13 op
13 80189b3a 2022-08-13 op DISTFILES = Makefile \
14 80189b3a 2022-08-13 op configure \
15 80189b3a 2022-08-13 op queue.h \
16 80189b3a 2022-08-13 op slowcgi.8 \
17 80189b3a 2022-08-13 op ${SOURCES} \
18 80189b3a 2022-08-13 op tests.c
19 80189b3a 2022-08-13 op
20 80189b3a 2022-08-13 op all: ${PROG}
21 80189b3a 2022-08-13 op
22 80189b3a 2022-08-13 op Makefile.configure config.h: configure tests.c
23 80189b3a 2022-08-13 op @echo "$@ is out of date; please run ./configure"
24 80189b3a 2022-08-13 op @exit
25 80189b3a 2022-08-13 op
26 80189b3a 2022-08-13 op include Makefile.configure
27 80189b3a 2022-08-13 op
28 80189b3a 2022-08-13 op # -- targets --
29 80189b3a 2022-08-13 op
30 80189b3a 2022-08-13 op ${PROG}: ${OBJS}
31 80189b3a 2022-08-13 op ${CC} -o $@ ${OBJS} ${LDFLAGS} ${LDADD}
32 80189b3a 2022-08-13 op
33 80189b3a 2022-08-13 op clean:
34 80189b3a 2022-08-13 op rm -f ${OBJS} ${PROG}
35 80189b3a 2022-08-13 op
36 80189b3a 2022-08-13 op distclean: clean
37 80189b3a 2022-08-13 op rm -f Makefile.configure config.h config.h.old config.log config.log.old
38 80189b3a 2022-08-13 op
39 80189b3a 2022-08-13 op install: ${PROG}
40 80189b3a 2022-08-13 op mkdir -p ${DESTDIR}${BINDIR}
41 80189b3a 2022-08-13 op mkdir -p ${DESTDIR}${MANDIR}/man1
42 80189b3a 2022-08-13 op ${INSTALL_PROGRAM} ${PROG} ${DESTDIR}${BINDIR}
43 80189b3a 2022-08-13 op ${INSTALL_MAN} slowcgi.8 ${DESTDIR}${MANDIR}/man8/${PROG}.8
44 80189b3a 2022-08-13 op
45 80189b3a 2022-08-13 op uninstall:
46 80189b3a 2022-08-13 op rm ${DESTDIR}${BINDIR}/${PROG}
47 80189b3a 2022-08-13 op rm ${DESTDIR}${MANDIR}/man8/${PROG}.8
48 80189b3a 2022-08-13 op
49 80189b3a 2022-08-13 op # -- maintainer targets --
50 80189b3a 2022-08-13 op
51 80189b3a 2022-08-13 op dist: ${DISTNAME}.sha256
52 80189b3a 2022-08-13 op
53 80189b3a 2022-08-13 op ${DISTNAME}.sha256: ${DISTNAME}.tar.gz
54 80189b3a 2022-08-13 op sha256 ${DISTNAME}.tar.gz > $@
55 80189b3a 2022-08-13 op
56 80189b3a 2022-08-13 op ${DISTNAME}.tar.gz: ${DISTFILES}
57 80189b3a 2022-08-13 op mkdir -p .dist/${DISTNAME}
58 80189b3a 2022-08-13 op ${INSTALL} -m 0644 ${DISTFILES} .dist/${DISTNAME}
59 80189b3a 2022-08-13 op chmod 755 .dist/${DISTNAME}/configure
60 80189b3a 2022-08-13 op cd .dist && tar zcf ../$@ ${DISTNAME}
61 80189b3a 2022-08-13 op rm -rf .dist