summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoricecodder <git@icecodder.me>2023-01-14 18:21:44 +0100
committerGitHub <noreply@github.com>2023-01-14 18:21:44 +0100
commitda7bd3b6c23aef2d3369989ba07e2483d8f261fd (patch)
tree84c3c03739691388de13d19925ce504f32c62cc9 /Makefile
parentf25a13e60e70924de69cfacb20ffc287a8ce9425 (diff)
test using gcc fraud
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files 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