From: Andre Noll Date: Mon, 2 Nov 2009 13:39:16 +0000 (+0100) Subject: Set CC to gcc by default. X-Git-Tag: v0.1.1~5 X-Git-Url: http://git.tuebingen.mpg.de/?p=osl.git;a=commitdiff_plain;h=bc025530248c52e31a629b2a8943b2f68e919caa;hp=f55deeb0da0fe02cc3ff713e0a02057764b860a0 Set CC to gcc by default. On systems where cc != gcc, compilation likely fails because we are using quite some gccisms in osl. 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 ef12cb8..76925a6 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,9 @@ executables := oslfsck man_pages := oslfsck.1 INSTALL := install -CC := gcc +ifeq "$(origin CC)" "default" + CC := gcc +endif MKDIR := mkdir -p RM := rm -f LN := ln