Makefile revision 1.33
11.33Srillig# $NetBSD: Makefile,v 1.33 2024/10/04 08:45:46 rillig 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.29Sjruoho# NO_BLOCKLIST_SUPPORT /* don't support blocklist */ 181.12Smrg# 191.24Smrg# other system specific defines: 201.24Smrg# HAVE_NBUTIL_H /* netbsd compat is in <nbutil.h> 211.24Smrg# (don't forget to also enable -lnbutil) 221.24Smrg# 231.12Smrg# these are usually set via the "COPTS" variable, or some other method 241.12Smrg# for setting CFLAGS relevant to your make, eg 251.12Smrg# % make COPTS="-DDO_HTPASSWD" 261.12Smrg 271.3SreedCOPTS+= -DDO_HTPASSWD 281.23SmrgPROG= bozohttpd 291.23SmrgLINKS= ${BINDIR}/bozohttpd ${BINDIR}/httpd 301.23SmrgMAN= bozohttpd.8 311.23SmrgMLINKS+=bozohttpd.8 httpd.8 321.1StlsSRCS= bozohttpd.c ssl-bozo.c auth-bozo.c cgi-bozo.c daemon-bozo.c \ 331.16Smbalmer tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c lua-bozo.c 341.11SmrgSRCS+= main.c 351.1Stls 361.32SchristosCOPTS.ssl-bozo.c+=-Wno-error=deprecated-declarations 371.32Schristos 381.29SjruohoLDADD= -lblocklist -lcrypt -llua -lm 391.29SjruohoDPADD= ${LIBBLOCKLIST} ${LIBCRYPT} ${LIBLUA} ${LIBM} 401.5Smrg 411.11SmrgWARNS?= 4 421.33SrilligLINTFLAGS+= -X 161 # constant in conditional context 431.33SrilligLINTFLAGS+= -X 193 # statement not reached 441.33SrilligLINTFLAGS+= -X 239 # constant operand to '!' 451.11Smrg 461.24Smrg.if defined(.OS.MAKE) 471.24SmrgOPSYS= ${.OS.MAKE} 481.24Smrg.else 491.24SmrgOPSYS:= ${:!uname -s!:S/-//g:S/\///g} 501.24Smrg.endif 511.24Smrg 521.24Smrg.if ${OPSYS} == "QNX" 531.24SmrgCPPFLAGS+= -DHAVE_NBUTIL_H 541.24SmrgLDADD+= -lnbutil 551.24Smrg.endif 561.24Smrg 571.5SmrgLDADD+= -lssl -lcrypto 581.5SmrgDPADD+= ${LIBSSL} ${LIBCRYPTO} 591.5Smrg 601.13Smrg# 611.13Smrg# Build release things. 621.13Smrg# 631.13SmrgNROFF?= nroff 641.15Smbalmer 651.13SmrgPREHTMLFROB= sed \ 661.13Smrg -e 's/&/\&/' \ 671.13Smrg -e 's/</\</' \ 681.13Smrg -e 's/>/\>/' 691.13Smrg 701.13SmrgHTMLFROB= sed \ 711.13Smrg -e 's/\([MC] "[^"]*\)<dd>$$/\1<b>"<\/b><dd>/' \ 721.13Smrg -e 's/'"''"'/\”/' \ 731.13Smrg -e 's/""/\“/' \ 741.13Smrg -e 's/<a href="\.\.\/html[^>]*>\(.*\)<\/a>/\1/' 751.13Smrg 761.13SmrgTXTFROB= col -b 771.13Smrg 781.13Smrgbozohttpd.8.html: bozohttpd.8 791.13Smrg $(PREHTMLFROB) $> | $(NROFF) -mdoc2html | $(HTMLFROB) > $@ 801.15Smbalmer 811.13Smrgbozohttpd.8.txt: bozohttpd.8 821.13Smrg $(NROFF) -mdoc -Tascii $> | $(TXTFROB) > $@ 831.13Smrg 841.13SmrgCLEANFILES+= bozohttpd.8.html bozohttpd.8.txt 851.13Smrg 861.28Smrgcheck: 871.28Smrg cd ${.CURDIR}/testsuite && ${MAKE} check 881.28Smrg 891.30Smrg.if empty(BOZOVER) 901.30SmrgBOZOVER!= sed -n \ 911.30Smrg -e s/\"$$// -e \ 921.31Smrg 's/\#define[ ]*SERVER_SOFTWARE[ ]*\"bozohttpd\///p' ${.PARSEDIR}/bozohttpd.c 931.30Smrg.endif 941.30Smrg 951.14Smrg# Create a distfile: uses /tmp 961.14SmrgBASE=bozohttpd-${BOZOVER} 971.14SmrgTAR=${BASE}.tar 981.14Smrgexport-distfile: 991.14Smrg dir=`mktemp -d /tmp/bozo-export-XXXXXX`; \ 1001.14Smrg cd "$${dir}" || exit; \ 1011.14Smrg mkdir ${BASE}; \ 1021.14Smrg ( cd ${BASE} || exit; \ 1031.14Smrg cp -r "${.CURDIR}/." "."; \ 1041.14Smrg find . -name .CVS | xargs rm -r; \ 1051.14Smrg ); \ 1061.14Smrg pax -wf ${TAR} ${BASE}; \ 1071.20Smrg gzip -nc9 ${TAR} > ${TAR}.gz; \ 1081.22Smrg bzip2 -9 ${TAR}; \ 1091.22Smrg echo "Exported two files in $${dir}:"; \ 1101.22Smrg echo ${TAR}.gz; \ 1111.22Smrg echo ${TAR}.bz2 1121.14Smrg 1131.1Stls.include <bsd.prog.mk> 114