diff options
Diffstat (limited to 'nest/Makefile')
-rw-r--r-- | nest/Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nest/Makefile b/nest/Makefile index 0350c3b6..5b27da0c 100644 --- a/nest/Makefile +++ b/nest/Makefile @@ -2,11 +2,14 @@ src := cli.c cmds.c iface.c locks.c neighbor.c password.c proto.c proto-build.c 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 "#include \"lib/birdlib.h\"\n$(patsubst %,void %(void);\n,$(PROTO_BUILD)) void protos_build_gen(void) { $(patsubst %, %();\n,$(PROTO_BUILD))}" > $@ + $(Q)echo "#include \"lib/birdlib.h\"" > $@ + $(Q)$(patsubst %,echo 'void %_build(void);' >> $@;,$(PROTO_BUILD)) + $(Q)echo "void protos_build_gen(void) {" >> $@ + $(Q)$(patsubst %,echo ' %_build();'>>$@;,$(PROTO_BUILD)) + $(Q)echo "}" >> $@ tests_src := tests_targets := $(tests_targets) $(tests-target-files) |