Add Makefile

This commit is contained in:
adnano 2020-11-01 20:51:43 -05:00
parent 26e6a0b05b
commit 7b6efd6fb8
3 changed files with 39 additions and 6 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
kiln

32
Makefile Normal file
View file

@ -0,0 +1,32 @@
.POSIX:
.SUFFIXES:
VERSION=0.0.0
PREFIX?=/usr/local
GO?=go
GOFLAGS?=
GOSRC!=find . -name '*.go'
GOSRC+=go.mod go.sum
all: kiln
kiln: $(GOSRC)
$(GO) build $(GOFLAGS) \
-ldflags "-X main.Prefix=$(PREFIX) \
-X main.ShareDir=$(SHAREDIR) \
-X main.Version=$(VERSION)" \
-o $@
clean:
rm -f kiln
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
install -m755 kiln $(DESTDIR)$(PREFIX)/bin
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/kiln
.PHONY: all clean install uninstall

View file

@ -12,14 +12,14 @@ A simple static site generator for Gemini.
## Installation ## Installation
``` First install Go version 1.15 or later.
go install Then compile:
```
$ make
# make install
## Usage ## Usage
``` kiln
kiln
```
For more information, consult the [wiki](https://man.sr.ht/~adnano/kiln/). For more information, consult the [wiki](https://man.sr.ht/~adnano/kiln/).