From patchwork Thu Oct 25 16:22:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17590 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 94D9A831EE; Thu, 25 Oct 2018 18:24:41 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="euusvMfn"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 136AA831A7 for ; Thu, 25 Oct 2018 18:23:44 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593D355EE7FED32DEE9F3DCBB.dip0.t-ipconnect.de [IPv6:2003:c5:93d3:55ee:7fed:32de:e9f3:dcbb]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 17877110138; Thu, 25 Oct 2018 18:23:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1540484623; bh=bQixjGBAY2q6oCJKpv/hojwOv7eo3LABTA/h+p/w8O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=euusvMfn+266r4DFnwjy+LZiXaqEVKCRDOEKfcTUumn6QwUEJAHgX4WrSf0T+0kF6 pNILxtv50YP3YBjnxFIhbBLPiWtcL9WcWwbeyqpR0QNUmpJ5+7+Ql020aIrYSJUu3s RMLPJKQWjjByPBaKJnqxinr+M2chfahBTzhQztWM= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 25 Oct 2018 18:22:44 +0200 Message-Id: <20181025162245.19389-42-sven@narfation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181025162245.19389-1-sven@narfation.org> References: <20181025162245.19389-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH v3 41/42] batctl: Simplify enabling for bisect_iv subcommand X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The variable content of CONFIG_BATCTL_BISECT can be used to decide whether the bisect_iv command is enabled or not. This would make it possible in the future to introduce a generic way to enable or disable commands. Combining this with link-time-optimization and/or function/data-section allows to relatively freely scale the functionality of batctl and its size. Signed-off-by: Sven Eckelmann --- Makefile | 96 +++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 46 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index cf2b1c7..dfcfbd9 100755 --- a/Makefile +++ b/Makefile @@ -27,53 +27,49 @@ export CONFIG_BATCTL_BISECT=n # batctl build BINARY_NAME = batctl -OBJ_BISECT = bisect_iv.o - -OBJ += aggregation.o -OBJ += ap_isolation.o -OBJ += bat-hosts.o -OBJ += backbonetable.o -ifeq ($(CONFIG_BATCTL_BISECT),y) -OBJ += $(OBJ_BISECT) -endif -OBJ += bonding.o -OBJ += bridge_loop_avoidance.o -OBJ += claimtable.o -OBJ += dat_cache.o -OBJ += debugfs.o -OBJ += debug.o -OBJ += distributed_arp_table.o -OBJ += event.o -OBJ += fragmentation.o -OBJ += functions.o -OBJ += gateways.o -OBJ += genl.o -OBJ += gw_mode.o -OBJ += hash.o -OBJ += icmp_helper.o -OBJ += interface.o -OBJ += isolation_mark.o -OBJ += loglevel.o -OBJ += log.o -OBJ += main.o -OBJ += mcast_flags.o -OBJ += multicast_mode.o -OBJ += nc_nodes.o -OBJ += neighbors.o -OBJ += netlink.o -OBJ += network_coding.o -OBJ += ping.o -OBJ += originators.o -OBJ += orig_interval.o -OBJ += routing_algo.o -OBJ += statistics.o -OBJ += sys.o -OBJ += tcpdump.o -OBJ += throughputmeter.o -OBJ += traceroute.o -OBJ += transglobal.o -OBJ += translate.o -OBJ += translocal.o +obj-y += aggregation.o +obj-y += ap_isolation.o +obj-y += bat-hosts.o +obj-y += backbonetable.o +obj-$(CONFIG_BATCTL_BISECT) += bisect_iv.o +obj-y += bonding.o +obj-y += bridge_loop_avoidance.o +obj-y += claimtable.o +obj-y += dat_cache.o +obj-y += debugfs.o +obj-y += debug.o +obj-y += distributed_arp_table.o +obj-y += event.o +obj-y += fragmentation.o +obj-y += functions.o +obj-y += gateways.o +obj-y += genl.o +obj-y += gw_mode.o +obj-y += hash.o +obj-y += icmp_helper.o +obj-y += interface.o +obj-y += isolation_mark.o +obj-y += loglevel.o +obj-y += log.o +obj-y += main.o +obj-y += mcast_flags.o +obj-y += multicast_mode.o +obj-y += nc_nodes.o +obj-y += neighbors.o +obj-y += netlink.o +obj-y += network_coding.o +obj-y += ping.o +obj-y += originators.o +obj-y += orig_interval.o +obj-y += routing_algo.o +obj-y += statistics.o +obj-y += sys.o +obj-y += tcpdump.o +obj-y += throughputmeter.o +obj-y += traceroute.o +obj-y += transglobal.o +obj-y += translate.o +obj-y += translocal.o MANPAGE = man/batctl.8 @@ -150,11 +146,11 @@ all: $(BINARY_NAME) .c.o: $(COMPILE.c) -o $@ $< -$(BINARY_NAME): $(OBJ) +$(BINARY_NAME): $(obj-y) $(LINK.o) $^ $(LDLIBS) -o $@ clean: - $(RM) $(BINARY_NAME) $(OBJ) $(OBJ_BISECT) $(DEP) + $(RM) $(BINARY_NAME) $(obj-y) $(obj-n) $(DEP) install: $(BINARY_NAME) $(MKDIR) $(DESTDIR)$(SBINDIR) @@ -163,7 +159,7 @@ install: $(BINARY_NAME) $(INSTALL) -m 0644 $(MANPAGE) $(DESTDIR)$(MANDIR)/man8 # load dependencies -DEP = $(OBJ:.o=.d) $(OBJ_BISECT:.o=.d) +DEP = $(obj-y:.o=.d) $(obj-n:.o=.d) -include $(DEP) .PHONY: all clean install