Lindenii Project Forge
Login
Commit info
ID59c8de0101132c278cca3382112e2a180e2ab857
AuthorRunxi Yu<me@runxiyu.org>
Author dateMon, 17 Feb 2025 16:36:02 +0800
CommitterRunxi Yu<me@runxiyu.org>
Committer dateMon, 17 Feb 2025 16:36:02 +0800
Actions
Get patch
Makefile: Compile static Go binary
.PHONY: clean version.go

CFLAGS = -Wall -Wextra -Werror -pedantic -std=c99 -D_GNU_SOURCE

forge: $(filter-out forge,$(wildcard *)) version.go git_hooks_client/*.c git_hooks_client/git_hooks_client
	go mod vendor
	go build -o $@
	CGO_ENABLED=0 go build -o $@ -ldflags '-extldflags "-f no-PIC -static"' -tags 'osusergo netgo static_build' .

git_hooks_client/git_hooks_client:

version.go:
	printf 'package main\nconst VERSION="%s"\n' $(shell git describe --tags --always --dirty) > $@

clean:
	$(RM) forge version.go vendor