aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 3d4ea57cda38be2d709542922a779a5e2f5fd608 (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)/share/4a/media"
	mkdir -p $(DESTDIR)/share/4a/media
	install $(MEDIA) -m 640 $(DESTDIR)/share/4a/media

clean:
	@echo "Cleanup done."