with uname ??

This commit is contained in:
icecodder 2023-01-14 18:27:40 +01:00 committed by GitHub
parent da7bd3b6c2
commit 3e41e414ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,16 +23,17 @@ build/bin/nova: build/lib/liball_in_one.a internal/pkg/all-in-one/all-in-one.h
go build -a -ldflags '-s' -o build/bin/nova cmd/nova/nova.go go build -a -ldflags '-s' -o build/bin/nova cmd/nova/nova.go
all: all:
SYS := $(shell gcc -dumpmachine) #SYS := $(shell gcc -dumpmachine)
ifneq (, $(findstring linux, $(SYS))) SYS := $(shell uname -s)
ifeq ($(SYS),Linux)
# Do Linux things # Do Linux things
build/bin/{cache,gateway,ratelimit,rest,webhook} build/bin/nova build/bin/{cache,gateway,ratelimit,rest,webhook} build/bin/nova
else ifneq(, $(findstring mingw, $(SYS))) else ifeq ($(SYS),Darwin)
# Do MinGW things # Do Darwin things
build/bin/{cache,gateway,ratelimit,rest,webhook}{,.exe} build/bin/nova
else
# Do things for others
build/bin/{cache,gateway,ratelimit,rest,webhook} build/bin/nova build/bin/{cache,gateway,ratelimit,rest,webhook} build/bin/nova
else
# Do MinGW things
build/bin/{cache,gateway,ratelimit,rest,webhook}{,.exe} build/bin/nova
endif endif
docker-images: docker-images: