Skip to content

Commit

Permalink
Remvoed CGO_ENABLED env var on go build command in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinmwinuka committed Feb 22, 2024
1 parent 9a4f58a commit c8a2700
Show file tree
Hide file tree
Showing 2 changed files with 209 additions and 206 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
build-server:
CGO_ENABLED=$(CGO_ENABLED) CC=$(CC) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(DEST)/server ./src/*.go
CC=$(CC) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(DEST)/server ./src/*.go

build:
env CGO_ENABLED=1 CC=x86_64-linux-musl-gcc GOOS=linux GOARCH=amd64 DEST=bin/linux/x86_64 make build-server
env CC=x86_64-linux-musl-gcc GOOS=linux GOARCH=amd64 DEST=bin/linux/x86_64 make build-server

make run:
make build && docker-compose up --build

test:
go clean -testcache && go test ./src/... -coverprofile coverage/cover.out
Loading

0 comments on commit c8a2700

Please sign in to comment.