xref: /linux/tools/thermal/thermometer/Makefile (revision dec1c62e91ba268ab2a6e339d4d7a59287d5eba1)
1# SPDX-License-Identifier: GPL-2.0
2# Makefile for cgroup tools
3
4ifeq ($(srctree),)
5srctree := $(patsubst %/,%,$(dir $(CURDIR)))
6srctree := $(patsubst %/,%,$(dir $(srctree)))
7srctree := $(patsubst %/,%,$(dir $(srctree)))
8# $(info Determined 'srctree' to be $(srctree))
9endif
10
11CFLAGS = -Wall -Wextra
12CFLAGS += -I$(srctree)/tools/thermal/lib
13
14LDFLAGS = -L$(srctree)/tools/thermal/lib
15LDFLAGS += -lthermal_tools
16LDFLAGS += -lconfig
17
18VERSION = 0.0.1
19TARGET=thermometer
20
21all: $(TARGET)
22%: %.c
23	$(CC) $(CFLAGS) -D VERSION=\"$(VERSION)\" -o $@ $^ $(LDFLAGS)
24
25clean:
26	$(RM) $(TARGET)
27