2021-05-28 16:36:37 +00:00
|
|
|
PREFIX ?= /usr/local
|
|
|
|
CC ?= cc
|
|
|
|
CFLAGS = -pedantic -Wall -Wno-deprecated-declarations -Os
|
2020-12-23 17:52:47 +00:00
|
|
|
LDFLAGS = -lX11
|
2020-08-12 02:50:11 +00:00
|
|
|
|
2021-05-28 16:36:37 +00:00
|
|
|
all: options dwmblocks
|
|
|
|
|
|
|
|
options:
|
|
|
|
@echo dwmblocks build options:
|
|
|
|
@echo "CFLAGS = ${CFLAGS}"
|
|
|
|
@echo "LDFLAGS = ${LDFLAGS}"
|
|
|
|
@echo "CC = ${CC}"
|
|
|
|
|
|
|
|
dwmblocks: dwmblocks.c blocks.def.h blocks.h
|
|
|
|
${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS}
|
|
|
|
|
2020-08-12 02:50:11 +00:00
|
|
|
blocks.h:
|
|
|
|
cp blocks.def.h $@
|
|
|
|
|
2019-03-24 22:31:05 +00:00
|
|
|
clean:
|
2021-05-28 16:36:37 +00:00
|
|
|
${RM} *.o *.gch dwmblocks
|
|
|
|
|
|
|
|
install: dwmblocks
|
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
|
|
|
cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
|
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
|
|
|
|
|
2020-03-02 12:42:26 +00:00
|
|
|
uninstall:
|
2021-05-28 16:36:37 +00:00
|
|
|
${RM} ${DESTDIR}${PREFIX}/bin/dwmblocks
|
|
|
|
|
|
|
|
.PHONY: all options clean install uninstall
|