blob: 659b631eedf285455ad03339cc6f43f3ee943360 (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# $NetBSD: Makefile,v 1.24 2015/08/05 06:50:44 mrg Exp $
#
# $eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
#
# berkeley (netbsd) makefile. see Makefile.boot for other systems.
# compile-time options are:
# NO_DEBUG /* don't include debugging support */
# NO_USER_SUPPORT /* don't support /~user requests */
# NO_CGIBIN_SUPPORT /* don't support cgi-bin requests */
# NO_DIRINDEX_SUPPORT /* don't support directory indexing */
# NO_DAEMON_MODE /* don't support daemon mode */
# NO_DYNAMIC_CONTENT /* don't support dynamic content updates */
# NO_SSL_SUPPORT /* don't support ssl (https) */
# DO_HTPASSWD /* support .htpasswd files */
# NO_LUA_SUPPORT /* don't support Lua for dynamic content */
#
# other system specific defines:
# HAVE_NBUTIL_H /* netbsd compat is in <nbutil.h>
# (don't forget to also enable -lnbutil)
#
# these are usually set via the "COPTS" variable, or some other method
# for setting CFLAGS relevant to your make, eg
# % make COPTS="-DDO_HTPASSWD"
COPTS+= -DDO_HTPASSWD
PROG= bozohttpd
LINKS= ${BINDIR}/bozohttpd ${BINDIR}/httpd
MAN= bozohttpd.8
MLINKS+=bozohttpd.8 httpd.8
SRCS= bozohttpd.c ssl-bozo.c auth-bozo.c cgi-bozo.c daemon-bozo.c \
tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c lua-bozo.c
SRCS+= main.c
LDADD= -lcrypt -llua -lm
DPADD= ${LIBCRYPT} ${LIBLUA} ${LIBM}
WARNS?= 4
.if defined(.OS.MAKE)
OPSYS= ${.OS.MAKE}
.else
OPSYS:= ${:!uname -s!:S/-//g:S/\///g}
.endif
.if ${OPSYS} == "QNX"
CPPFLAGS+= -DHAVE_NBUTIL_H
LDADD+= -lnbutil
.endif
.include <bsd.own.mk>
.if defined(__MINIX)
.if !empty(DBG:M-Og) || !empty(CFLAGS:M-Og) || \
!empty(DBG:M-g) || !empty(CFLAGS:M-g)
#LSC: -Wno-maybe-uninitialized while compiling with -DNDEBUG -Og
CWARNFLAGS.gcc+= -Wno-maybe-uninitialized
.endif
.endif # defined(__MINIX)
.if ${MKCRYPTO} != "no"
LDADD+= -lssl -lcrypto
DPADD+= ${LIBSSL} ${LIBCRYPTO}
.else
COPTS+= -DNO_SSL_SUPPORT
.endif
#
# Build release things.
#
NROFF?= nroff
PREHTMLFROB= sed \
-e 's/&/\&/' \
-e 's/</\</' \
-e 's/>/\>/'
HTMLFROB= sed \
-e 's/\([MC] "[^"]*\)<dd>$$/\1<b>"<\/b><dd>/' \
-e 's/'"''"'/\”/' \
-e 's/""/\“/' \
-e 's/<a href="\.\.\/html[^>]*>\(.*\)<\/a>/\1/'
TXTFROB= col -b
bozohttpd.8.html: bozohttpd.8
$(PREHTMLFROB) $> | $(NROFF) -mdoc2html | $(HTMLFROB) > $@
bozohttpd.8.txt: bozohttpd.8
$(NROFF) -mdoc -Tascii $> | $(TXTFROB) > $@
CLEANFILES+= bozohttpd.8.html bozohttpd.8.txt
# Create a distfile: uses /tmp
BASE=bozohttpd-${BOZOVER}
TAR=${BASE}.tar
export-distfile:
dir=`mktemp -d /tmp/bozo-export-XXXXXX`; \
cd "$${dir}" || exit; \
mkdir ${BASE}; \
( cd ${BASE} || exit; \
cp -r "${.CURDIR}/." "."; \
find . -name .CVS | xargs rm -r; \
); \
pax -wf ${TAR} ${BASE}; \
gzip -nc9 ${TAR} > ${TAR}.gz; \
bzip2 -9 ${TAR}; \
echo "Exported two files in $${dir}:"; \
echo ${TAR}.gz; \
echo ${TAR}.bz2
.include <bsd.prog.mk>
|