summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 906432b50f5adefc72eabdaa3684522e87c00edf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
DESTDIR?=/usr/local

MAKEFILE_DIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))

SCRIPTS=$(wildcard $(MAKEFILE_DIR)/bin/*)
MEDIA=$(wildcard $(MAKEFILE_DIR)/media/*)

all: help

help:
	@echo "Usage (root access required):"
	@echo "* make install"
	@echo "  will install scripts in $(DESTDIR)"
	@echo "* make install DESTDIR=/usr"
	@echo "  changes the destination dir (in this example, the scripts will be installed in /usr/bin)"

install: $(SCRIPTS) $(MEDIA)
	@echo "Installing audio scripts $(notdir $(SCRIPTS)) into $(DESTDIR)/bin"
	mkdir -p $(DESTDIR)/bin
	install $(SCRIPTS) -m 750 $(DESTDIR)/bin
	@echo "Installing audio test files $(notdir $(MEDIA)) into $(DESTDIR)/4a/media"
	mkdir -p $(DESTDIR)/4a/media
	install $(MEDIA) -m 640 $(DESTDIR)/4a/media

clean:
	@echo "Cleanup done."