You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
813 B

  1. PREFIX := /usr/local
  2. CC := cc
  3. CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
  4. LDFLAGS := -lX11
  5. # FreeBSD (uncomment)
  6. #LDFLAGS += -L/usr/local/lib -I/usr/local/include
  7. # # OpenBSD (uncomment)
  8. #LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include
  9. all: options dwmblocks
  10. options:
  11. @echo dwmblocks build options:
  12. @echo "CFLAGS = ${CFLAGS}"
  13. @echo "LDFLAGS = ${LDFLAGS}"
  14. @echo "CC = ${CC}"
  15. dwmblocks: dwmblocks.c blocks.def.h blocks.h
  16. ${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS}
  17. blocks.h:
  18. cp blocks.def.h $@
  19. clean:
  20. rm -f *.o *.gch dwmblocks
  21. install: dwmblocks
  22. mkdir -p ${DESTDIR}${PREFIX}/bin
  23. cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
  24. chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
  25. uninstall:
  26. rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks
  27. .PHONY: all options clean install uninstall