2020-07-14 19:57:02 +01:00
|
|
|
# Pominal
|
|
|
|
# Copyright (C) 2020 Daniel Anglin
|
2019-06-29 22:11:25 +01:00
|
|
|
|
2020-07-14 19:57:02 +01:00
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
2019-06-29 22:11:25 +01:00
|
|
|
|
2020-07-14 19:57:02 +01:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
include config.mk
|
|
|
|
|
|
|
|
.PHONY: test_unit test_cover_report test_lint pominal clean
|
2019-08-14 01:10:28 +01:00
|
|
|
|
|
|
|
test_unit:
|
2020-07-14 19:57:02 +01:00
|
|
|
go test -v -coverprofile=cover.out .
|
2020-01-18 01:04:51 +00:00
|
|
|
|
|
|
|
test_cover_report: test_unit
|
2020-07-14 19:57:02 +01:00
|
|
|
go tool cover -html=cover.out -o code-coverage.html
|
2019-06-29 22:11:25 +01:00
|
|
|
|
2020-01-24 09:51:21 +00:00
|
|
|
test_lint:
|
2020-07-14 19:57:02 +01:00
|
|
|
golangci-lint run --color always
|
|
|
|
|
|
|
|
pominal:
|
|
|
|
go build -ldflags=$(LDFLAGS) -v -a -o pominal
|
|
|
|
|
|
|
|
install: pominal
|
|
|
|
mkdir -p $(INSTALL_PREFIX)/bin
|
|
|
|
mkdir -p $(INSTALL_PREFIX)/share/pominal
|
|
|
|
cp -f pominal $(INSTALL_PREFIX)/bin
|
|
|
|
chmod 0755 $(INSTALL_PREFIX)/bin/pominal
|
|
|
|
cp -a assets/* $(INSTALL_PREFIX)/share/pominal
|
|
|
|
chmod -R a-rwx,u+rwX,g+rX,o+rX $(INSTALL_PREFIX)/share/pominal
|
2020-01-24 09:51:21 +00:00
|
|
|
|
2020-07-14 19:57:02 +01:00
|
|
|
uninstall:
|
|
|
|
rm -f $(INSTALL_PREFIX)/bin/pominal
|
|
|
|
rm -fr $(INSTALL_PREFIX)/share/pominal
|
2019-06-29 22:11:25 +01:00
|
|
|
|
|
|
|
clean:
|
2020-07-14 19:57:02 +01:00
|
|
|
go clean
|