Makefile 1023 B

12345678910111213141516171819202122232425262728293031323334353637
  1. tewls := cputemps drivetemps fans speedtest
  2. libs := -lmysqlclient
  3. warns :=
  4. .DEFAULT_GOAL := all
  5. .PHONY: $(tewls)
  6. # Link w/ additional libraries y0
  7. drivetemps drivetemps-lax: libs := $(libs) -lbsd
  8. # Set name l0l
  9. cputemps cputemps-lax: prog := cputemps
  10. drivetemps drivetemps-lax: prog := drivetemps
  11. fans fans-lax: prog := fans
  12. speedtest speedtest-lax: prog := speedtest
  13. # Also something to refer to from el sauce files
  14. cputemps cputemps-lax: dprog := 1
  15. drivetemps drivetemps-lax: dprog := 2
  16. fans fans-lax: dprog := 3
  17. speedtest speedtest-lax: dprog := 4
  18. # And warnings for non-lax targets
  19. cputemps drivetemps fans speedtest: warns := -Wall -Wunused-variable $(warns)
  20. clean:
  21. cd bin && \
  22. rm -r $(tewls) $(foreach tewl,$(tewls),$(tewl).dSYM)
  23. cputemps cputemps-lax drivetemps drivetemps-lax fans fans-lax speedtest speedtest-lax:
  24. mkdir -p bin
  25. cd bin && \
  26. gcc ../conf/muhconf.c ../src/common.c ../src/$(prog).c -g -o $(prog) -DMUHPROG=$(dprog) $(libs) $(warns)
  27. all: $(tewls)
  28. lax: $(foreach tewl,$(tewls),$(tewl)-lax)