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