about summary refs log tree commit diff stats
path: root/Makefile
blob: 2b2656da3bc09b2076c964826c74082679a5f50b (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Radish

DESTDIR =
PREFIX = /usr/local

BIN = $(DESTDIR)$(PREFIX)/bin
RADISH_SHARE = $(DESTDIR)$(PREFIX)/share/radish

RADISH_BIN = $(BIN)/radish
RADISH_STATIONS = $(RADISH_SHARE)/stations

.PHONY: help
help:
	@echo "RADISH : Play online radio"
	@echo "(C) 2022 Case Duckworth <acdw@acdw.net>"
	@echo "Licensed under the Fair License; see COPYING for details."
	@echo
	@echo "TARGETS:"
	@echo " install	Install radish to $(DESTDIR)$(PREFIX)/bin/radish."
	@echo "		An example configuration is at $(DESTDIR)$(PREFIX)/share/radish/stations."
	@echo " link		Install radish using symlinks."
	@echo "		Probably only useful for development."
	@echo " uninstall	Uninstall radish-related files."

$(BIN) $(RADISH_SHARE):
	mkdir -p $@

.PHONY: install
install: radish radish.stations $(BIN) $(RADISH_SHARE)
	install -D radish $(RADISH_BIN)
	install -D radish.stations $(RADISH_STATIONS)

.PHONY: link
link: $(BIN) $(RADISH_SHARE)
	ln -sf $(PWD)/radish $(RADISH_BIN)
	ln -sf $(PWD)/radish.stations $(RADISH_STATIONS)

.PHONY: uninstall
uninstall:
	rm $(RADISH_BIN)
	rm -r $(RADISH_SHARE)