51c5aa346a
This is also a good chance to apply style.Makefile(5) in some cases.
31 lines
588 B
Makefile
31 lines
588 B
Makefile
# @(#)Makefile 8.1 (Berkeley) 6/5/93
|
|
# $FreeBSD$
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
PROG= route
|
|
MAN= route.8
|
|
SRCS= route.c keywords.h
|
|
WARNS?= 0
|
|
CLEANFILES+=keywords.h _keywords.tmp
|
|
|
|
CFLAGS+= -DNS
|
|
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
|
CFLAGS+= -DINET6
|
|
.endif
|
|
|
|
CFLAGS+= -I.
|
|
|
|
keywords.h: keywords
|
|
sed -e '/^#/d' -e '/^$$/d' ${.CURDIR}/keywords > _keywords.tmp
|
|
LC_ALL=C tr 'a-z' 'A-Z' < _keywords.tmp | paste _keywords.tmp - | \
|
|
awk '{ \
|
|
if (NF > 1) \
|
|
printf "#define\tK_%s\t%d\n\t{\"%s\", K_%s},\n", \
|
|
$$2, NR, $$1, $$2 }' \
|
|
> ${.TARGET}
|
|
rm -f _keywords.tmp
|
|
|
|
.include <bsd.prog.mk>
|