1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 # Makefile for thermal tools 2 # Makefile for thermal tools 3 3 4 ifeq ($(srctree),) 4 ifeq ($(srctree),) 5 srctree := $(patsubst %/,%,$(dir $(CURDIR))) 5 srctree := $(patsubst %/,%,$(dir $(CURDIR))) 6 srctree := $(patsubst %/,%,$(dir $(srctree))) 6 srctree := $(patsubst %/,%,$(dir $(srctree))) 7 srctree := $(patsubst %/,%,$(dir $(srctree))) 7 srctree := $(patsubst %/,%,$(dir $(srctree))) 8 # $(info Determined 'srctree' to be $(srctree) 8 # $(info Determined 'srctree' to be $(srctree)) 9 endif 9 endif 10 10 11 CFLAGS = -Wall -Wextra 11 CFLAGS = -Wall -Wextra 12 CFLAGS += -I$(srctree)/tools/thermal/lib 12 CFLAGS += -I$(srctree)/tools/thermal/lib 13 CFLAGS += -I$(srctree)/tools/lib/thermal/inclu 13 CFLAGS += -I$(srctree)/tools/lib/thermal/include 14 14 15 LDFLAGS = -L$(srctree)/tools/thermal/lib 15 LDFLAGS = -L$(srctree)/tools/thermal/lib 16 LDFLAGS += -L$(srctree)/tools/lib/thermal 16 LDFLAGS += -L$(srctree)/tools/lib/thermal 17 LDFLAGS += -lthermal_tools 17 LDFLAGS += -lthermal_tools 18 LDFLAGS += -lthermal 18 LDFLAGS += -lthermal 19 LDFLAGS += -lconfig 19 LDFLAGS += -lconfig 20 LDFLAGS += -lnl-genl-3 -lnl-3 20 LDFLAGS += -lnl-genl-3 -lnl-3 21 21 22 VERSION = 0.0.1 22 VERSION = 0.0.1 23 23 24 all: thermal-engine 24 all: thermal-engine 25 %: %.c 25 %: %.c 26 $(CC) $(CFLAGS) -D VERSION=\"$(VERSION 26 $(CC) $(CFLAGS) -D VERSION=\"$(VERSION)\" -o $@ $^ $(LDFLAGS) 27 clean: 27 clean: 28 $(RM) thermal-engine 28 $(RM) thermal-engine
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.