mirror of
https://github.com/bvanroll/_dotfiles.git
synced 2025-08-29 12:02:46 +00:00
26 lines
561 B
Makefile
26 lines
561 B
Makefile
PREFIX = $(HOME)/.local/
|
|
|
|
_INSTALLDIR = $(DESTDIR)$(PREFIX)/libexec/i3blocks/
|
|
|
|
_MAKEBLOCKS := $(dir $(wildcard */Makefile))
|
|
all: build
|
|
build: $(_MAKEBLOCKS)
|
|
$(_MAKEBLOCKS):
|
|
$(MAKE) -C $@
|
|
|
|
install: all do-install
|
|
|
|
installdirs:
|
|
install -d $(_INSTALLDIR)
|
|
|
|
_BLOCKS := $(shell find . -type f -executable -not -path './.*')
|
|
|
|
do-install: installdirs $(_BLOCKS)
|
|
$(_BLOCKS):
|
|
install -m755 $@ $(_INSTALLDIR)
|
|
|
|
uninstall:
|
|
rm -f $(foreach block,$(_BLOCKS),$(_INSTALLDIR)$(notdir $(block)))
|
|
|
|
.PHONY: $(_MAKEBLOCKS) $(_BLOCKS) build do-install all install uninstall
|