The following commit has been merged in the master branch:
commit 8ae5eed8e9225045f449246cabf057ea7aa79cf4
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 21 14:28:11 2011 +0200
batctl: Only define CC when not already specified
It is possible that a build environment specifies the CC different than
gcc (for example gcc-4.6). The Makefile should only set it when the
compiler wasn't explicitely set.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/Makefile b/Makefile
index f95a9d2..a06177d 100755
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ ifndef V
endif
endif
-CC = gcc
+CC ?= gcc
CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing
EXTRA_CFLAGS = -DREVISION_VERSION=$(REVISION_VERSION)
LDFLAGS += -lm
--
batctl
The following commit has been merged in the master branch:
commit d487861eab6748165c72e6f064f37742057049ff
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 21 14:28:10 2011 +0200
batctl: Mark makefile targets without output as PHONY
Normally makefile targets should create an output with the same name as
the target. It is necessary to mark them as PHONY to prevent that the
virtual target like all, clean or install aren't executed when a file
with the same name exists.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/Makefile b/Makefile
index 8fc2300..f95a9d2 100755
--- a/Makefile
+++ b/Makefile
@@ -60,3 +60,5 @@ clean:
install:
mkdir -p $(SBINDIR)
install -m 0755 $(BINARY_NAME) $(SBINDIR)
+
+.PHONY: all clean install
--
batctl
The following commit has been merged in the master branch:
commit 4866155949559809b37714873b938cacb7ae3af8
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 21 14:28:09 2011 +0200
batctl: Provide shebang to inform about interpreter
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/Makefile b/Makefile
old mode 100644
new mode 100755
index 1bc4879..8fc2300
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
#
# Copyright (C) 2006-2011 B.A.T.M.A.N. contributors
#
--
batctl
The following commit has been merged in the master branch:
commit b2e3f83a290334d272f3c4a7ea7d834750a6f7d3
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 21 14:28:06 2011 +0200
batctl: Don't automatically build in parallel
Distributions like Gentoo and Debian have policies which make it
necessary to use some kind of environmental variable to control the
parallel build.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/Makefile b/Makefile
index 3b9e853..61a81fb 100644
--- a/Makefile
+++ b/Makefile
@@ -53,10 +53,7 @@ REVISION= $(shell if [ -d .git ]; then \
REVISION_VERSION =\"\ $(REVISION)\"
-NUM_CPUS = $(shell nproc 2> /dev/null || echo 1)
-
-all:
- $(MAKE) -j $(NUM_CPUS) $(BINARY_NAME)
+all: $(BINARY_NAME)
$(BINARY_NAME): $(SRC_O) $(SRC_H) Makefile
$(Q_LD)$(CC) -o $@ $(SRC_O) $(LDFLAGS)
--
batctl