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