summaryrefslogtreecommitdiffstats
path: root/freebsd-userspace/Makefile
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2012-09-06 10:19:13 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2012-09-06 10:19:13 -0500
commitbd2941b4d4f81560d8566ef68a8bb9759841ba14 (patch)
treeea50515577441c3a9cfd4a215db31a2d94d8a717 /freebsd-userspace/Makefile
parentAdded netatalk files (diff)
downloadrtems-libbsd-bd2941b4d4f81560d8566ef68a8bb9759841ba14.tar.bz2
route: Added files for the route command.
Diffstat (limited to 'freebsd-userspace/Makefile')
-rw-r--r--freebsd-userspace/Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/freebsd-userspace/Makefile b/freebsd-userspace/Makefile
index 049555fc..9869d8c8 100644
--- a/freebsd-userspace/Makefile
+++ b/freebsd-userspace/Makefile
@@ -86,12 +86,15 @@ C_FILES += rtems/syslog.c
C_FILES += commands/sbin/ping/ping.c
C_FILES += commands/sbin/ping6/ping6.c
+# route command sources
+C_FILES += commands/sbin/route/route.c
+
C_O_FILES = $(C_FILES:%.c=%.o)
C_D_FILES = $(C_FILES:%.c=%.d)
LIB = libbsdc.a
GEN_FILES = include/rpc/rpcb_prot.h
-
+GEN_FILES += commands/sbin/route/keywords.h
all: $(LIB)
$(LIB): $(GEN_FILES) $(C_O_FILES)
@@ -101,6 +104,16 @@ include/rpc/rpcb_prot.h: include/rpc/rpcb_prot.x
rm -f include/rpc/rpcb_prot.h
rpcgen -h -o include/rpc/rpcb_prot.h include/rpc/rpcb_prot.x
+commands/sbin/route/keywords.h: commands/sbin/route/keywords
+ sed -e '/^#/d' -e '/^$$/d' commands/sbin/route//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 }' \
+ > commands/sbin/route/keywords.h
+ rm -f _keywords.tmp
+
install: $(LIB)
install -d $(INSTALL_BASE)/include
cd include; for i in `find . -name '*.h'` ; do \