From: Andre Noll Date: Mon, 2 Nov 2009 13:43:51 +0000 (+0100) Subject: Set CC to gcc by default. X-Git-Tag: v0.1.0~4 X-Git-Url: http://git.tuebingen.mpg.de/versions/paraslash-0.3.1.tar.bz2.asc?a=commitdiff_plain;h=d2e63f5c74e8eaeef202d739637e9ae96264aa52;p=adu.git Set CC to gcc by default. 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. --- diff --git a/Makefile b/Makefile index 9a0ffb7..c61dff7 100644 --- 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)))