# 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 " @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)