mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-03 20:34:58 +08:00
077df623c8
This change provides a simple daemon skeleton. It is an example of how to use the thermal library which wraps all the complex code related to the netlink and transforms it into a callback oriented code. The goal of this skeleton is to give a base brick for anyone interested in writing its own thermal engine or as an example to rely on to write its own thermal monitoring implementation. In the future, it will evolve with more features and hopefully more logic. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://lore.kernel.org/r/20220420160933.347088-5-daniel.lezcano@linaro.org
29 lines
708 B
Makefile
29 lines
708 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Makefile for thermal tools
|
|
|
|
ifeq ($(srctree),)
|
|
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
|
srctree := $(patsubst %/,%,$(dir $(srctree)))
|
|
srctree := $(patsubst %/,%,$(dir $(srctree)))
|
|
# $(info Determined 'srctree' to be $(srctree))
|
|
endif
|
|
|
|
CFLAGS = -Wall -Wextra
|
|
CFLAGS += -I$(srctree)/tools/thermal/lib
|
|
CFLAGS += -I$(srctree)/tools/lib/thermal/include
|
|
|
|
LDFLAGS = -L$(srctree)/tools/thermal/lib
|
|
LDFLAGS += -L$(srctree)/tools/lib/thermal
|
|
LDFLAGS += -lthermal_tools
|
|
LDFLAGS += -lthermal
|
|
LDFLAGS += -lconfig
|
|
LDFLAGS += -lnl-genl-3 -lnl-3
|
|
|
|
VERSION = 0.0.1
|
|
|
|
all: thermal-engine
|
|
%: %.c
|
|
$(CC) $(CFLAGS) -D VERSION=\"$(VERSION)\" -o $@ $^ $(LDFLAGS)
|
|
clean:
|
|
$(RM) thermal-engine
|