Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
hmgle committed Nov 27, 2021
1 parent faca4f8 commit 7d5b413
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ VERSION = $(shell git describe --tags --always)
CROSS_COMPILE ?=

CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
CXX = $(CROSS_COMPILE)g++
AR = $(CROSS_COMPILE)ar

debug = 0
Expand Down
10 changes: 6 additions & 4 deletions local/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ ifneq ($(shell echo $(VERSION) | head -c 1), v)
VERSION=v0.4
endif

ifeq (,$(findstring arm,$(CC)))
GO_BUILD_PREFIX_FLAGS :=
CGO_FLAGS :=
else
GO_BUILD_PREFIX_FLAGS :=
CGO_FLAGS :=
ifneq ($(shell $(CC) -E -dM -xc /dev/null | grep __aarch64__),)
GO_BUILD_PREFIX_FLAGS := GOOS=linux GOARCH=arm64
CGO_FLAGS := CGO_ENABLED=1 CC=$(CC) CXX=$(CXX) AR=$(AR)
else ifneq ($(shell $(CC) -E -dM -xc /dev/null | grep __arm__),)
GO_BUILD_PREFIX_FLAGS := GOOS=linux GOARCH=arm
CGO_FLAGS := CGO_ENABLED=1 CC=$(CC) CXX=$(CXX) AR=$(AR)
endif
Expand Down

0 comments on commit 7d5b413

Please sign in to comment.