Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Rework makefile to enable incremental compilation (#247)
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Whited <[email protected]>

Signed-off-by: Sam Whited <[email protected]>
  • Loading branch information
SamWhited authored Aug 23, 2022
1 parent 6640d38 commit aa4e009
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
.POSIX:
.SILENT:
.PHONY: check fmt vet lint generate test proto build install installctl push-dockerimage

GOFILES!=find . -name '*.go'
GOLDFLAGS =-s -w -extldflags $(LDFLAGS)

jackal: $(GOFILES) go.mod go.sum
CGO_ENABLED=0 go build -tags netgo -ldflags "$(GOLDFLAGS)" -o "$@" ./cmd/jackal

jackalctl: $(GOFILES) go.mod go.sum
CGO_ENABLED=0 go build -tags netgo -ldflags "$(GOLDFLAGS)" -o "$@" ./cmd/jackalctl

go.sum: $(GOFILES) go.mod
go mod tidy

generate:
@echo "Generating mock files..."
@bash scripts/generate.sh
Expand All @@ -26,9 +40,8 @@ proto:
@echo "Generating proto code..."
@bash scripts/genproto.sh

build:
build: jackal
@echo "Compiling jackal binary..."
@bash scripts/compile.sh

install:
@echo "Installing jackal binary..."
Expand Down
7 changes: 0 additions & 7 deletions scripts/compile.sh

This file was deleted.

0 comments on commit aa4e009

Please sign in to comment.