NetBSD/libexec/httpd/small/Makefile
mrg 36a7970f3c import bozohttpd 20090522, which has these changes:
o  close more leaking file descriptors for CGI and daemon mode
	o  add subdirs for build "debug" and "small" versions
	o  clean up a bad merge / duplicate code
	o  make mmap() usage portable, fixes linux & ranges: support
	o  document the -f option
	o  daemon mode now serves 6 files per child
2009-05-23 02:21:19 +00:00

30 lines
850 B
Makefile

# $eterna: Makefile,v 1.1 2009/05/22 21:51:39 mrg Exp $
# build a 100% lean bozohttpd-small.c
PROG= bozohttpd-small
NOMAN= # defined
SRCS= bozohttpd-small.c content-bozo-small.c
LEAN_IFDEF_FLAGS= -UDEBUG -DNO_USER_SUPPORT \
-DNO_CGIBIN_SUPPORT -DNO_DIRINDEX_SUPPORT \
-DNO_DAEMON_MODE -DNO_DYNAMIC_CONTENT \
-DNO_SSL_SUPPORT -UDO_HTPASSWD
CFLAGS= -I$(.CURDIR)/.. ${LEAN_IFDEF_FLAGS}
bozohttpd-small.c: bozohttpd.c
unifdef $(LEAN_IFDEF_FLAGS) < $> > $@.tmp ;\
if [ $$? -ne 1 ]; then echo "unifdef returned $?, expecting 1" 2>&1; false; fi
mv -f $@.tmp $@
content-bozo-small.c: content-bozo.c
unifdef $(LEAN_IFDEF_FLAGS) < $> > $@.tmp ;\
if [ $$? -ne 1 ]; then echo "unifdef returned $?, expecting 1" 2>&1; false; fi
mv -f $@.tmp $@
CLEANFILES+= content-bozo-small.c bozohttpd-small.c
.PATH: $(.CURDIR)/..
.include <bsd.prog.mk>