From da7bd3b6c23aef2d3369989ba07e2483d8f261fd Mon Sep 17 00:00:00 2001 From: icecodder Date: Sat, 14 Jan 2023 18:21:44 +0100 Subject: [PATCH] test using gcc fraud --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c70abad..efa4a5c 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,16 @@ internal/pkg/all-in-one/all-in-one.h: build/lib/liball_in_one.a 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 -all: - ifeq ($(OS),Windows_NT) +all: + SYS := $(shell gcc -dumpmachine) + ifneq (, $(findstring linux, $(SYS))) + # Do Linux things + build/bin/{cache,gateway,ratelimit,rest,webhook} build/bin/nova + else ifneq(, $(findstring mingw, $(SYS))) + # Do MinGW 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 endif -- 2.39.5