slock

Simple X display locker (fork)
git clone https://git.sinitax.com/sinitax/slock
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

Makefile (1598B)


      1# slock - simple screen locker
      2# See LICENSE file for copyright and license details.
      3
      4include config.mk
      5
      6SRC = slock.c ${COMPATSRC}
      7OBJ = ${SRC:.c=.o}
      8
      9all: options slock
     10
     11options:
     12	@echo slock build options:
     13	@echo "CFLAGS   = ${CFLAGS}"
     14	@echo "LDFLAGS  = ${LDFLAGS}"
     15	@echo "CC       = ${CC}"
     16
     17.c.o:
     18	@echo CC $<
     19	@${CC} -c ${CFLAGS} $<
     20
     21${OBJ}: config.h config.mk arg.h util.h
     22
     23config.h:
     24	@echo creating $@ from config.def.h
     25	@cp config.def.h $@
     26
     27slock: ${OBJ}
     28	@echo CC -o $@
     29	@${CC} -o $@ ${OBJ} ${LDFLAGS}
     30
     31clean:
     32	@echo cleaning
     33	@rm -f slock ${OBJ} slock-${VERSION}.tar.gz
     34
     35dist: clean
     36	@echo creating dist tarball
     37	@mkdir -p slock-${VERSION}
     38	@cp -R LICENSE Makefile README slock.1 config.mk \
     39		${SRC} explicit_bzero.c config.def.h arg.h util.h slock-${VERSION}
     40	@tar -cf slock-${VERSION}.tar slock-${VERSION}
     41	@gzip slock-${VERSION}.tar
     42	@rm -rf slock-${VERSION}
     43
     44install: all
     45	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
     46	@mkdir -p ${DESTDIR}${PREFIX}/bin
     47	@cp -f slock ${DESTDIR}${PREFIX}/bin
     48	@chmod 755 ${DESTDIR}${PREFIX}/bin/slock
     49	@chmod u+s ${DESTDIR}${PREFIX}/bin/slock
     50	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
     51	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
     52	@sed "s/VERSION/${VERSION}/g" <slock.1 >${DESTDIR}${MANPREFIX}/man1/slock.1
     53	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/slock.1
     54
     55uninstall:
     56	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
     57	@rm -f ${DESTDIR}${PREFIX}/bin/slock
     58	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
     59	@rm -f ${DESTDIR}${MANPREFIX}/man1/slock.1
     60
     61.PHONY: all options clean dist install uninstall