DWM Status Bar
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.

49 lines
1.0 KiB

7 years ago
  1. # See LICENSE file for copyright and license details.
  2. include config.mk
  3. SRC = ${NAME}.c
  4. OBJ = ${SRC:.c=.o}
  5. all: options ${NAME}
  6. options:
  7. @echo ${NAME} build options:
  8. @echo "CFLAGS = ${CFLAGS}"
  9. @echo "LDFLAGS = ${LDFLAGS}"
  10. @echo "CC = ${CC}"
  11. .c.o:
  12. @echo CC $<
  13. @${CC} -c ${CFLAGS} $<
  14. ${OBJ}: config.mk
  15. ${NAME}: ${OBJ}
  16. @echo CC -o $@
  17. @${CC} -o $@ ${OBJ} ${LDFLAGS}
  18. clean:
  19. @echo cleaning
  20. @rm -f ${NAME} ${OBJ} ${NAME}-${VERSION}.tar.gz
  21. dist: clean
  22. @echo creating dist tarball
  23. @mkdir -p ${NAME}-${VERSION}
  24. @cp -R Makefile LICENSE config.mk \
  25. ${SRC} ${NAME}-${VERSION}
  26. @tar -cf ${NAME}-${VERSION}.tar ${NAME}-${VERSION}
  27. @gzip ${NAME}-${VERSION}.tar
  28. @rm -rf ${NAME}-${VERSION}
  29. install: all
  30. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  31. @mkdir -p ${DESTDIR}${PREFIX}/bin
  32. @cp -f ${NAME} ${DESTDIR}${PREFIX}/bin
  33. @chmod 755 ${DESTDIR}${PREFIX}/bin/${NAME}
  34. uninstall:
  35. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  36. @rm -f ${DESTDIR}${PREFIX}/bin/${NAME}
  37. .PHONY: all options clean dist install uninstall