44 lines
1.1 KiB
Makefile
44 lines
1.1 KiB
Makefile
PREFIX := /usr/local
|
|
CC := cc
|
|
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
|
LDFLAGS := -lX11
|
|
PULSEFLAGS := -lpulse
|
|
|
|
# FreeBSD (uncomment)
|
|
#LDFLAGS += -L/usr/local/lib -I/usr/local/include
|
|
# # OpenBSD (uncomment)
|
|
#LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include
|
|
|
|
all: options dwmblocks dwmblocks-pulse-listener
|
|
|
|
options:
|
|
@echo dwmblocks build options:
|
|
@echo "CFLAGS = ${CFLAGS}"
|
|
@echo "LDFLAGS = ${LDFLAGS}"
|
|
@echo "CC = ${CC}"
|
|
@echo "PULSEFLAGS = ${PULSEFLAGS}"
|
|
|
|
dwmblocks: dwmblocks.c blocks.def.h blocks.h
|
|
${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS}
|
|
|
|
dwmblocks-pulse-listener: dwmblocks-pulse-listener.c
|
|
${CC} -o dwmblocks-pulse-listener dwmblocks-pulse-listener.c ${CFLAGS} ${PULSEFLAGS}
|
|
|
|
blocks.h:
|
|
cp blocks.def.h $@
|
|
|
|
clean:
|
|
rm -f *.o *.gch dwmblocks dwmblocks-pulse-listener
|
|
|
|
install: dwmblocks
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
|
cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
|
|
cp -f dwmblocks-pulse-listener ${DESTDIR}${PREFIX}/bin
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
|
|
install -m0755 scripts/* ${DESTDIR}${PREFIX}/bin
|
|
|
|
uninstall:
|
|
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks
|
|
|
|
.PHONY: all options clean install uninstall
|