dwmblocks/Makefile

49 lines
1.4 KiB
Makefile
Raw Normal View History

2023-02-21 12:15:57 -08:00
PREFIX := /usr/local
CC := cc
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
LDFLAGS := -lX11
2023-02-23 09:22:54 -08:00
PULSEFLAGS := -lpulse
2023-02-21 12:15:57 -08:00
# FreeBSD (uncomment)
#LDFLAGS += -L/usr/local/lib -I/usr/local/include
# # OpenBSD (uncomment)
#LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include
2023-02-23 09:22:54 -08:00
all: options dwmblocks dwmblocks-pulse-listener
2023-02-21 12:15:57 -08:00
options:
@echo dwmblocks build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
2023-02-23 09:22:54 -08:00
@echo "PULSEFLAGS = ${PULSEFLAGS}"
2023-02-21 12:15:57 -08:00
dwmblocks: dwmblocks.c blocks.def.h blocks.h
${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS}
2023-02-23 09:22:54 -08:00
dwmblocks-pulse-listener: dwmblocks-pulse-listener.c
${CC} -o dwmblocks-pulse-listener dwmblocks-pulse-listener.c ${CFLAGS} ${PULSEFLAGS}
2023-02-21 12:15:57 -08:00
blocks.h:
cp blocks.def.h $@
clean:
2023-02-23 09:22:54 -08:00
rm -f *.o *.gch dwmblocks dwmblocks-pulse-listener
2023-02-21 12:15:57 -08:00
install: dwmblocks
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
2023-02-23 09:22:54 -08:00
cp -f dwmblocks-pulse-listener ${DESTDIR}${PREFIX}/bin
2023-02-21 12:15:57 -08:00
chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
install -m0755 scripts/* ${DESTDIR}${PREFIX}/bin
uninstall:
2023-05-23 02:55:53 -07:00
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks \
${DESTDIR}${PREFIX}/bin/dwmblocks-pulse-listener \
${DESTDIR}${PREFIX}/bin/dwmblocks-battery \
${DESTDIR}${PREFIX}/bin/dwmblocks-network \
${DESTDIR}${PREFIX}/bin/dwmblocks-volume \
${DESTDIR}${PREFIX}/bin/dwmblocks-fcitx5
2023-02-21 12:15:57 -08:00
.PHONY: all options clean install uninstall