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.

66 lines
1.4 KiB

19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
  1. # dwm - dynamic window manager
  2. # (C)opyright MMVI Anselm R. Garbe
  3. include config.mk
  4. SRC = client.c draw.c event.c main.c tag.c util.c
  5. OBJ = ${SRC:.c=.o}
  6. MAN1 = dwm.1
  7. BIN = dwm
  8. all: options dwm
  9. @echo finished
  10. options:
  11. @echo dwm build options:
  12. @echo "CFLAGS = ${CFLAGS}"
  13. @echo "LDFLAGS = ${LDFLAGS}"
  14. @echo "CC = ${CC}"
  15. .c.o:
  16. @echo CC $<
  17. @${CC} -c ${CFLAGS} $<
  18. ${OBJ}: dwm.h config.h
  19. config.h:
  20. @echo missing config.h created
  21. @cp config.default.h $@
  22. dwm: ${OBJ}
  23. @echo LD $@
  24. @${CC} -o $@ ${OBJ} ${LDFLAGS}
  25. clean:
  26. rm -f dwm *.o dwm-${VERSION}.tar.gz
  27. dist: clean
  28. mkdir -p dwm-${VERSION}
  29. cp -R Makefile README LICENSE config.mk *.h *.c ${MAN1} dwm-${VERSION}
  30. tar -cf dwm-${VERSION}.tar dwm-${VERSION}
  31. gzip dwm-${VERSION}.tar
  32. rm -rf dwm-${VERSION}
  33. install: all
  34. @mkdir -p ${DESTDIR}${PREFIX}/bin
  35. @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
  36. @for i in ${BIN}; do \
  37. chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
  38. done
  39. @echo installed executable files to ${DESTDIR}${PREFIX}/bin
  40. @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  41. @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
  42. @for i in ${MAN1}; do \
  43. chmod 444 ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
  44. done
  45. @echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1
  46. uninstall:
  47. for i in ${BIN}; do \
  48. rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
  49. done
  50. for i in ${MAN1}; do \
  51. rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
  52. done
  53. .PHONY: all options clean dist install uninstall