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