Makefile revision 1.29
1# $NetBSD: Makefile,v 1.29 2020/07/11 08:10:52 jruoho 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 27COPTS+= -DDO_HTPASSWD 28PROG= bozohttpd 29LINKS= ${BINDIR}/bozohttpd ${BINDIR}/httpd 30MAN= bozohttpd.8 31MLINKS+=bozohttpd.8 httpd.8 32SRCS= 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 34SRCS+= main.c 35 36LDADD= -lblocklist -lcrypt -llua -lm 37DPADD= ${LIBBLOCKLIST} ${LIBCRYPT} ${LIBLUA} ${LIBM} 38 39WARNS?= 4 40 41.if defined(.OS.MAKE) 42OPSYS= ${.OS.MAKE} 43.else 44OPSYS:= ${:!uname -s!:S/-//g:S/\///g} 45.endif 46 47.if ${OPSYS} == "QNX" 48CPPFLAGS+= -DHAVE_NBUTIL_H 49LDADD+= -lnbutil 50.endif 51 52LDADD+= -lssl -lcrypto 53DPADD+= ${LIBSSL} ${LIBCRYPTO} 54 55# 56# Build release things. 57# 58NROFF?= nroff 59 60PREHTMLFROB= sed \ 61 -e 's/&/\&/' \ 62 -e 's/</\</' \ 63 -e 's/>/\>/' 64 65HTMLFROB= sed \ 66 -e 's/\([MC] "[^"]*\)<dd>$$/\1<b>"<\/b><dd>/' \ 67 -e 's/'"''"'/\”/' \ 68 -e 's/""/\“/' \ 69 -e 's/<a href="\.\.\/html[^>]*>\(.*\)<\/a>/\1/' 70 71TXTFROB= col -b 72 73bozohttpd.8.html: bozohttpd.8 74 $(PREHTMLFROB) $> | $(NROFF) -mdoc2html | $(HTMLFROB) > $@ 75 76bozohttpd.8.txt: bozohttpd.8 77 $(NROFF) -mdoc -Tascii $> | $(TXTFROB) > $@ 78 79CLEANFILES+= bozohttpd.8.html bozohttpd.8.txt 80 81check: 82 cd ${.CURDIR}/testsuite && ${MAKE} check 83 84# Create a distfile: uses /tmp 85BASE=bozohttpd-${BOZOVER} 86TAR=${BASE}.tar 87export-distfile: 88 dir=`mktemp -d /tmp/bozo-export-XXXXXX`; \ 89 cd "$${dir}" || exit; \ 90 mkdir ${BASE}; \ 91 ( cd ${BASE} || exit; \ 92 cp -r "${.CURDIR}/." "."; \ 93 find . -name .CVS | xargs rm -r; \ 94 ); \ 95 pax -wf ${TAR} ${BASE}; \ 96 gzip -nc9 ${TAR} > ${TAR}.gz; \ 97 bzip2 -9 ${TAR}; \ 98 echo "Exported two files in $${dir}:"; \ 99 echo ${TAR}.gz; \ 100 echo ${TAR}.bz2 101 102.include <bsd.prog.mk> 103