mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 09:23:09 +00:00
Add Makefile
This commit is contained in:
parent
c3d0748d27
commit
fbe8122ebd
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
kiln
|
32
Makefile
Normal file
32
Makefile
Normal 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
|
10
README.md
10
README.md
|
@ -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/).
|
||||||
|
|
Loading…
Reference in a new issue