Home | History | Annotate | Line # | Download | only in httpd
Makefile revision 1.32
      1 #	$NetBSD: Makefile,v 1.32 2023/05/09 01:47:21 christos 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 #	NO_BLOCKLIST_SUPPORT	/* don't support blocklist */
     18 #
     19 # other system specific defines:
     20 #	HAVE_NBUTIL_H		/* netbsd compat is in <nbutil.h>
     21 #				(don't forget to also enable -lnbutil)
     22 #
     23 # these are usually set via the "COPTS" variable, or some other method
     24 # for setting CFLAGS relevant to your make, eg
     25 #   % make COPTS="-DDO_HTPASSWD"
     26 
     27 COPTS+=	-DDO_HTPASSWD
     28 PROG=	bozohttpd
     29 LINKS=	${BINDIR}/bozohttpd ${BINDIR}/httpd
     30 MAN=	bozohttpd.8
     31 MLINKS+=bozohttpd.8 httpd.8
     32 SRCS=	bozohttpd.c ssl-bozo.c auth-bozo.c cgi-bozo.c daemon-bozo.c \
     33 	tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c lua-bozo.c
     34 SRCS+=	main.c
     35 
     36 COPTS.ssl-bozo.c+=-Wno-error=deprecated-declarations
     37 
     38 LDADD=	-lblocklist -lcrypt -llua -lm
     39 DPADD=	${LIBBLOCKLIST} ${LIBCRYPT} ${LIBLUA} ${LIBM}
     40 
     41 WARNS?=	4
     42 
     43 .if defined(.OS.MAKE)
     44 OPSYS=	${.OS.MAKE}
     45 .else
     46 OPSYS:=	${:!uname -s!:S/-//g:S/\///g}
     47 .endif
     48 
     49 .if ${OPSYS} == "QNX"
     50 CPPFLAGS+=	-DHAVE_NBUTIL_H
     51 LDADD+=		-lnbutil
     52 .endif
     53 
     54 LDADD+=	-lssl -lcrypto
     55 DPADD+=	${LIBSSL} ${LIBCRYPTO}
     56 
     57 #
     58 # Build release things.
     59 #
     60 NROFF?=		nroff
     61 
     62 PREHTMLFROB=	sed \
     63 		    -e 's/&/\&amp;/' \
     64 		    -e 's/</\&lt;/' \
     65 		    -e 's/>/\&gt;/'
     66 
     67 HTMLFROB=	sed \
     68 		    -e 's/\([MC] "[^"]*\)<dd>$$/\1<b>"<\/b><dd>/' \
     69 		    -e 's/'"''"'/\&rdquo;/' \
     70 		    -e 's/""/\&ldquo;/' \
     71 		    -e 's/<a href="\.\.\/html[^>]*>\(.*\)<\/a>/\1/'
     72 
     73 TXTFROB=	col -b
     74 
     75 bozohttpd.8.html: bozohttpd.8
     76 	$(PREHTMLFROB) $> | $(NROFF) -mdoc2html | $(HTMLFROB) > $@
     77 
     78 bozohttpd.8.txt: bozohttpd.8
     79 	$(NROFF) -mdoc -Tascii $> | $(TXTFROB) > $@
     80 
     81 CLEANFILES+=	bozohttpd.8.html bozohttpd.8.txt
     82 
     83 check:
     84 	cd ${.CURDIR}/testsuite && ${MAKE} check
     85 
     86 .if empty(BOZOVER)
     87 BOZOVER!=	sed -n \
     88 		    -e s/\"$$// -e \
     89 		    's/\#define[ 	]*SERVER_SOFTWARE[ 	]*\"bozohttpd\///p'  ${.PARSEDIR}/bozohttpd.c
     90 .endif
     91 
     92 # Create a distfile: uses /tmp
     93 BASE=bozohttpd-${BOZOVER}
     94 TAR=${BASE}.tar
     95 export-distfile:
     96 	dir=`mktemp -d /tmp/bozo-export-XXXXXX`; \
     97 	cd "$${dir}" || exit; \
     98 	mkdir ${BASE}; \
     99 	( cd ${BASE} || exit; \
    100 	  cp -r "${.CURDIR}/." "."; \
    101 	  find . -name .CVS | xargs rm -r; \
    102 	); \
    103 	pax -wf ${TAR} ${BASE}; \
    104 	gzip -nc9 ${TAR} > ${TAR}.gz; \
    105 	bzip2 -9 ${TAR}; \
    106 	echo "Exported two files in $${dir}:"; \
    107 	echo ${TAR}.gz; \
    108 	echo ${TAR}.bz2
    109 
    110 .include <bsd.prog.mk>
    111