Makefile 708 B

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