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