Makefile revision 1.23
11.23Smrg# $NetBSD: Makefile,v 1.23 2015/04/16 02:32:33 mrg Exp $ 21.2Stls# 31.12Smrg# $eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $ 41.11Smrg# 51.11Smrg# berkeley (netbsd) makefile. see Makefile.boot for other systems. 61.1Stls 71.1Stls# compile-time options are: 81.12Smrg# NO_DEBUG /* don't include debugging support */ 91.1Stls# NO_USER_SUPPORT /* don't support /~user requests */ 101.1Stls# NO_CGIBIN_SUPPORT /* don't support cgi-bin requests */ 111.1Stls# NO_DIRINDEX_SUPPORT /* don't support directory indexing */ 121.1Stls# NO_DAEMON_MODE /* don't support daemon mode */ 131.1Stls# NO_DYNAMIC_CONTENT /* don't support dynamic content updates */ 141.1Stls# NO_SSL_SUPPORT /* don't support ssl (https) */ 151.1Stls# DO_HTPASSWD /* support .htpasswd files */ 161.16Smbalmer# NO_LUA_SUPPORT /* don't support Lua for dynamic content */ 171.12Smrg# 181.12Smrg# these are usually set via the "COPTS" variable, or some other method 191.12Smrg# for setting CFLAGS relevant to your make, eg 201.12Smrg# % make COPTS="-DDO_HTPASSWD" 211.12Smrg 221.3SreedCOPTS+= -DDO_HTPASSWD 231.23SmrgPROG= bozohttpd 241.23SmrgLINKS= ${BINDIR}/bozohttpd ${BINDIR}/httpd 251.23SmrgMAN= bozohttpd.8 261.23SmrgMLINKS+=bozohttpd.8 httpd.8 271.1StlsSRCS= bozohttpd.c ssl-bozo.c auth-bozo.c cgi-bozo.c daemon-bozo.c \ 281.16Smbalmer tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c lua-bozo.c 291.11SmrgSRCS+= main.c 301.1Stls 311.17SheLDADD= -lcrypt -llua -lm 321.17SheDPADD= ${LIBCRYPT} ${LIBLUA} ${LIBM} 331.5Smrg 341.11SmrgWARNS?= 4 351.11Smrg 361.10Smrg.include <bsd.own.mk> 371.10Smrg 381.5Smrg.if ${MKCRYPTO} != "no" 391.5Smrg 401.5SmrgLDADD+= -lssl -lcrypto 411.5SmrgDPADD+= ${LIBSSL} ${LIBCRYPTO} 421.5Smrg 431.5Smrg.else 441.5Smrg 451.5SmrgCOPTS+= -DNO_SSL_SUPPORT 461.1Stls 471.5Smrg.endif 481.1Stls 491.13Smrg# 501.13Smrg# Build release things. 511.13Smrg# 521.13SmrgNROFF?= nroff 531.15Smbalmer 541.13SmrgPREHTMLFROB= sed \ 551.13Smrg -e 's/&/\&/' \ 561.13Smrg -e 's/</\</' \ 571.13Smrg -e 's/>/\>/' 581.13Smrg 591.13SmrgHTMLFROB= sed \ 601.13Smrg -e 's/\([MC] "[^"]*\)<dd>$$/\1<b>"<\/b><dd>/' \ 611.13Smrg -e 's/'"''"'/\”/' \ 621.13Smrg -e 's/""/\“/' \ 631.13Smrg -e 's/<a href="\.\.\/html[^>]*>\(.*\)<\/a>/\1/' 641.13Smrg 651.13SmrgTXTFROB= col -b 661.13Smrg 671.13Smrgbozohttpd.8.html: bozohttpd.8 681.13Smrg $(PREHTMLFROB) $> | $(NROFF) -mdoc2html | $(HTMLFROB) > $@ 691.15Smbalmer 701.13Smrgbozohttpd.8.txt: bozohttpd.8 711.13Smrg $(NROFF) -mdoc -Tascii $> | $(TXTFROB) > $@ 721.13Smrg 731.13SmrgCLEANFILES+= bozohttpd.8.html bozohttpd.8.txt 741.13Smrg 751.14Smrg# Create a distfile: uses /tmp 761.14SmrgBASE=bozohttpd-${BOZOVER} 771.14SmrgTAR=${BASE}.tar 781.14Smrgexport-distfile: 791.14Smrg dir=`mktemp -d /tmp/bozo-export-XXXXXX`; \ 801.14Smrg cd "$${dir}" || exit; \ 811.14Smrg mkdir ${BASE}; \ 821.14Smrg ( cd ${BASE} || exit; \ 831.14Smrg cp -r "${.CURDIR}/." "."; \ 841.14Smrg find . -name .CVS | xargs rm -r; \ 851.14Smrg ); \ 861.14Smrg pax -wf ${TAR} ${BASE}; \ 871.20Smrg gzip -nc9 ${TAR} > ${TAR}.gz; \ 881.22Smrg bzip2 -9 ${TAR}; \ 891.22Smrg echo "Exported two files in $${dir}:"; \ 901.22Smrg echo ${TAR}.gz; \ 911.22Smrg echo ${TAR}.bz2 921.14Smrg 931.1Stls.include <bsd.prog.mk> 94