diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2b2656d --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,41 @@ | |||
1 | # Radish | ||
2 | |||
3 | DESTDIR = | ||
4 | PREFIX = /usr/local | ||
5 | |||
6 | BIN = $(DESTDIR)$(PREFIX)/bin | ||
7 | RADISH_SHARE = $(DESTDIR)$(PREFIX)/share/radish | ||
8 | |||
9 | RADISH_BIN = $(BIN)/radish | ||
10 | RADISH_STATIONS = $(RADISH_SHARE)/stations | ||
11 | |||
12 | .PHONY: help | ||
13 | help: | ||
14 | @echo "RADISH : Play online radio" | ||
15 | @echo "(C) 2022 Case Duckworth <acdw@acdw.net>" | ||
16 | @echo "Licensed under the Fair License; see COPYING for details." | ||
17 | @echo | ||
18 | @echo "TARGETS:" | ||
19 | @echo " install Install radish to $(DESTDIR)$(PREFIX)/bin/radish." | ||
20 | @echo " An example configuration is at $(DESTDIR)$(PREFIX)/share/radish/stations." | ||
21 | @echo " link Install radish using symlinks." | ||
22 | @echo " Probably only useful for development." | ||
23 | @echo " uninstall Uninstall radish-related files." | ||
24 | |||
25 | $(BIN) $(RADISH_SHARE): | ||
26 | mkdir -p $@ | ||
27 | |||
28 | .PHONY: install | ||
29 | install: radish radish.stations $(BIN) $(RADISH_SHARE) | ||
30 | install -D radish $(RADISH_BIN) | ||
31 | install -D radish.stations $(RADISH_STATIONS) | ||
32 | |||
33 | .PHONY: link | ||
34 | link: $(BIN) $(RADISH_SHARE) | ||
35 | ln -sf $(PWD)/radish $(RADISH_BIN) | ||
36 | ln -sf $(PWD)/radish.stations $(RADISH_STATIONS) | ||
37 | |||
38 | .PHONY: uninstall | ||
39 | uninstall: | ||
40 | rm $(RADISH_BIN) | ||
41 | rm -r $(RADISH_SHARE) | ||