blob: b1fc5d97e2ec3396ce8cb88eedfb949cd9d9d625 (
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
|
# Radio
DESTDIR =
PREFIX = /usr/local
BIN = $(DESTDIR)$(PREFIX)/bin
RADIO_SHARE = $(DESTDIR)$(PREFIX)/share/radio
RADIO_BIN = $(BIN)/radio
RADIO_STATIONS = $(RADIO_SHARE)/stations
.PHONY: help
help:
@echo "radio : 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 radio to $(DESTDIR)$(PREFIX)/bin/radio."
@echo " An example configuration is at $(DESTDIR)$(PREFIX)/share/radio/stations."
@echo " link Install radio using symlinks."
@echo " Probably only useful for development."
@echo " uninstall Uninstall radio-related files."
$(BIN) $(RADIO_SHARE):
mkdir -p $@
.PHONY: install
install: radio radio.stations $(BIN) $(RADIO_SHARE)
install -D radio $(RADIO_BIN)
install -D radio.stations $(RADIO_STATIONS)
.PHONY: link
link: $(BIN) $(RADIO_SHARE)
ln -sf $(PWD)/radio $(RADIO_BIN)
ln -sf $(PWD)/radio.stations $(RADIO_STATIONS)
.PHONY: uninstall
uninstall:
rm $(RADIO_BIN)
rm -r $(RADIO_SHARE)
|