Commit ad6b474f authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

tools thermal tmon: Allow overriding CFLAGS assignments

So that the user can provide, e.g. distro package alternative values.
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Herton Krzesinski  <herton@redhat.com>
Cc: Markus Mayer <mmayer@broadcom.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Link: http://lkml.kernel.org/r/20181212102537.25902-3-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f1770e3c
...@@ -6,13 +6,13 @@ VERSION = 1.0 ...@@ -6,13 +6,13 @@ VERSION = 1.0
BINDIR=usr/bin BINDIR=usr/bin
WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int
CFLAGS+= -O1 ${WARNFLAGS} override CFLAGS+= -O1 ${WARNFLAGS}
# Add "-fstack-protector" only if toolchain supports it. # Add "-fstack-protector" only if toolchain supports it.
CFLAGS+= $(call cc-option,-fstack-protector) override CFLAGS+= $(call cc-option,-fstack-protector-strong)
CC?= $(CROSS_COMPILE)gcc CC?= $(CROSS_COMPILE)gcc
PKG_CONFIG?= pkg-config PKG_CONFIG?= pkg-config
CFLAGS+=-D VERSION=\"$(VERSION)\" override CFLAGS+=-D VERSION=\"$(VERSION)\"
LDFLAGS+= LDFLAGS+=
TARGET=tmon TARGET=tmon
...@@ -29,7 +29,7 @@ TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null ...@@ -29,7 +29,7 @@ TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null
$(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \ $(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \
echo -lpanel -lncurses) echo -lpanel -lncurses)
CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \ override CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
$(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null) $(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
OBJS = tmon.o tui.o sysfs.o pid.o OBJS = tmon.o tui.o sysfs.o pid.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment