From 8868f3ed2312f7cd887613864cd14c0d12260aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Sat, 14 Jan 2017 22:21:21 -0500 Subject: [PATCH] append to compile flags instead of overwriting CFLAGS and LDFLAGS may be passed in by an upstream build system. we want to make sure we absolutely add our dependency flags otherwise stuff like hardening flags will break the build Closes: #29 --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 2f0f843..5028ee4 100644 --- a/Makefile +++ b/Makefile @@ -10,14 +10,14 @@ INSTALLPATH = ${DESTDIR}${PREFIX}/bin MANPATH = ${DESTDIR}${PREFIX}/share/man/man1 ifeq ($(shell sh -c 'which ncurses5-config>/dev/null 2>/dev/null && echo y'), y) - CFLAGS ?= -Wall -g $$(ncurses5-config --cflags) - LDFLAGS ?= $$(ncurses5-config --libs) + CFLAGS += -Wall -g $$(ncurses5-config --cflags) + LDFLAGS += $$(ncurses5-config --libs) else ifeq ($(shell sh -c 'which ncursesw5-config>/dev/null 2>/dev/null && echo y'), y) - CFLAGS ?= -Wall -g $$(ncursesw5-config --cflags) - LDFLAGS ?= $$(ncursesw5-config --libs) + CFLAGS += -Wall -g $$(ncursesw5-config --cflags) + LDFLAGS += $$(ncursesw5-config --libs) else - CFLAGS ?= -Wall -g $$(pkg-config --cflags ncurses) - LDFLAGS ?= $$(pkg-config --libs ncurses) + CFLAGS += -Wall -g $$(pkg-config --cflags ncurses) + LDFLAGS += $$(pkg-config --libs ncurses) endif tty-clock : ${SRC}