23 lines
431 B
Makefile
23 lines
431 B
Makefile
|
NAME = pwr-switch
|
||
|
VERSION = 1.0
|
||
|
DIRNAME = $(NAME)-$(VERSION)
|
||
|
PREFIX = /usr/local
|
||
|
|
||
|
dist:
|
||
|
mkdir -p $(DIRNAME)
|
||
|
cp $(NAME) Makefile LICENSE README.md $(DIRNAME)
|
||
|
tar zcf $(DIRNAME).tar.gz $(DIRNAME)
|
||
|
rm -rf $(DIRNAME)
|
||
|
|
||
|
clean:
|
||
|
rm -f $(DIRNAME).tar.gz
|
||
|
|
||
|
install:
|
||
|
install -dm 0755 $(DESTDIR)$(PREFIX)/sbin
|
||
|
install -m 0775 $(NAME) $(DESTDIR)$(PREFIX)/sbin
|
||
|
|
||
|
uninstall:
|
||
|
rm -f $(DESTDIR)$(PREFIX)/sbin/$(NAME)
|
||
|
|
||
|
.PHONY: install uninstall
|