diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/thermal/tmon/Makefile | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile index 3a961e998281..1e11bd38a6b4 100644 --- a/tools/thermal/tmon/Makefile +++ b/tools/thermal/tmon/Makefile | |||
@@ -1,9 +1,15 @@ | |||
1 | # We need this for the "cc-option" macro. | ||
2 | include ../../../scripts/Kbuild.include | ||
3 | |||
1 | VERSION = 1.0 | 4 | VERSION = 1.0 |
2 | 5 | ||
3 | BINDIR=usr/bin | 6 | BINDIR=usr/bin |
4 | WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int | 7 | WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int |
5 | CFLAGS+= -O1 ${WARNFLAGS} -fstack-protector | 8 | CFLAGS+= -O1 ${WARNFLAGS} |
6 | CC=$(CROSS_COMPILE)gcc | 9 | # Add "-fstack-protector" only if toolchain supports it. |
10 | CFLAGS+= $(call cc-option,-fstack-protector) | ||
11 | CC?= $(CROSS_COMPILE)gcc | ||
12 | PKG_CONFIG?= pkg-config | ||
7 | 13 | ||
8 | CFLAGS+=-D VERSION=\"$(VERSION)\" | 14 | CFLAGS+=-D VERSION=\"$(VERSION)\" |
9 | LDFLAGS+= | 15 | LDFLAGS+= |
@@ -18,12 +24,12 @@ STATIC := --static | |||
18 | endif | 24 | endif |
19 | 25 | ||
20 | TMON_LIBS=-lm -lpthread | 26 | TMON_LIBS=-lm -lpthread |
21 | TMON_LIBS += $(shell pkg-config --libs $(STATIC) panelw ncursesw 2> /dev/null || \ | 27 | TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null || \ |
22 | pkg-config --libs $(STATIC) panel ncurses 2> /dev/null || \ | 28 | $(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \ |
23 | echo -lpanel -lncurses) | 29 | echo -lpanel -lncurses) |
24 | 30 | ||
25 | CFLAGS += $(shell pkg-config --cflags $(STATIC) panelw ncursesw 2> /dev/null || \ | 31 | CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \ |
26 | pkg-config --cflags $(STATIC) panel ncurses 2> /dev/null) | 32 | $(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null) |
27 | 33 | ||
28 | OBJS = tmon.o tui.o sysfs.o pid.o | 34 | OBJS = tmon.o tui.o sysfs.o pid.o |
29 | OBJS += | 35 | OBJS += |