2021-02-24 23:45:29 +00:00
|
|
|
.DEFAULT_GOAL := help
|
2020-09-28 19:49:00 +00:00
|
|
|
|
2021-02-24 23:45:29 +00:00
|
|
|
DESTDIR ?= ./build
|
|
|
|
BIN ?= $(DESTDIR)/usr/bin
|
|
|
|
LIB ?= $(DESTDIR)/usr/share/gridtracker
|
|
|
|
APP ?= $(DESTDIR)/usr/share/applications
|
|
|
|
MAN ?= $(DESTDIR)/usr/share/man/man1
|
|
|
|
DOC ?= $(DESTDIR)/usr/share/doc/gridtracker
|
2020-09-28 19:49:00 +00:00
|
|
|
|
2021-02-24 23:45:29 +00:00
|
|
|
.PHONY: help
|
|
|
|
help:
|
|
|
|
@echo "Specify a target to build:"
|
|
|
|
@echo " -> make install"
|
|
|
|
@echo " install gridtracker in DESTDIR (default: ./build)"
|
|
|
|
@echo " -> make clean"
|
|
|
|
@echo " remove built files from DESTDIR"
|
|
|
|
|
|
|
|
.PHONY: clean
|
2020-11-17 20:08:56 +00:00
|
|
|
clean:
|
2021-02-24 23:45:29 +00:00
|
|
|
@echo "Cleaning $(DESTDIR)..."
|
|
|
|
rm -rf $(DESTDIR)/*
|
2020-11-17 20:08:56 +00:00
|
|
|
|
2021-02-24 23:45:29 +00:00
|
|
|
.PHONY: install
|
2020-09-28 19:49:00 +00:00
|
|
|
install:
|
2021-02-24 23:45:29 +00:00
|
|
|
@echo "Installing gridtracker in $(DESTDIR)..."
|
|
|
|
install -Dcm 755 gridtracker.sh $(BIN)/gridtracker
|
|
|
|
install -Dcm 644 gridtracker.desktop $(APP)/gridtracker.desktop
|
|
|
|
install -Dcm 644 gridtracker.1 $(MAN)/gridtracker.1
|
|
|
|
install -Dcm 644 LICENSE $(DOC)/LICENSE
|
|
|
|
mkdir -p $(LIB)
|
2020-09-28 19:49:00 +00:00
|
|
|
cp -r package.nw/* $(LIB)
|
2021-02-24 23:45:29 +00:00
|
|
|
|