b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 04/14] batctl: Directly specify objects in Makefile
Date: Sat, 21 May 2011 14:28:08 +0200	[thread overview]
Message-ID: <1305980898-30494-4-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <1305980898-30494-1-git-send-email-sven@narfation.org>

The information about header and source files aren't needed by the
Makefile. Only the dependencies to headers provide useful information,
but these are automatically included by the generated *.d files.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 Makefile |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index cf0b5c5..1bc4879 100644
--- a/Makefile
+++ b/Makefile
@@ -32,12 +32,8 @@ LDFLAGS += -lm
 
 SBINDIR = $(INSTALL_PREFIX)/usr/sbin
 
-EXTRA_MODULES_C := bisect.c
-EXTRA_MODULES_H := bisect.h
-
-SRC_C = main.c bat-hosts.c functions.c sys.c debug.c ping.c traceroute.c tcpdump.c list-batman.c hash.c vis.c debugfs.c $(EXTRA_MODULES_C)
-SRC_H = main.h bat-hosts.h functions.h sys.h debug.h ping.h traceroute.h tcpdump.h list-batman.h hash.h allocate.h vis.h debugfs.h $(EXTRA_MODULES_H)
-SRC_O = $(SRC_C:.c=.o)
+OBJ = main.o bat-hosts.o functions.o sys.o debug.o ping.o traceroute.o tcpdump.o list-batman.o hash.o vis.o debugfs.o bisect.o
+DEP = $(OBJ:.o=.d)
 
 BINARY_NAME = batctl
 
@@ -49,15 +45,15 @@ REVISION_VERSION =\"\ $(REVISION)\"
 
 all: $(BINARY_NAME)
 
-$(BINARY_NAME): $(SRC_O) $(SRC_H) Makefile
-	$(Q_LD)$(CC) -o $@ $(SRC_O) $(LDFLAGS)
+$(BINARY_NAME): $(OBJ) Makefile
+	$(Q_LD)$(CC) -o $@ $(OBJ) $(LDFLAGS)
 
 .c.o:
 	$(Q_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MD -c $< -o $@
--include $(SRC_C:.c=.d)
+-include $(DEP)
 
 clean:
-	rm -f $(BINARY_NAME) *.o *.d
+	rm -f $(BINARY_NAME) $(OBJ) $(DEP)
 
 install:
 	mkdir -p $(SBINDIR)
-- 
1.7.5.1


  parent reply	other threads:[~2011-05-21 12:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-21 12:28 [B.A.T.M.A.N.] [PATCH 01/14] batctl: Remove optimisation and debugging options Sven Eckelmann
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 02/14] batctl: Don't automatically build in parallel Sven Eckelmann
2011-05-22  9:32   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 03/14] batctl: Remove unused Makefile variables Sven Eckelmann
2011-05-22  9:33   ` Marek Lindner
2011-05-21 12:28 ` Sven Eckelmann [this message]
2011-05-22  9:38   ` [B.A.T.M.A.N.] [PATCH 04/14] batctl: Directly specify objects in Makefile Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 05/14] batctl: Provide shebang to inform about interpreter Sven Eckelmann
2011-05-22  9:41   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 06/14] batctl: Mark makefile targets without output as PHONY Sven Eckelmann
2011-05-22  9:41   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 07/14] batctl: Only define CC when not already specified Sven Eckelmann
2011-05-22  9:42   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 08/14] batctl: Build binary before installing it Sven Eckelmann
2011-05-22  9:43   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 09/14] batctl: Reorder Makefile for better readability Sven Eckelmann
2011-05-22  9:46   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 10/14] batctl: Use standard-like build rules Sven Eckelmann
2011-05-22 10:07   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 11/14] batctl: Make called tools in clean and install configurable Sven Eckelmann
2011-05-22 10:07   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 12/14] batctl: Rename INSTALL_PREFIX to DESTDIR Sven Eckelmann
2011-05-22 10:09   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 13/14] batctl: Introduce PREFIX as standard installation prefix Sven Eckelmann
2011-05-22 10:11   ` Marek Lindner
2011-05-21 12:28 ` [B.A.T.M.A.N.] [PATCH 14/14] batctl: Install manpage Sven Eckelmann
2011-05-22 10:12   ` Marek Lindner
2011-05-22  9:29 ` [B.A.T.M.A.N.] [PATCH 01/14] batctl: Remove optimisation and debugging options Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305980898-30494-4-git-send-email-sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).