fio Makefile improvement - don't override $(CC)
authorJens Axboe <axboe@kernel.dk>
Tue, 14 Aug 2012 12:34:32 +0000 (14:34 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 14 Aug 2012 12:34:32 +0000 (14:34 +0200)
I tried to build fio 2.0.8 today and found that the Makefile
unconditionally sets CC.
Since I've only got clang on my FreeBSD box it needs to avoid overriding
the default.

Use the default system compiler - don't override $(CC) if already set.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile

index 6a41710ba66b3218711e80ef4243bd48181039d6..9d3945b39564de873d65f0939c79faaf1d5fbe2b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CC     = gcc
+CC     ?= gcc
 DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
 CPPFLAGS= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
        $(DEBUGFLAGS)
 DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
 CPPFLAGS= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
        $(DEBUGFLAGS)