2020-07-03 21:04:11 +00:00
|
|
|
#PREFIX = /usr/local
|
|
|
|
PREFIX = ${HOME}/.local
|
2020-07-06 20:28:41 +00:00
|
|
|
|
2020-07-03 21:04:11 +00:00
|
|
|
CC = gcc
|
2020-07-26 11:30:02 +00:00
|
|
|
CFLAGS = -O3 -Wall -Wextra
|
2020-07-03 21:04:11 +00:00
|
|
|
CFLAGSEXTRA = -Wno-unused-parameter -Wno-missing-field-initializers
|
|
|
|
|
2020-07-06 20:28:41 +00:00
|
|
|
all: dwmblocks sigdwmblocks
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-09 20:20:06 +00:00
|
|
|
dwmblocks: dwmblocks.c blocks.h
|
2020-07-06 20:28:41 +00:00
|
|
|
${CC} -o $@ -lX11 ${CFLAGS} ${CFLAGSEXTRA} $<
|
2020-07-03 21:04:11 +00:00
|
|
|
|
|
|
|
sigdwmblocks: sigdwmblocks.c
|
2020-07-06 20:28:41 +00:00
|
|
|
${CC} -o $@ ${CFLAGS} sigdwmblocks.c
|
2020-07-03 21:04:11 +00:00
|
|
|
|
|
|
|
xgetrootname: xgetrootname.c
|
2020-07-06 20:28:41 +00:00
|
|
|
${CC} -o $@ -lX11 ${CFLAGS} xgetrootname.c
|
2020-07-03 21:04:11 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f dwmblocks sigdwmblocks
|
|
|
|
|
2020-07-06 20:28:41 +00:00
|
|
|
install: all
|
2020-07-03 21:04:11 +00:00
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
|
|
|
install -m 0755 dwmblocks ${DESTDIR}${PREFIX}/bin/dwmblocks
|
|
|
|
install -m 0755 sigdwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks
|
|
|
|
|
2020-07-06 20:28:41 +00:00
|
|
|
.PHONY: all clean install uninstall
|