client=$(addprefix $(exedir)/,@CLIENT@)
daemon=$(exedir)/bird
protocols=@protocols@
+PROTO_BUILD := $(protocols) dev kif krt
prefix=@prefix@
exec_prefix=@exec_prefix@
conf-y-targets := $(addprefix $(objdir)/conf/,cf-parse.y keywords.h commands.h)
cf-local = $(conf-y-targets): $(s)config.Y
-# nest/Makefile declarations needed for all other modules
-proto-build-c := $(addprefix $(objdir)/nest/,proto-build.c)
-
src-o-files = $(patsubst %.c,$(o)%.o,$(src))
tests-target-files = $(patsubst %.c,$(o)%,$(tests_src))
o = $(patsubst $(srcdir)%,$(objdir)%,$(s))
endif
-define proto-build_in =
-PROTO_BUILD += $(1)
-$(proto-build-c): $(lastword $(MAKEFILE_LIST))
-endef
-
-proto-build = $(eval $(call proto-build_in,$(1)))
-
define clean_in =
clean::
rm -f $(addprefix $(o),$(1))
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,dev_build)
-$(proto-build-c): $(lastword $(MAKEFILE_LIST))
+$(objdir)/nest/proto-build.c: $(lastword $(MAKEFILE_LIST))
$(E)echo GEN $@
- $(Q)echo "$(patsubst %,void %(void); ,$(PROTO_BUILD)) void protos_build_gen(void) { $(patsubst %, %(); ,$(PROTO_BUILD))}" > $@
+ $(Q)echo "$(patsubst %,void %_build(void); ,$(PROTO_BUILD)) void protos_build_gen(void) { $(patsubst %, %_build(); ,$(PROTO_BUILD))}" > $@
tests_src := a-set_test.c a-path_test.c
tests_targets := $(tests_targets) $(tests-target-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,babel_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,bfd_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,bgp_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,mrt_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,ospf_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,perf_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,pipe_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,radv_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,rip_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,rpki_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,static_build)
tests_objs := $(tests_objs) $(src-o-files)
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
-$(call proto-build,kif_build)
-$(call proto-build,krt_build)
$(conf-y-targets): $(s)krt.Y
src := $(filter-out main.c, $(src))