65d2a88dd2
The RPKI protocol (RFC 6810) using the RTRLib (http://rpki.realmv6.org/) that is integrated inside the BIRD's code. Implemeted transports are: - unprotected transport over TCP - secure transport over SSHv2 Example configuration of bird.conf: ... roa4 table r4; roa6 table r6; protocol rpki { debug all; # Import both IPv4 and IPv6 ROAs roa4 { table r4; }; roa6 { table r6; }; # Set cache server (validator) address, # overwrite default port 323 remote "rpki-validator.realmv6.org" port 8282; # Overwrite default time intervals retry 10; # Default 600 seconds refresh 60; # Default 3600 seconds expire 600; # Default 7200 seconds } protocol rpki { debug all; # Import only IPv4 routes roa4 { table r4; }; # Set cache server address to localhost, # use default ports tcp => 323 or ssh => 22 remote 127.0.0.1; # Use SSH transport instead of unprotected transport over TCP ssh encryption { bird private key "/home/birdgeek/.ssh/id_rsa"; remote public key "/home/birdgeek/.ssh/known_hosts"; user "birdgeek"; }; } ...
161 lines
3.9 KiB
Makefile
161 lines
3.9 KiB
Makefile
# Makefile for the BIRD Internet Routing Daemon
|
|
# (c) 1999--2000 Martin Mares <mj@ucw.cz>
|
|
# (c) 2016 Jan Moskyto Matejka <mq@ucw.cz>
|
|
|
|
# Disable build-in rules
|
|
MAKEFLAGS += -r
|
|
|
|
# Variable definitions
|
|
CPPFLAGS=-I$(objdir) -I$(srcdir) @CPPFLAGS@
|
|
CFLAGS=$(CPPFLAGS) @CFLAGS@
|
|
LDFLAGS=@LDFLAGS@
|
|
LIBS=@LIBS@
|
|
DAEMON_LIBS=@DAEMON_LIBS@
|
|
CLIENT_LIBS=@CLIENT_LIBS@
|
|
CC=@CC@
|
|
M4=@M4@
|
|
BISON=@BISON@
|
|
FLEX=@FLEX@
|
|
RANLIB=@RANLIB@
|
|
INSTALL=@INSTALL@
|
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|
INSTALL_DATA=@INSTALL_DATA@
|
|
|
|
client=$(addprefix $(exedir)/,@CLIENT@)
|
|
daemon=$(exedir)/bird
|
|
protocols = @protocols@
|
|
|
|
prefix=@prefix@
|
|
exec_prefix=@exec_prefix@
|
|
bindir=@bindir@
|
|
sbindir=@sbindir@
|
|
sysconfdir=@sysconfdir@
|
|
localstatedir=@localstatedir@
|
|
docdir=@prefix@/doc
|
|
|
|
srcdir := @srcdir@
|
|
objdir := @objdir@
|
|
exedir := @exedir@
|
|
|
|
ifeq ($(objdir),.)
|
|
objdir := $(realpath .)
|
|
endif
|
|
|
|
ifeq ($(VERBOSE),)
|
|
E:=@
|
|
Q:=@
|
|
else
|
|
E:=@\#
|
|
Q:=
|
|
endif
|
|
|
|
# Meta rules
|
|
cleangoals := clean distclean
|
|
docgoals := docs userdocs progdocs
|
|
.PHONY: all daemon cli $(cleangoals) $(docgoals) tags
|
|
all: daemon cli
|
|
|
|
daemon: $(daemon)
|
|
cli: $(client)
|
|
|
|
$(daemon): LIBS += $(DAEMON_LIBS)
|
|
|
|
# Include directories
|
|
dirs := client conf doc filter lib nest $(addprefix proto/,$(protocols)) @sysdep_dirs@
|
|
|
|
conf-y-targets := $(addprefix $(objdir)/conf/,cf-parse.y keywords.h commands.h)
|
|
cf-local = $(conf-y-targets): $(s)config.Y
|
|
|
|
src-o-files = $(patsubst %.c,$(o)%.o,$(src))
|
|
|
|
all-daemon = $(exedir)/bird: $(obj)
|
|
all-client = $(exedir)/birdc $(exedir)/birdcl: $(obj)
|
|
|
|
s = $(dir $(lastword $(MAKEFILE_LIST)))
|
|
ifeq ($(srcdir),.)
|
|
o = $(objdir)/$(s)
|
|
else
|
|
o = $(patsubst $(srcdir)%,$(objdir)%,$(s))
|
|
endif
|
|
|
|
define clean_in =
|
|
clean::
|
|
rm -f $(addprefix $(o),$(1))
|
|
endef
|
|
|
|
clean = $(eval $(call clean_in,$(1)))
|
|
|
|
include $(addsuffix /Makefile,$(addprefix $(srcdir)/,$(dirs)))
|
|
|
|
# Generic rules
|
|
|
|
$(objdir)/%.o: $(srcdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h
|
|
$(E)echo CC -o $@ -c $<
|
|
$(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
|
|
|
|
$(objdir)/%.o: $(objdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h
|
|
$(E)echo CC -o $@ -c $<
|
|
$(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
|
|
|
|
$(objdir)/.dir-stamp:
|
|
$(E)echo MKDIR -p $(addprefix $(objdir)/,$(dirs) doc)
|
|
$(Q)mkdir -p $(addprefix $(objdir)/,$(dirs) doc)
|
|
$(Q)touch $@
|
|
|
|
$(client) $(daemon):
|
|
$(E)echo LD $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
$(Q)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
$(objdir)/sysdep/paths.h: Makefile
|
|
echo >$@ "/* Generated by Makefile, don't edit manually! */"
|
|
echo >>$@ "#define PATH_CONFIG_FILE \"@CONFIG_FILE@\""
|
|
echo >>$@ "#define PATH_CONTROL_SOCKET \"@CONTROL_SOCKET@\""
|
|
if test -n "@iproutedir@" ; then echo >>$@ "#define PATH_IPROUTE_DIR \"@iproutedir@\"" ; fi
|
|
|
|
# Finally include the computed dependencies
|
|
|
|
ifneq ($(filter-out $(cleangoals),$(MAKECMDGOALS)),)
|
|
-include $(shell find $(objdir) -name "*.d")
|
|
endif
|
|
|
|
ifeq ($(MAKECMDGOALS),)
|
|
-include $(shell find $(objdir) -name "*.d")
|
|
endif
|
|
|
|
tags:
|
|
cd $(srcdir) ; etags -lc `find $(dirs) -name *.[chY]`
|
|
|
|
# Install
|
|
|
|
install: all
|
|
$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@
|
|
$(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/bird
|
|
$(INSTALL_PROGRAM) $(exedir)/birdcl $(DESTDIR)/$(sbindir)/birdcl
|
|
if test -n "@CLIENT@" ; then \
|
|
$(INSTALL_PROGRAM) $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc ; \
|
|
fi
|
|
if ! test -f $(DESTDIR)/@CONFIG_FILE@ ; then \
|
|
$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/@CONFIG_FILE@ ; \
|
|
else \
|
|
echo "Not overwriting old bird.conf" ; \
|
|
fi
|
|
|
|
install-docs:
|
|
$(INSTALL) -d $(DESTDIR)/$(docdir)
|
|
$(INSTALL_DATA) $(objdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/
|
|
|
|
# Cleanup
|
|
clean::
|
|
rm -f $(objdir)/sysdep/paths.h
|
|
rm -f $(addprefix $(exedir)/,bird birdc birdcl)
|
|
find $(objdir) -name "*.[od]" -exec rm -f '{}' '+'
|
|
|
|
ifeq ($(objdir),obj)
|
|
distclean: clean
|
|
rm -rf $(objdir)
|
|
rm -f config.log config.status configure Makefile
|
|
else
|
|
distclean: clean
|
|
rm -rf * .dir-stamp
|
|
rm -f config.log config.status configure Makefile
|
|
endif
|