Makefile 575 B

1234567891011121314151617181920212223242526
  1. # SPDX-License-Identifier: GPL-2.0
  2. # Makefile for cgroup 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. LDFLAGS = -L$(srctree)/tools/thermal/lib
  12. LDFLAGS += -lthermal_tools
  13. LDFLAGS += -lconfig
  14. VERSION = 0.0.1
  15. TARGET=thermometer
  16. all: $(TARGET)
  17. %: %.c
  18. $(CC) $(CFLAGS) -D VERSION=\"$(VERSION)\" -o $@ $^ $(LDFLAGS)
  19. clean:
  20. $(RM) $(TARGET)