2020-04-18 21:41:04 +02:00
|
|
|
# bthandler
|
|
|
|
# See LICENSE file for copyright and license details.
|
|
|
|
|
2021-07-02 13:21:13 +02:00
|
|
|
# install this via `make install`, not with sudo
|
2020-04-18 21:53:07 +02:00
|
|
|
# paths
|
2021-06-29 13:20:41 +02:00
|
|
|
DESTDIR = /usr/local/bin
|
|
|
|
DATA_DIR = ~/.config/bt#if changed, needs adjustment in bt as well (defined in the beginning)
|
2020-06-07 20:56:01 +02:00
|
|
|
SRC = bt
|
2020-04-18 21:41:04 +02:00
|
|
|
|
|
|
|
install:
|
2020-07-04 20:26:30 +02:00
|
|
|
mkdir -p $(DESTDIR)
|
2020-06-07 20:56:01 +02:00
|
|
|
mkdir -p $(DATA_DIR)
|
2021-07-02 13:21:13 +02:00
|
|
|
sudo cp -f bt $(DESTDIR)/bt
|
|
|
|
sudo chmod 755 $(DESTDIR)/bt
|
2020-06-07 20:56:01 +02:00
|
|
|
touch $(DATA_DIR)/blacklist
|
|
|
|
touch $(DATA_DIR)/paired
|
2021-06-28 20:10:16 +02:00
|
|
|
touch $(DATA_DIR)/alias
|
2021-07-02 13:21:13 +02:00
|
|
|
cp config $(DATA_DIR)/config
|
2020-04-18 21:41:04 +02:00
|
|
|
|
|
|
|
uninstall:
|
2021-07-02 13:21:13 +02:00
|
|
|
sudo rm -f $(DESTDIR)/bt
|
2020-06-07 20:56:01 +02:00
|
|
|
rm -rf $(DATA_DIR)
|
2020-04-18 21:41:04 +02:00
|
|
|
|
2020-06-07 20:56:01 +02:00
|
|
|
#clears manual paired devices list and blacklist
|
|
|
|
clear:
|
|
|
|
rm -rf $(DATA_DIR)
|
|
|
|
mkdir -p $(DATA_DIR)
|
|
|
|
touch $(DATA_DIR)/paired
|
|
|
|
touch $(DATA_DIR)/blacklist
|
2021-06-28 20:10:16 +02:00
|
|
|
touch $(DATA_DIR)/alias
|
2021-07-02 13:21:13 +02:00
|
|
|
cp config $(DATA_DIR)/config
|
2020-06-07 20:56:01 +02:00
|
|
|
|
|
|
|
.PHONY: install uninstall clear
|