Skip to content

Commit

Permalink
Merge pull request #16 from bechampion/static
Browse files Browse the repository at this point in the history
NOJ - include both dynamic & static binary gohip
  • Loading branch information
gr211 authored Jul 1, 2024
2 parents 70f81ee + b220d7a commit 8e8906c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
CGO_ENABLED=0
export CGO_ENABLED
all: delete_latest_tag recreate_tag push_tag

delete_latest_tag:
Expand All @@ -16,15 +14,21 @@ push_tag:

.PHONY: all delete_latest_tag recreate_tag push_tag

build: test
go build -o gohip-$(GOOS)-$(GOARCH)

test:
go test -v ./systemd ./others ./osdata ./types .

build: build-dynamic build-static

build-dynamic:
go build -o gohip-$(GOOS)-$(GOARCH)

build-static:
CGO_ENABLED=0 go build -o gohip-static-$(GOOS)-$(GOARCH)

install: build
mkdir -p $(DESTDIR)/usr/bin
cp gohip-$(GOOS)-$(GOARCH) $(DESTDIR)/usr/bin/gohip
cp gohip-static-$(GOOS)-$(GOARCH) $(DESTDIR)/usr/bin/gohip-static

debian-pkg: install
mkdir -p $(DESTDIR)/DEBIAN
Expand Down

0 comments on commit 8e8906c

Please sign in to comment.