Merge pull request '[BRANDING] add forgejo target to Makefile' (#1086) from dachary/forgejo:wip-executable-forgejo into forgejo-branding

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1086
This commit is contained in:
Loïc Dachary 2023-07-21 12:45:47 +00:00
commit 2e3fe4f25e

View file

@ -842,6 +842,9 @@ security-check:
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
forgejo: $(EXECUTABLE)
ln -f $(EXECUTABLE) forgejo
static-executable: $(GO_SOURCES) $(TAGS_PREREQ)
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -o $(EXECUTABLE)