Makefile.in 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/status.c \
  19. src/systray.c \
  20. src/mouse.c \
  21. src/log.c \
  22. src/wmfs.c
  23. # flags
  24. CFLAGS+= -DXDG_CONFIG_DIR=\"${XDG_CONFIG_DIR}\"
  25. CFLAGS+= -DWMFS_VERSION=\"${VERSION}\"
  26. CFLAGS+= -Wall -Wextra
  27. OBJS= ${SRCS:.c=.o}
  28. all: ${PROG}
  29. ${PROG}: ${OBJS}
  30. ${CC} -o $@ ${OBJS} ${LDFLAGS}
  31. .c.o:
  32. ${CC} -c ${CFLAGS} $< -o $@
  33. .PHONY: all clean distclean install uninstall dist
  34. clean:
  35. rm -f ${OBJS} wmfs
  36. distclean: clean
  37. rm -f Makefile
  38. install: all
  39. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  40. mkdir -p ${DESTDIR}${PREFIX}/bin
  41. install ${PROG} ${DESTDIR}${PREFIX}/bin
  42. @echo installing xsession file to ${DESTDIR}${PREFIX}/share/xsessions
  43. mkdir -p ${DESTDIR}${PREFIX}/share/xsessions
  44. @echo installing default config file to ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  45. mkdir -p ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  46. install -m 444 wmfsrc ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  47. uninstall:
  48. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  49. rm -f ${DESTDIR}${PREFIX}/bin/wmfs
  50. @echo removing xsession file from ${DESTDIR}${PREFIX}/share/xsessions
  51. @echo removing config file from ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  52. rm -f ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/wmfsrc
  53. rmdir ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
  54. dist:
  55. @echo "Generate wmfs-`date +%Y%m`.tar.gz"
  56. git archive --format=tar --prefix=wmfs-`date +%Y%m`/ master | gzip -c > wmfs-`date +%Y%m`.tar.gz