~kota/metweather

ref: a4b54afa3786bd6be3edab564f030fa886940a84 metweather/Makefile -rw-r--r-- 708 bytes
a4b54afaDakota Walsh create makefile and man page 4 months ago
                                                                                
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
# metweather
# Copyright (C) 2021 Dakota Walsh
# GPL3+ See LICENSE in this repo for details.
.POSIX:

include config.mk

all: clean build

build:
	go build
	scdoc < metweather.1.scd | sed "s/VERSION/$(VERSION)/g" > metweather.1

clean:
	rm -f metweather
	rm -f metweather.1

install: build
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	cp -f metweather $(DESTDIR)$(PREFIX)/bin
	chmod 755 $(DESTDIR)$(PREFIX)/bin/metweather
	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
	cp -f metweather.1 $(DESTDIR)$(MANPREFIX)/man1/metweather.1
	chmod 644 $(DESTDIR)$(MANPREFIX)/man1/metweather.1

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/metweather
	rm -f $(DESTDIR)$(MANPREFIX)/man1/metweather.1

.PHONY: all build clean install uninstall