diff --git a/GNUmakefile b/GNUmakefile index 1cf0f45..580755e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -8,12 +8,9 @@ X11LIBS = $(shell pkg-config --libs x11) all: dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname -dwmblocks: dwmblocks.c blocks config.h block.h +dwmblocks: dwmblocks.c config.h block.h ${CC} -o $@ -Wno-missing-field-initializers -Wno-unused-parameter ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS} -blocks: - cp -r blocks.def $@ - E0BLOCKS = $(abspath blocks) # two level escaping of `\', one for sed and one for C E1BLOCKS = $(subst \,\\\\,${E0BLOCKS}) @@ -27,6 +24,7 @@ EFBLOCKS = $(subst ','\'',${E4BLOCKS}) # this comment is a workaround for syntax highlighting bug in vim') config.h: + [ -d blocks ] || cp -R blocks.def blocks sed '2s==${EFBLOCKS}=' config.def.h >$@ sigdwmblocks/sigdwmblocks: sigdwmblocks/sigdwmblocks.c