1 # $eterna: Makefile,v 1.27 2009/05/22 21:51:38 mrg Exp $ 2 # 3 # berkeley (netbsd) makefile. see Makefile.boot for other systems. 4 5 # compile-time options are: 6 # DEBUG /* include debugging support */ 7 # NO_USER_SUPPORT /* don't support /~user requests */ 8 # NO_CGIBIN_SUPPORT /* don't support cgi-bin requests */ 9 # NO_DIRINDEX_SUPPORT /* don't support directory indexing */ 10 # NO_DAEMON_MODE /* don't support daemon mode */ 11 # NO_DYNAMIC_CONTENT /* don't support dynamic content updates */ 12 # NO_SSL_SUPPORT /* don't support ssl (https) */ 13 # DO_HTPASSWD /* support .htpasswd files */ 14 # 15 # these are usually set via the "COPTS" variable, or some other method 16 # for setting CFLAGS relevant to your make, eg 17 # % make COPTS="-DDEBUG -DDO_HTPASSWD" 18 19 PROG?= bozohttpd 20 MAN= bozohttpd.8 21 SRCS= bozohttpd.c ssl-bozo.c auth-bozo.c cgi-bozo.c daemon-bozo.c \ 22 tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c 23 24 WARNS= 3 25 26 check: 27 cd $(.CURDIR)/testsuite && $(MAKE) check 28 29 .if ${PROG} == "bozohttpd" 30 clean: 31 cd $(.CURDIR)/testsuite && $(MAKE) clean 32 .endif 33 34 CRYPTOLIBS= -lcrypto -lssl 35 CRYPTODEPS= $(LIBCRYPTO) $(LIBSSL) 36 37 NROFF?= nroff 38 39 # if not defining -DNO_SSL_SUPPORT 40 LDADD= $(CRYPTOLIBS) 41 DPADD= $(CRYPTODEPS) 42 43 PREHTMLFROB= sed \ 44 -e 's/&/\&/' \ 45 -e 's/</\</' \ 46 -e 's/>/\>/' 47 48 HTMLFROB= sed \ 49 -e 's/\([MC] "[^"]*\)<dd>$$/\1<b>"<\/b><dd>/' \ 50 -e 's/'"''"'/\”/' \ 51 -e 's/""/\“/' \ 52 -e 's/<a href="\.\.\/html[^>]*>\(.*\)<\/a>/\1/' 53 54 TXTFROB= col -b 55 56 bozohttpd.8.html: bozohttpd.8 57 $(PREHTMLFROB) $> | $(NROFF) -mdoc2html | $(HTMLFROB) > $@ 58 59 bozohttpd.8.txt: bozohttpd.8 60 $(NROFF) -mdoc -Tascii $> | $(TXTFROB) > $@ 61 62 CLEANFILES+= bozohttpd.8.html bozohttpd.8.txt 63 64 .include <bsd.prog.mk> 65