2023-10-25 12:01:46 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#
|
|
|
|
# SPDX-FileCopyrightText: 2023 Glenn Y. Rolland <glenux@glenux.net>
|
|
|
|
# Copyright © 2023 Glenn Y. Rolland <glenux@glenux.net>
|
2023-10-20 09:29:54 +00:00
|
|
|
|
2024-12-29 19:14:15 +00:00
|
|
|
DESTDIR=
|
|
|
|
PREFIX=$(DESTDIR)/usr
|
2024-01-07 18:45:39 +00:00
|
|
|
|
2024-12-30 10:18:05 +00:00
|
|
|
.PHONY: all
|
2023-10-20 09:29:54 +00:00
|
|
|
all: build
|
|
|
|
|
2024-12-30 10:18:05 +00:00
|
|
|
.PHONY: prepare
|
2024-01-07 18:45:39 +00:00
|
|
|
prepare:
|
|
|
|
shards install
|
|
|
|
|
2024-12-30 10:18:05 +00:00
|
|
|
.PHONY: build
|
2023-10-20 09:29:54 +00:00
|
|
|
build:
|
2024-01-15 01:04:25 +00:00
|
|
|
shards build --error-trace -Dpreview_mt
|
2023-11-24 09:48:55 +00:00
|
|
|
@echo SUCCESS
|
|
|
|
|
|
|
|
watch:
|
|
|
|
watchexec --restart --delay-run 3 -c -e cr make build
|
2024-01-07 18:45:39 +00:00
|
|
|
|
2024-12-30 10:18:05 +00:00
|
|
|
.PHONY: spec test
|
2024-01-07 18:45:39 +00:00
|
|
|
spec: test
|
|
|
|
test:
|
|
|
|
crystal spec --error-trace
|
|
|
|
|
2024-12-30 10:18:05 +00:00
|
|
|
.PHONY: install
|
2024-01-07 18:45:39 +00:00
|
|
|
install:
|
|
|
|
install \
|
2024-12-29 20:09:05 +00:00
|
|
|
-D \
|
2024-01-07 18:45:39 +00:00
|
|
|
-m 755 \
|
2024-12-29 20:09:05 +00:00
|
|
|
bin/mfm \
|
|
|
|
$(PREFIX)/bin/mfm
|
2024-01-07 18:45:39 +00:00
|
|
|
|
2024-12-30 10:18:05 +00:00
|
|
|
.PHONY: deb
|
|
|
|
deb:
|
|
|
|
dpkg-buildpackage -us -uc -d
|
2024-01-07 18:45:39 +00:00
|
|
|
|