Home | History | Annotate | Line # | Download | only in httpd
Makefile revision 1.17
      1 #	$NetBSD: Makefile,v 1.17 2013/10/16 10:04:26 he 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=	httpd
     24 MAN=	httpd.8
     25 BUILDSYMLINKS+=bozohttpd.8 httpd.8
     26 SRCS=	bozohttpd.c ssl-bozo.c auth-bozo.c cgi-bozo.c daemon-bozo.c \
     27 	tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c lua-bozo.c
     28 SRCS+=	main.c
     29 
     30 LDADD=	-lcrypt -llua -lm
     31 DPADD=	${LIBCRYPT} ${LIBLUA} ${LIBM}
     32 
     33 WARNS?=	4
     34 
     35 .include <bsd.own.mk>
     36 
     37 .if ${MKCRYPTO} != "no"
     38 
     39 LDADD+=	-lssl -lcrypto
     40 DPADD+=	${LIBSSL} ${LIBCRYPTO}
     41 
     42 .else
     43 
     44 COPTS+=	-DNO_SSL_SUPPORT
     45 
     46 .endif
     47 
     48 #
     49 # Build release things.
     50 #
     51 NROFF?=		nroff
     52 
     53 PREHTMLFROB=	sed \
     54 		    -e 's/&/\&amp;/' \
     55 		    -e 's/</\&lt;/' \
     56 		    -e 's/>/\&gt;/'
     57 
     58 HTMLFROB=	sed \
     59 		    -e 's/\([MC] "[^"]*\)<dd>$$/\1<b>"<\/b><dd>/' \
     60 		    -e 's/'"''"'/\&rdquo;/' \
     61 		    -e 's/""/\&ldquo;/' \
     62 		    -e 's/<a href="\.\.\/html[^>]*>\(.*\)<\/a>/\1/'
     63 
     64 TXTFROB=	col -b
     65 
     66 bozohttpd.8.html: bozohttpd.8
     67 	$(PREHTMLFROB) $> | $(NROFF) -mdoc2html | $(HTMLFROB) > $@
     68 
     69 bozohttpd.8.txt: bozohttpd.8
     70 	$(NROFF) -mdoc -Tascii $> | $(TXTFROB) > $@
     71 
     72 CLEANFILES+=	bozohttpd.8.html bozohttpd.8.txt
     73 
     74 # Create a distfile: uses /tmp
     75 BASE=bozohttpd-${BOZOVER}
     76 TAR=${BASE}.tar
     77 export-distfile:
     78 	dir=`mktemp -d /tmp/bozo-export-XXXXXX`; \
     79 	cd "$${dir}" || exit; \
     80 	mkdir ${BASE}; \
     81 	( cd ${BASE} || exit; \
     82 	  cp -r "${.CURDIR}/." "."; \
     83 	  find . -name .CVS | xargs rm -r; \
     84 	); \
     85 	pax -wf ${TAR} ${BASE}; \
     86 	gzip -c9 ${TAR} > ${TAR}.gz; \
     87 	bzip2 -9 ${TAR}
     88 	@echo "Exported two files:"
     89 	@echo ${TAR}.gz
     90 	@echo ${TAR}.bz2
     91 
     92 .include <bsd.prog.mk>
     93