titfiche/Makefile

24 lines
580 B
Makefile

prefix ?= ~/.local
bindir = $(prefix)/bin
datadir = $(prefix)/share
desktopdir = $(datadir)/applications
ifeq ($(prefix), ~/.local)
plugindir ?= ~/.vim/plugin
else
plugindir ?= $(datadir)/vim/addons/autoload
endif
targets = $(bindir)/titfiche.sh $(desktopdir)/titfiche.desktop $(plugindir)/titfiche.vim
all: $(targets)
$(bindir)/titfiche.sh: titfiche.sh
mkdir -p $(bindir)
install -m 555 $^ $@
$(desktopdir)/titfiche.desktop: titfiche.desktop
mkdir -p $(desktopdir)
install -m 444 $^ $@
$(plugindir)/titfiche.vim: titfiche.vim
mkdir -p $(plugindir)
install -m 444 $^ $@