2020-12-23 18:26:34 +00:00
|
|
|
PREFIX := /usr/local
|
2020-07-06 20:28:41 +00:00
|
|
|
|
2020-08-22 14:56:30 +00:00
|
|
|
CC := gcc
|
|
|
|
CFLAGS := -O3 -Wall -Wextra
|
|
|
|
|
|
|
|
X11CFLAGS := $(shell pkg-config --cflags x11)
|
|
|
|
X11LIBS := $(shell pkg-config --libs x11)
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2021-02-10 18:46:35 +00:00
|
|
|
all: dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2021-02-10 18:46:35 +00:00
|
|
|
dwmblocks: dwmblocks.c config.h block.h
|
2020-12-23 18:26:34 +00:00
|
|
|
${CC} -o $@ -Wno-missing-field-initializers -Wno-unused-parameter ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS}
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2021-02-10 15:49:05 +00:00
|
|
|
sigdwmblocks/sigdwmblocks: sigdwmblocks/sigdwmblocks.c
|
2020-07-26 12:38:05 +00:00
|
|
|
${CC} -o $@ ${CFLAGS} $<
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2021-02-10 15:49:05 +00:00
|
|
|
xgetrootname/xgetrootname: xgetrootname/xgetrootname.c
|
2020-08-22 14:56:30 +00:00
|
|
|
${CC} -o $@ ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS}
|
2020-07-03 21:04:11 +00:00
|
|
|
|
|
|
|
clean:
|
2021-02-10 18:46:35 +00:00
|
|
|
rm -f dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-06 20:28:41 +00:00
|
|
|
install: all
|
2020-07-03 21:04:11 +00:00
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
2021-02-10 18:46:35 +00:00
|
|
|
install -m 0755 dwmblocks ${DESTDIR}${PREFIX}/bin/dwmblocks
|
2021-02-10 15:49:05 +00:00
|
|
|
install -m 0755 sigdwmblocks/sigdwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks
|
|
|
|
install -m 0755 xgetrootname/xgetrootname ${DESTDIR}${PREFIX}/bin/xgetrootname
|
2020-07-03 21:04:11 +00:00
|
|
|
|
|
|
|
uninstall:
|
2020-12-23 18:26:34 +00:00
|
|
|
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks ${DESTDIR}${PREFIX}/bin/xgetrootname
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-06 20:28:41 +00:00
|
|
|
.PHONY: all clean install uninstall
|