forked from mczerski/MySensorsSerial2MQTT
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
31 lines (24 loc) · 794 Bytes
/
Makefile
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
PREFIX ?= /usr/local
INITDIR_SYSTEMD = /etc/systemd/system
BINDIR = $(PREFIX)/bin
RM = rm
INSTALL = install -p
INSTALL_PROGRAM = $(INSTALL) -m755
INSTALL_SCRIPT = $(INSTALL) -m755
INSTALL_DATA = $(INSTALL) -m644
INSTALL_DIR = $(INSTALL) -d
Q = @
help:
$(Q)echo "install - install scripts"
$(Q)echo "uninstall - uninstall scripts"
install:
$(Q)echo -e '\033[1;32mInstalling main scripts...\033[0m'
$(INSTALL_DIR) "$(BINDIR)"
$(INSTALL_PROGRAM) serial2mqtt.py "$(BINDIR)/serial2mqtt"
$(Q)echo -e '\033[1;32mInstalling systemd files...\033[0m'
$(INSTALL_DIR) "$(INITDIR_SYSTEMD)"
$(INSTALL_DATA) [email protected] "$(INITDIR_SYSTEMD)/[email protected]"
uninstall:
$(RM) "$(INITDIR_SYSTEMD)/[email protected]"
$(RM) "$(BINDIR)/serial2mqtt"
.PHONY: install uninstall