Makefile (816B)
1 PREFIX := /usr/local 2 #PREFIX := ${HOME}/.local 3 4 CC := gcc 5 CFLAGS := -O3 -Wall -Wextra 6 CFLAGSEXTRA := -Wno-missing-field-initializers -Wno-unused-parameter 7 8 X11CFLAGS := $(shell pkg-config --cflags x11) 9 X11LIBS := $(shell pkg-config --libs x11) 10 11 all: dwmblocks sigdwmblocks 12 13 dwmblocks: dwmblocks.c blocks.h 14 ${CC} -o $@ ${CFLAGS} ${CFLAGSEXTRA} ${X11CFLAGS} $< ${X11LIBS} 15 16 sigdwmblocks: sigdwmblocks.c 17 ${CC} -o $@ ${CFLAGS} $< 18 19 xgetrootname: xgetrootname.c 20 ${CC} -o $@ ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS} 21 22 clean: 23 rm -f dwmblocks sigdwmblocks 24 25 install: all 26 install -D -m755 dwmblocks ${DESTDIR}${PREFIX}/bin/dwmblocks 27 install -D -m755 sigdwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks 28 29 uninstall: 30 rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks 31 32 .PHONY: all clean install uninstall