Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # SPDX-License-Identifier: GPL-2.0
  2. OUTPUT=./
  3. ifeq ("$(origin O)", "command line")
  4. OUTPUT := $(O)/
  5. endif
  6. DESTDIR =
  7. bindir = /usr/bin
  8. INSTALL = /usr/bin/install
  9. default: all
  10. $(OUTPUT)centrino-decode: centrino-decode.c
  11. $(CC) $(CFLAGS) -o $@ centrino-decode.c
  12. $(OUTPUT)dump_psb: dump_psb.c
  13. $(CC) $(CFLAGS) -o $@ dump_psb.c
  14. $(OUTPUT)intel_gsic: intel_gsic.c
  15. $(CC) $(CFLAGS) -o $@ -llrmi intel_gsic.c
  16. $(OUTPUT)powernow-k8-decode: powernow-k8-decode.c
  17. $(CC) $(CFLAGS) -o $@ powernow-k8-decode.c
  18. all: $(OUTPUT)centrino-decode $(OUTPUT)dump_psb $(OUTPUT)intel_gsic $(OUTPUT)powernow-k8-decode
  19. clean:
  20. rm -rf $(OUTPUT)centrino-decode
  21. rm -rf $(OUTPUT)dump_psb
  22. rm -rf $(OUTPUT)intel_gsic
  23. rm -rf $(OUTPUT)powernow-k8-decode
  24. install:
  25. $(INSTALL) -d $(DESTDIR)${bindir}
  26. $(INSTALL) $(OUTPUT)centrino-decode $(DESTDIR)${bindir}
  27. $(INSTALL) $(OUTPUT)powernow-k8-decode $(DESTDIR)${bindir}
  28. $(INSTALL) $(OUTPUT)dump_psb $(DESTDIR)${bindir}
  29. $(INSTALL) $(OUTPUT)intel_gsic $(DESTDIR)${bindir}
  30. .PHONY: all default clean install