From 12a1eb975f2f781ac666e8ba06566c93f369bfba Mon Sep 17 00:00:00 2001
From: Dmitry Marakasov <amdmi3@amdmi3.ru>
Date: Tue, 11 Oct 2016 18:42:48 +0300
Subject: [PATCH] Make CFLAGS more user-friendly

Set bits which may be overridden by the user (debug, optimization)
as default value, and append mandatory stuff (warnings, defines)
later
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 8400e30..f34c037 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,8 @@ GIT_VER = $(shell git describe --tags --dirty --always 2>/dev/null)
 uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
 deltacast_inc := $(shell sh -c 'test -f /usr/include/StreamMaster.h && echo -n Y')
 
-CFLAGS += -Wall -Wformat-security -Wno-strict-aliasing -O3 -fomit-frame-pointer
-CFLAGS += -g
+CFLAGS ?= -O3 -fomit-frame-pointer -g
+CFLAGS += -Wall -Wformat-security -Wno-strict-aliasing
 CFLAGS += -DVERSION=\"$(VERSION_MAJOR).$(VERSION_MINOR)\"
 CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR)
 CFLAGS += -DVERSION_MINOR=$(VERSION_MINOR)
-- 
GitLab