2011-10-05 19:48:33 +04:00
|
|
|
# cwm makefile for BSD make and GNU make
|
|
|
|
# uses pkg-config, DESTDIR and PREFIX
|
2007-04-27 22:01:38 +04:00
|
|
|
|
|
|
|
PROG= cwm
|
|
|
|
|
2014-03-21 21:47:05 +04:00
|
|
|
PREFIX?= /usr/local
|
2010-02-21 21:15:27 +03:00
|
|
|
|
2009-01-11 21:34:46 +03:00
|
|
|
SRCS= calmwm.c screen.c xmalloc.c client.c menu.c \
|
2011-03-22 13:47:59 +03:00
|
|
|
search.c util.c xutil.c conf.c xevents.c group.c \
|
2017-07-14 20:23:38 +03:00
|
|
|
kbfunc.c parse.y
|
2007-04-27 22:01:38 +04:00
|
|
|
|
2010-02-21 21:15:27 +03:00
|
|
|
OBJS= calmwm.o screen.o xmalloc.o client.o menu.o \
|
2011-05-03 21:28:18 +04:00
|
|
|
search.o util.o xutil.o conf.o xevents.o group.o \
|
2021-11-30 18:43:16 +03:00
|
|
|
kbfunc.o strlcpy.o strlcat.o parse.o \
|
2017-07-11 14:17:45 +03:00
|
|
|
strtonum.o reallocarray.o
|
2020-04-21 05:04:39 +03:00
|
|
|
|
|
|
|
PKG_CONFIG?= pkg-config
|
2010-02-21 21:15:27 +03:00
|
|
|
|
2020-04-21 05:04:39 +03:00
|
|
|
CPPFLAGS+= `${PKG_CONFIG} --cflags x11 xft xrandr`
|
2009-01-12 00:48:27 +03:00
|
|
|
|
2014-03-21 21:47:05 +04:00
|
|
|
CFLAGS?= -Wall -O2 -g -D_GNU_SOURCE
|
2007-04-27 22:01:38 +04:00
|
|
|
|
2020-04-21 05:04:39 +03:00
|
|
|
LDFLAGS+= `${PKG_CONFIG} --libs x11 xft xrandr`
|
2007-04-27 22:01:38 +04:00
|
|
|
|
2014-03-21 21:47:05 +04:00
|
|
|
MANPREFIX?= ${PREFIX}/share/man
|
2007-04-27 22:01:38 +04:00
|
|
|
|
2011-10-05 19:48:33 +04:00
|
|
|
all: ${PROG}
|
2010-02-21 21:15:27 +03:00
|
|
|
|
|
|
|
clean:
|
2021-11-30 18:43:16 +03:00
|
|
|
rm -f ${OBJS} ${PROG} parse.c
|
2010-02-21 21:15:27 +03:00
|
|
|
|
2021-11-30 18:43:16 +03:00
|
|
|
${PROG}: ${OBJS}
|
2011-10-05 19:48:33 +04:00
|
|
|
${CC} ${OBJS} ${LDFLAGS} -o ${PROG}
|
2010-02-21 21:15:27 +03:00
|
|
|
|
2011-10-05 19:48:33 +04:00
|
|
|
.c.o:
|
|
|
|
${CC} -c ${CFLAGS} ${CPPFLAGS} $<
|
2010-02-21 21:15:27 +03:00
|
|
|
|
|
|
|
install: ${PROG}
|
2011-10-05 19:48:33 +04:00
|
|
|
install -d ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANPREFIX}/man1 ${DESTDIR}${MANPREFIX}/man5
|
|
|
|
install -m 755 cwm ${DESTDIR}${PREFIX}/bin
|
|
|
|
install -m 644 cwm.1 ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
install -m 644 cwmrc.5 ${DESTDIR}${MANPREFIX}/man5
|
2012-05-02 16:26:36 +04:00
|
|
|
|
|
|
|
release:
|
|
|
|
VERSION=$$(git describe --tags | sed 's/^v//;s/-[^.]*$$//') && \
|
|
|
|
git archive --prefix=cwm-$$VERSION/ -o cwm-$$VERSION.tar.gz HEAD
|
2014-03-13 22:24:15 +04:00
|
|
|
|
|
|
|
sign:
|
|
|
|
VERSION=$$(git describe --tags | sed 's/^v//;s/-[^.]*$$//') && \
|
2020-01-04 23:45:05 +03:00
|
|
|
gpg2 --armor --detach-sign cwm-$$VERSION.tar.gz && \
|
2014-11-23 18:45:46 +03:00
|
|
|
signify -S -s ~/.signify/cwm.sec -m cwm-$$VERSION.tar.gz && \
|
|
|
|
sed -i '1cuntrusted comment: verify with cwm.pub' cwm-$$VERSION.tar.gz.sig
|
2021-11-30 18:43:16 +03:00
|
|
|
|
|
|
|
.PRECIOUS: parse.c
|