xssstate

a simple utility to get the X screensaver state
git clone git://git.suckless.org/xssstate
Log | Files | Refs | README | LICENSE

Makefile (1464B)


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