Home | History | Annotate | Line # | Download | only in httpd
Makefile revision 1.23
      1 #	$NetBSD: Makefile,v 1.23 2015/04/16 02:32:33 mrg Exp $
      2 #
      3 #	$eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
      4 #
      5 # berkeley (netbsd) makefile.  see Makefile.boot for other systems.
      6 
      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 */
     17 #
     18 # these are usually set via the "COPTS" variable, or some other method
     19 # for setting CFLAGS relevant to your make, eg
     20 #   % make COPTS="-DDO_HTPASSWD"
     21 
     22 COPTS+=	-DDO_HTPASSWD
     23 PROG=	bozohttpd
     24 LINKS=	${BINDIR}/bozohttpd ${BINDIR}/httpd
     25 MAN=	bozohttpd.8
     26 MLINKS+=bozohttpd.8 httpd.8
     27 SRCS=	bozohttpd.c ssl-bozo.c auth-bozo.c cgi-bozo.c daemon-bozo.c \
     28 	tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c lua-bozo.c
     29 SRCS+=	main.c
     30 
     31 LDADD=	-lcrypt -llua -lm
     32 DPADD=	${LIBCRYPT} ${LIBLUA} ${LIBM}
     33 
     34 WARNS?=	4
     35 
     36 .include <bsd.own.mk>
     37 
     38 .if ${MKCRYPTO} != "no"
     39 
     40 LDADD+=	-lssl -lcrypto
     41 DPADD+=	${LIBSSL} ${LIBCRYPTO}
     42 
     43 .else
     44 
     45 COPTS+=	-DNO_SSL_SUPPORT
     46 
     47 .endif
     48 
     49 #
     50 # Build release things.
     51 #
     52 NROFF?=		nroff
     53 
     54 PREHTMLFROB=	sed \
     55 		    -e 's/&/\&amp;/' \
     56 		    -e 's/</\&lt;/' \
     57 		    -e 's/>/\&gt;/'
     58 
     59 HTMLFROB=	sed \
     60 		    -e 's/\([MC] "[^"]*\)<dd>$$/\1<b>"<\/b><dd>/' \
     61 		    -e 's/'"''"'/\&rdquo;/' \
     62 		    -e 's/""/\&ldquo;/' \
     63 		    -e 's/<a href="\.\.\/html[^>]*>\(.*\)<\/a>/\1/'
     64 
     65 TXTFROB=	col -b
     66 
     67 bozohttpd.8.html: bozohttpd.8
     68 	$(PREHTMLFROB) $> | $(NROFF) -mdoc2html | $(HTMLFROB) > $@
     69 
     70 bozohttpd.8.txt: bozohttpd.8
     71 	$(NROFF) -mdoc -Tascii $> | $(TXTFROB) > $@
     72 
     73 CLEANFILES+=	bozohttpd.8.html bozohttpd.8.txt
     74 
     75 # Create a distfile: uses /tmp
     76 BASE=bozohttpd-${BOZOVER}
     77 TAR=${BASE}.tar
     78 export-distfile:
     79 	dir=`mktemp -d /tmp/bozo-export-XXXXXX`; \
     80 	cd "$${dir}" || exit; \
     81 	mkdir ${BASE}; \
     82 	( cd ${BASE} || exit; \
     83 	  cp -r "${.CURDIR}/." "."; \
     84 	  find . -name .CVS | xargs rm -r; \
     85 	); \
     86 	pax -wf ${TAR} ${BASE}; \
     87 	gzip -nc9 ${TAR} > ${TAR}.gz; \
     88 	bzip2 -9 ${TAR}; \
     89 	echo "Exported two files in $${dir}:"; \
     90 	echo ${TAR}.gz; \
     91 	echo ${TAR}.bz2
     92 
     93 .include <bsd.prog.mk>
     94