Author: axel Date: 2009-12-17 13:32:48 +0000 (Thu, 17 Dec 2009) New Revision: 1505
Modified: trunk/batman-experimental/Makefile trunk/batman-experimental/lib/bmx_gsf_map/Makefile trunk/batman-experimental/lib/bmx_howto_plugin/Makefile trunk/batman-experimental/lib/bmx_howto_plugin/howto_plugin.c trunk/batman-experimental/lib/bmx_http_info/Makefile trunk/batman-experimental/lib/bmx_uci_config/Makefile Log: Makefiles: separate make libs from make all, introduce new make targets: help strip strip_libs strip_all build_all, install_all, clean_all, strip_all...
Modified: trunk/batman-experimental/Makefile =================================================================== --- trunk/batman-experimental/Makefile 2009-12-17 13:23:35 UTC (rev 1504) +++ trunk/batman-experimental/Makefile 2009-12-17 13:32:48 UTC (rev 1505) @@ -96,11 +96,16 @@
SNAPSHOT_DIR= ../bmx-snapshots
+ all: $(MAKE) $(BINARY_NAME) - $(MAKE) -C lib $@ - + $(MAKE) help
+libs: all + $(MAKE) -C lib all + + + $(BINARY_NAME): $(OBJS) Makefile $(CC) $(OBJS) -o $@ $(LDFLAGS) $(EXTRA_LDFLAGS)
@@ -111,12 +116,44 @@ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
+strip: all + strip $(BINARY_NAME) + +strip_libs: all libs + $(MAKE) -C lib strip + + + + install: all mkdir -p $(SBINDIR) install -m 0755 $(BINARY_NAME) $(SBINDIR) + +install_libs: $(MAKE) -C lib install + + clean: rm -f $(BINARY_NAME) *.o posix/*.o linux/*.o + +clean_libs: $(MAKE) -C lib clean
+ +clean_all: clean clean_libs +build_all: all libs +strip_all: strip strip_libs +install_all: install install_libs + + +help: + # make targets: + # help show this help + # all compile bmxd core only + # libs compile bmx plugins + # build_all compile bmxd and plugins + # strip / strip_libs / strip_all strip bmxd / plugins / all + # install / install_libs / install_all install bmxd / plugins / all + # clean / clean_libs / clean_all clean bmxd / libs / all +
Modified: trunk/batman-experimental/lib/bmx_gsf_map/Makefile =================================================================== --- trunk/batman-experimental/lib/bmx_gsf_map/Makefile 2009-12-17 13:23:35 UTC (rev 1504) +++ trunk/batman-experimental/lib/bmx_gsf_map/Makefile 2009-12-17 13:32:48 UTC (rev 1505) @@ -33,3 +33,6 @@ mkdir -p $(LIBDIR) install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); /sbin/ldconfig -n $(LIBDIR); ln -f -s $(LIBDIR)/$(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_SHORTNAME)
+ +strip: all + strip $(PLUGIN_FULLNAME)
Modified: trunk/batman-experimental/lib/bmx_howto_plugin/Makefile =================================================================== --- trunk/batman-experimental/lib/bmx_howto_plugin/Makefile 2009-12-17 13:23:35 UTC (rev 1504) +++ trunk/batman-experimental/lib/bmx_howto_plugin/Makefile 2009-12-17 13:32:48 UTC (rev 1505) @@ -33,3 +33,6 @@ mkdir -p $(LIBDIR) install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); /sbin/ldconfig -n $(LIBDIR); ln -f -s $(LIBDIR)/$(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_SHORTNAME)
+ +strip: all + strip $(PLUGIN_FULLNAME)
Modified: trunk/batman-experimental/lib/bmx_howto_plugin/howto_plugin.c =================================================================== --- trunk/batman-experimental/lib/bmx_howto_plugin/howto_plugin.c 2009-12-17 13:23:35 UTC (rev 1504) +++ trunk/batman-experimental/lib/bmx_howto_plugin/howto_plugin.c 2009-12-17 13:32:48 UTC (rev 1505) @@ -36,6 +36,7 @@ static int32_t opt_howto_do ( uint8_t cmd, uint8_t _save, struct opt_type *opt, struct opt_parent *patch, struct ctrl_node *cn ) { static uint8_t call_counter; + struct opt_parent *p; if ( cmd == OPT_REGISTER ) { @@ -51,21 +52,25 @@ call_counter++; dbgf_cn( cn, DBGL_CHANGES, DBGT_INFO, - "now called for the %d time: stored: %s", call_counter, patch->p_val ); + "now called for the %d time: going to store: %s", + call_counter, patch->p_val ); + dbgf( DBGL_CHANGES, DBGT_INFO, "%s - but currently still stored: %s", + opt_cmd2str[cmd], (p=get_opt_parent_val( opt, 0 )) ? p->p_val : NULL ); + } else if ( cmd == OPT_SET_POST ) { - //this block will only be executed after opt_howto_plugin option is set + // this block will always be executed + // after all options with this order were set and + // before any option with a higher order is set - struct opt_parent *p; - char *comment = (p=get_opt_parent_val( opt, 0 )) ? p->p_val : NULL; + dbgf( DBGL_CHANGES, DBGT_INFO, "%s - now stored: %s", + opt_cmd2str[cmd], (p=get_opt_parent_val( opt, 0 )) ? p->p_val : NULL ); - dbgf( DBGL_ALL, DBGT_INFO, "%s stored: %s", opt_cmd2str[cmd], comment ); - } else if ( cmd == OPT_POST ) { - //this block will only be executed after all options were set + //this block will always be executed after all options were set if ( !on_the_fly ) { //due to NOT on_the_fly
Modified: trunk/batman-experimental/lib/bmx_http_info/Makefile =================================================================== --- trunk/batman-experimental/lib/bmx_http_info/Makefile 2009-12-17 13:23:35 UTC (rev 1504) +++ trunk/batman-experimental/lib/bmx_http_info/Makefile 2009-12-17 13:32:48 UTC (rev 1505) @@ -33,3 +33,6 @@ mkdir -p $(LIBDIR) install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); /sbin/ldconfig -n $(LIBDIR); ln -f -s $(LIBDIR)/$(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_SHORTNAME)
+ +strip: all + strip $(PLUGIN_FULLNAME)
Modified: trunk/batman-experimental/lib/bmx_uci_config/Makefile =================================================================== --- trunk/batman-experimental/lib/bmx_uci_config/Makefile 2009-12-17 13:23:35 UTC (rev 1504) +++ trunk/batman-experimental/lib/bmx_uci_config/Makefile 2009-12-17 13:32:48 UTC (rev 1505) @@ -33,3 +33,6 @@ mkdir -p $(LIBDIR) install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); /sbin/ldconfig -n $(LIBDIR); ln -f -s $(LIBDIR)/$(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_SHORTNAME)
+ +strip: all + strip $(PLUGIN_FULLNAME)