Blob Blame History Raw
From 910e5ec42b7d04e4d7e650f8bd20afd06f418ae5 Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Fri, 25 Nov 2016 12:22:13 +0100
Subject: [PATCH] Makefile: Allow setting custom compiler flags

This allows to override CC variable and to extend CFLAGS, LDFLAGS and
LDLIBS variables.

Signed-off-by: Phil Sutter <psutter@redhat.com>
---
 src/Makefile  | 8 ++++----
 test/Makefile | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index b8b0188502189..19e3785665a86 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -7,10 +7,10 @@
 #
 #  (C) Fabio Busatto <fabio.busatto@gmail.com>
 
-CC=gcc
-CFLAGS=-fPIC -ansi -pedantic -Wall
-LDFLAGS=-shared -Wl,-soname,libkeepalive.so
-LDLIBS=-ldl
+CC	:= gcc
+CFLAGS	+= -fPIC -ansi -pedantic -Wall
+LDFLAGS	+= -shared -Wl,-soname,libkeepalive.so
+LDLIBS	+= -ldl
 
 default: libkeepalive.so
 
diff --git a/test/Makefile b/test/Makefile
index 6baf822c2338d..6a279a0ac6b94 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -7,7 +7,7 @@
 #
 #  (C) Fabio Busatto <fabio.busatto@gmail.com>
 
-CC=gcc
+CC := gcc
 
 default: test
 
-- 
2.10.0