mirror of https://github.com/aristocratos/btop.git
Compare commits
6 Commits
10758ac597
...
1b09f95d42
Author | SHA1 | Date |
---|---|---|
Laurent Cheylus | 1b09f95d42 | |
Jakob P. Liljenberg | ac62ba9de1 | |
Jakob P. Liljenberg | 3f917c0412 | |
Andrea Jemmett | 0127e8b3cd | |
Jos Dehaes | ebc86e9702 | |
Laurent Cheylus | 6db49a5608 |
13
Makefile
13
Makefile
|
@ -124,11 +124,9 @@ endif
|
|||
#? Pull in platform specific source files and get thread count
|
||||
ifeq ($(PLATFORM_LC),linux)
|
||||
PLATFORM_DIR := linux
|
||||
THREADS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
|
||||
SU_GROUP := root
|
||||
else ifeq ($(PLATFORM_LC),freebsd)
|
||||
PLATFORM_DIR := freebsd
|
||||
THREADS := $(shell getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)
|
||||
SU_GROUP := wheel
|
||||
override ADDFLAGS += -lm -lkvm -ldevstat -Wl,-rpath=/usr/local/lib/gcc$(CXX_VERSION_MAJOR)
|
||||
ifneq ($(STATIC),true)
|
||||
|
@ -137,12 +135,10 @@ else ifeq ($(PLATFORM_LC),freebsd)
|
|||
export MAKE = gmake
|
||||
else ifeq ($(PLATFORM_LC),macos)
|
||||
PLATFORM_DIR := osx
|
||||
THREADS := $(shell sysctl -n hw.ncpu || echo 1)
|
||||
override ADDFLAGS += -framework IOKit -framework CoreFoundation -Wno-format-truncation
|
||||
SU_GROUP := wheel
|
||||
else ifeq ($(PLATFORM_LC),openbsd)
|
||||
PLATFORM_DIR := openbsd
|
||||
THREADS := $(shell sysctl -n hw.ncpu || echo 1)
|
||||
override ADDFLAGS += -lkvm -static-libstdc++
|
||||
export MAKE = gmake
|
||||
SU_GROUP := wheel
|
||||
|
@ -150,17 +146,11 @@ else
|
|||
$(error $(shell printf "\033[1;91mERROR: \033[97mUnsupported platform ($(PLATFORM))\033[0m"))
|
||||
endif
|
||||
|
||||
#? Use all CPU cores (will only be set if using Make 4.3+)
|
||||
MAKEFLAGS := --jobs=$(THREADS)
|
||||
ifeq ($(THREADS),1)
|
||||
override THREADS := auto
|
||||
endif
|
||||
|
||||
#? LTO command line
|
||||
ifeq ($(CLANG_WORKS),true)
|
||||
LTO := thin
|
||||
else
|
||||
LTO := $(THREADS)
|
||||
LTO := auto
|
||||
endif
|
||||
|
||||
GIT_COMMIT := $(shell git rev-parse --short HEAD 2> /dev/null || true)
|
||||
|
@ -237,7 +227,6 @@ info:
|
|||
@printf "\033[1;96mARCH \033[1;93m?| \033[0m$(ARCH)\n"
|
||||
@printf "\033[1;95mGPU_SUPPORT \033[1;94m:| \033[0m$(GPU_SUPPORT)\n"
|
||||
@printf "\033[1;93mCXX \033[1;93m?| \033[0m$(CXX) \033[1;93m(\033[97m$(CXX_VERSION)\033[93m)\n"
|
||||
@printf "\033[1;94mTHREADS \033[1;94m:| \033[0m$(THREADS)\n"
|
||||
@printf "\033[1;92mREQFLAGS \033[1;91m!| \033[0m$(REQFLAGS)\n"
|
||||
@printf "\033[1;91mWARNFLAGS \033[1;94m:| \033[0m$(WARNFLAGS)\n"
|
||||
@printf "\033[1;94mOPTFLAGS \033[1;94m:| \033[0m$(OPTFLAGS)\n"
|
||||
|
|
|
@ -381,11 +381,16 @@ namespace Theme {
|
|||
if (themefile.good()) {
|
||||
Logger::debug("Loading theme file: " + filename);
|
||||
while (not themefile.bad()) {
|
||||
if (themefile.peek() == '#') {
|
||||
themefile.ignore(SSmax, '\n');
|
||||
continue;
|
||||
}
|
||||
themefile.ignore(SSmax, '[');
|
||||
if (themefile.eof()) break;
|
||||
string name, value;
|
||||
getline(themefile, name, ']');
|
||||
if (not Default_theme.contains(name)) {
|
||||
themefile.ignore(SSmax, '\n');
|
||||
continue;
|
||||
}
|
||||
themefile.ignore(SSmax, '=');
|
||||
|
@ -394,6 +399,7 @@ namespace Theme {
|
|||
if (themefile.peek() == '"') {
|
||||
themefile.ignore(1);
|
||||
getline(themefile, value, '"');
|
||||
themefile.ignore(SSmax, '\n');
|
||||
}
|
||||
else getline(themefile, value, '\n');
|
||||
|
||||
|
|
|
@ -448,7 +448,7 @@ namespace Cpu {
|
|||
const int file_id = atoi(file.path().filename().c_str() + 4); // skip "temp" prefix
|
||||
string file_path = file.path();
|
||||
|
||||
if (!s_contains(file_path, file_suffix)) {
|
||||
if (!s_contains(file_path, file_suffix) or s_contains(file_path, "nvme")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue