summaryrefslogtreecommitdiffstats
path: root/freebsd-userspace/Makefile
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2012-09-06 10:36:47 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2012-09-06 10:36:47 -0500
commit9dd59215ce0de247fadd2ad186e4050500943b4f (patch)
tree31a842d8b97c63f959e229932749cca1147984b2 /freebsd-userspace/Makefile
parentRevert patches moving include of port_local.h to top of file (diff)
parentroute: Added files for the route command. (diff)
downloadrtems-libbsd-9dd59215ce0de247fadd2ad186e4050500943b4f.tar.bz2
Merge branch 'master' of ssh://git.rtems.org/data/git/rtems-libbsd
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 \