1*077df623SDaniel Lezcano# SPDX-License-Identifier: GPL-2.0 2*077df623SDaniel Lezcano# Makefile for thermal tools 3*077df623SDaniel Lezcano 4*077df623SDaniel Lezcanoifeq ($(srctree),) 5*077df623SDaniel Lezcanosrctree := $(patsubst %/,%,$(dir $(CURDIR))) 6*077df623SDaniel Lezcanosrctree := $(patsubst %/,%,$(dir $(srctree))) 7*077df623SDaniel Lezcanosrctree := $(patsubst %/,%,$(dir $(srctree))) 8*077df623SDaniel Lezcano# $(info Determined 'srctree' to be $(srctree)) 9*077df623SDaniel Lezcanoendif 10*077df623SDaniel Lezcano 11*077df623SDaniel LezcanoCFLAGS = -Wall -Wextra 12*077df623SDaniel LezcanoCFLAGS += -I$(srctree)/tools/thermal/lib 13*077df623SDaniel LezcanoCFLAGS += -I$(srctree)/tools/lib/thermal/include 14*077df623SDaniel Lezcano 15*077df623SDaniel LezcanoLDFLAGS = -L$(srctree)/tools/thermal/lib 16*077df623SDaniel LezcanoLDFLAGS += -L$(srctree)/tools/lib/thermal 17*077df623SDaniel LezcanoLDFLAGS += -lthermal_tools 18*077df623SDaniel LezcanoLDFLAGS += -lthermal 19*077df623SDaniel LezcanoLDFLAGS += -lconfig 20*077df623SDaniel LezcanoLDFLAGS += -lnl-genl-3 -lnl-3 21*077df623SDaniel Lezcano 22*077df623SDaniel LezcanoVERSION = 0.0.1 23*077df623SDaniel Lezcano 24*077df623SDaniel Lezcanoall: thermal-engine 25*077df623SDaniel Lezcano%: %.c 26*077df623SDaniel Lezcano $(CC) $(CFLAGS) -D VERSION=\"$(VERSION)\" -o $@ $^ $(LDFLAGS) 27*077df623SDaniel Lezcanoclean: 28*077df623SDaniel Lezcano $(RM) thermal-engine 29