[07/14] batmand: Only define CC when not already specified

Message ID 1305983442-1607-7-git-send-email-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit ed8b80e9b7bfb50d65cf6e09becd5eb7618bdc0f
Headers

Commit Message

Sven Eckelmann May 21, 2011, 1:10 p.m. UTC
  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@narfation.org>
---
This patch depends on other patches submitted earlier:
 - batmand: Fix FTBFS on second build attempt
 - batmand: Remove obsolete creation of source packages
 - batmand: Remove subversion/svk revision information
 - batmand: Use nproc to get number of available processors

 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
  

Patch

diff --git a/Makefile b/Makefile
index 3b517da..804bdd4 100755
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@  endif
 # activate this variable to deactivate policy routing for backward compatibility
 #NO_POLICY_ROUTING = -DNO_POLICY_ROUTING
 
-CC =		gcc
+CC ?=		gcc
 CFLAGS +=	-pedantic -Wall -W -std=gnu99
 EXTRA_CFLAGS =	-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING) -DREVISION_VERSION=$(REVISION_VERSION)
 LDFLAGS +=	-lpthread