Makefile revision 1.5
1#	$eterna: Makefile,v 1.1 2009/05/22 21:51:39 mrg Exp $
2
3# build a 100% lean bozohttpd-small.c
4PROG=	bozohttpd-small
5NOMAN=	# defined
6SRCS=	bozohttpd-small.c content-bozo-small.c ssl-bozo.c main.c:
7
8LEAN_IFDEF_FLAGS=	-UDEBUG -DNO_USER_SUPPORT \
9			-DNO_CGIBIN_SUPPORT -DNO_DIRINDEX_SUPPORT \
10			-DNO_DAEMON_MODE -DNO_DYNAMIC_CONTENT \
11			-DNO_SSL_SUPPORT -UDO_HTPASSWD \
12			-DNO_LUA_SUPPORT -DNO_BLOCKLIST_SUPPORT
13
14CFLAGS=	-I$(.CURDIR)/.. ${LEAN_IFDEF_FLAGS}
15
16bozohttpd-small.c: bozohttpd.c
17	unifdef $(LEAN_IFDEF_FLAGS) < $> > $@.tmp;			\
18	status=$$?;							\
19	if [ $$status -ne 1 ]; then					\
20		echo "unifdef returned $$status, expecting 1" 2>&1;	\
21		false;							\
22	fi
23	mv -f $@.tmp $@
24
25content-bozo-small.c: content-bozo.c
26	unifdef $(LEAN_IFDEF_FLAGS) < $> > $@.tmp;			\
27	status=$$?;							\
28	if [ $$status -ne 1 ]; then					\
29		echo "unifdef returned $$status, expecting 1" 2>&1;	\
30		false;							\
31	fi
32	mv -f $@.tmp $@
33
34CLEANFILES+=	content-bozo-small.c bozohttpd-small.c
35
36.PATH: $(.CURDIR)/..
37
38.include <bsd.prog.mk>
39