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.

51 lines
1.1 KiB

  1. # slock - simple screen locker
  2. # © 2006-2007 Anselm R. Garbe, Sander van Dijk
  3. # © 2009 Michael Stapelberg
  4. include config.mk
  5. SRC = i3lock.c
  6. OBJ = ${SRC:.c=.o}
  7. all: options i3lock
  8. options:
  9. @echo i3lock build options:
  10. @echo "CFLAGS = ${CFLAGS}"
  11. @echo "LDFLAGS = ${LDFLAGS}"
  12. @echo "CC = ${CC}"
  13. .c.o:
  14. @echo CC $<
  15. @${CC} -c ${CFLAGS} $<
  16. ${OBJ}: config.mk
  17. i3lock: ${OBJ}
  18. @echo CC -o $@
  19. @${CC} -o $@ ${OBJ} ${LDFLAGS}
  20. clean:
  21. @echo cleaning
  22. @rm -f i3lock ${OBJ} i3lock-${VERSION}.tar.gz
  23. dist: clean
  24. @echo creating dist tarball
  25. @mkdir -p i3lock-${VERSION}
  26. @cp -R LICENSE Makefile README config.mk i3lock.1 ${SRC} i3lock-${VERSION}
  27. @tar -cf i3lock-${VERSION}.tar i3lock-${VERSION}
  28. @gzip i3lock-${VERSION}.tar
  29. @rm -rf i3lock-${VERSION}
  30. install: all
  31. @echo installing executable file to $(DESTDIR)$(PREFIX)/bin
  32. $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
  33. $(INSTALL) -d $(MANDIR)/man1
  34. $(INSTALL) -m 4755 i3lock $(DESTDIR)$(PREFIX)/bin/i3lock
  35. $(INSTALL) -m 644 i3lock.1 $(MANDIR)/man1/i3lock.1
  36. uninstall:
  37. @echo removing executable file from $(DESTDIR)$(PREFIX)/bin
  38. @rm -f $(DESTDIR)$(PREFIX)/bin/i3lock
  39. .PHONY: all options clean dist install uninstall