1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 # Makefile for cgroup tools 2 # Makefile for cgroup 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 13 14 LDFLAGS = -L$(srctree)/tools/thermal/lib 14 LDFLAGS = -L$(srctree)/tools/thermal/lib 15 LDFLAGS += -lthermal_tools 15 LDFLAGS += -lthermal_tools 16 LDFLAGS += -lconfig 16 LDFLAGS += -lconfig 17 17 18 VERSION = 0.0.1 18 VERSION = 0.0.1 19 TARGET=thermometer 19 TARGET=thermometer 20 20 21 all: $(TARGET) 21 all: $(TARGET) 22 %: %.c 22 %: %.c 23 $(CC) $(CFLAGS) -D VERSION=\"$(VERSION 23 $(CC) $(CFLAGS) -D VERSION=\"$(VERSION)\" -o $@ $^ $(LDFLAGS) 24 24 25 clean: 25 clean: 26 $(RM) $(TARGET) 26 $(RM) $(TARGET)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.