Makefile.in 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. PROG=wmfs
  2. # wmfs version
  3. VERSION=$(shell scripts/setlocalversion)
  4. SRCS= \
  5. src/barwin.c \
  6. src/config.c \
  7. src/client.c \
  8. src/event.c \
  9. src/ewmh.c \
  10. src/infobar.c \
  11. src/layout.c \
  12. src/launcher.c \
  13. src/parse_api.c \
  14. src/parse.c \
  15. src/screen.c \
  16. src/tag.c \
  17. src/util.c \
  18. src/fifo.c \
  19. src/status.c \
  20. src/systray.c \
  21. src/mouse.c \
  22. src/log.c \
  23. src/wmfs.c
  24. # flags
  25. CFLAGS+= -DXDG_CONFIG_DIR=\"${XDG_CONFIG_DIR}\"
  26. CFLAGS+= -DWMFS_VERSION=\"${VERSION}\"
  27. CFLAGS+= -Wall -Wextra
  28. OBJS= ${SRCS:.c=.o}
  29. all: ${PROG}
  30. ${PROG}: ${OBJS}
  31. ${CC} -o $@ ${OBJS} ${LDFLAGS}
  32. .c.o:
  33. ${CC} -c ${CFLAGS} $< -o $@
  34. .PHONY: all clean distclean install uninstall dist
  35. clean:
  36. rm -f ${OBJS} wmfs
  37. distclean: clean
  38. rm -f Makefile
  39. install: all
  40. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  41. mkdir -p ${DESTDIR}${PREFIX}/bin
  42. install ${PROG} ${DESTDIR}${PREFIX}/bin
  43. @echo installing xsession file to ${DESTDIR}${PREFIX}/share/xsessions
  44. mkdir -p ${DESTDIR}${PREFIX}/share/xsessions
  45. @echo installing default config file to ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  46. mkdir -p ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  47. install -m 444 wmfsrc ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  48. uninstall:
  49. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  50. rm -f ${DESTDIR}${PREFIX}/bin/wmfs
  51. @echo removing xsession file from ${DESTDIR}${PREFIX}/share/xsessions
  52. @echo removing config file from ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  53. rm -f ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/wmfsrc
  54. rmdir ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  55. dist:
  56. @echo "Generate wmfs-`date +%Y%m`.tar.gz"
  57. git archive --format=tar --prefix=wmfs-`date +%Y%m`/ master | gzip -c > wmfs-`date +%Y%m`.tar.gz