]> git.tuebingen.mpg.de Git - adu.git/commitdiff
Set CC to gcc by default.
authorAndre Noll <maan@systemlinux.org>
Mon, 2 Nov 2009 13:43:51 +0000 (14:43 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 2 Nov 2009 13:43:51 +0000 (14:43 +0100)
On systems where cc != gcc, compilation likely fails because we are
using quite some gccisms in adu. So default to gcc but let the user
override the default by setting CC manually.

The straight-forward CC ?= gcc does not work with gnu make as make
assigns CC the default value "cc".

Thanks to Steffen Schmidt for pointing out this shortcoming.

Makefile

index 9a0ffb755466804413212d109757897c6e6724c1..c61dff74c58533953951f105aaec1ce4c7965496 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,9 @@ CPPFLAGS += -I/usr/local/include
 LDFLAGS += -L/usr/local/lib
 
 PREFIX ?= /usr/local
+ifeq "$(origin CC)" "default"
+       CC := gcc
+endif
 
 
 ifeq (,$(findstring BSD,$(uname_S)))