33 lines
922 B
Makefile
33 lines
922 B
Makefile
PREFIX := /usr/local
|
|
|
|
CC := gcc
|
|
CFLAGS := -O3 -Wall -Wextra
|
|
|
|
X11CFLAGS := $(shell pkg-config --cflags x11)
|
|
X11LIBS := $(shell pkg-config --libs x11)
|
|
|
|
all: dwmblocks sigdwmblocks xgetrootname
|
|
|
|
dwmblocks: dwmblocks.c blocks.h
|
|
${CC} -o $@ -Wno-missing-field-initializers -Wno-unused-parameter ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS}
|
|
|
|
sigdwmblocks: sigdwmblocks.c
|
|
${CC} -o $@ ${CFLAGS} $<
|
|
|
|
xgetrootname: xgetrootname.c
|
|
${CC} -o $@ ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS}
|
|
|
|
clean:
|
|
rm -f dwmblocks sigdwmblocks xgetrootname
|
|
|
|
install: all
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
|
install -m 0755 dwmblocks ${DESTDIR}${PREFIX}/bin/dwmblocks
|
|
install -m 0755 sigdwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks
|
|
install -m 0755 xgetrootname ${DESTDIR}${PREFIX}/bin/xgetrootname
|
|
|
|
uninstall:
|
|
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks ${DESTDIR}${PREFIX}/bin/xgetrootname
|
|
|
|
.PHONY: all clean install uninstall
|