blob: 4c9b699e4a6c2adf69731eb2c03d483a46d3ae9b (
plain) (
blame)
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
31
32
33
34
35
36
|
# SPDX-License-Identifier: AGPL-3.0-only
# SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
.PHONY: clean version.go man source.tar.gz
CFLAGS = -Wall -Wextra -pedantic -std=c99 -D_GNU_SOURCE
MAN_PAGES = lindenii-forge.5 lindenii-forge-hookc.1 lindenii-forge.1 lindenii-forge-mail.5
forge: source.tar.gz version.go hookc/*.c hookc/hookc git2d/git2d man # TODO
go build .
man: $(MAN_PAGES:%=man/%.html) $(MAN_PAGES:%=man/%.txt)
man/%.html: man/%
mandoc -Thtml -O style=./mandoc.css $< > $@
man/%.txt: man/% utils/colb
mandoc $< | ./utils/colb > $@
utils/colb:
hookc/hookc:
git2d/git2d: git2d/main.c git2d/bare.c git2d/utf8.c
$(CC) $(CFLAGS) -o git2d/git2d $^ `pkg-config --cflags --libs libgit2` -lpthread
version.go:
printf 'package main\n\nconst VERSION = "%s"\n' `git describe --tags --always --dirty` > $@
clean:
$(RM) forge version.go vendor
source.tar.gz:
rm -f source.tar.gz
go mod vendor
git ls-files -z | xargs -0 tar -czf source.tar.gz vendor
|