2021-08-05 14:55:45 +02:00
|
|
|
PREFIX := /usr/local
|
|
|
|
CC := cc
|
|
|
|
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
|
|
|
LDFLAGS := -lX11
|
|
|
|
|
|
|
|
# FreeBSD (uncomment)
|
|
|
|
#LDFLAGS += -L/usr/local/lib -I/usr/local/include
|
|
|
|
# # OpenBSD (uncomment)
|
|
|
|
#LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include
|
2020-08-12 04:50:11 +02:00
|
|
|
|
2021-05-28 18:36:37 +02: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 04:50:11 +02:00
|
|
|
blocks.h:
|
|
|
|
cp blocks.def.h $@
|
|
|
|
|
2019-03-24 23:31:05 +01:00
|
|
|
clean:
|
2021-08-05 14:55:45 +02:00
|
|
|
rm -f *.o *.gch dwmblocks
|
2021-05-28 18:36:37 +02:00
|
|
|
|
|
|
|
install: dwmblocks
|
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
|
|
|
cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
|
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
|
|
|
|
|
2020-03-02 13:42:26 +01:00
|
|
|
uninstall:
|
2021-08-05 14:55:45 +02:00
|
|
|
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks
|
2021-05-28 18:36:37 +02:00
|
|
|
|
|
|
|
.PHONY: all options clean install uninstall
|