diff options
Diffstat (limited to 'common.mk')
-rw-r--r-- | common.mk | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/common.mk b/common.mk new file mode 100644 index 0000000..6248b80 --- /dev/null +++ b/common.mk @@ -0,0 +1,37 @@ +# Configuration +DESTDIR= + +#prefix=/usr/local +prefix=/usr +exec_prefix=$(prefix) +datarootdir=$(prefix)/share + +bindir=$(exec_prefix)/bin +sbindir=$(exec_prefix)/sbin +#sysconfdir=$(prefix)/etc +sysconfdir=/etc +datadir=$(datarootdir) +docdir=$(datarootdir)/doc + +################################################################################ +progs = $(shell find . -maxdepth 1 -type f -executable -printf '%f\n') +confs = $(shell find . -maxdepth 1 -type f -not -executable -printf '%f\n'|fgrep -v Makefile) +files = $(addprefix $(DESTDIR)$(libre_execdir)/,$(progs)) \ + $(addprefix $(DESTDIR)$(libre_datadir)/,$(confs)) + +all: PHONY build + +build: PHONY + +install: PHONY $(files) + +$(DESTDIR)$(libre_execdir)/%: % + install -Dm755 '$<' '$@' +$(DESTDIR)$(libre_datadir)/%: % + install -Dm755 '$<' '$@' + +################################################################################ + +FORCE: PHONY +PHONY: +.PHONY: FORCE PHONY |