]> git.puffer.fish Git - matthieu/nova.git/commitdiff
test using gcc fraud
authoricecodder <git@icecodder.me>
Sat, 14 Jan 2023 17:21:44 +0000 (18:21 +0100)
committerGitHub <noreply@github.com>
Sat, 14 Jan 2023 17:21:44 +0000 (18:21 +0100)
Makefile

index c70abad28efbca6cefdbb1cefb414b23bb31d1a5..efa4a5c7b02d3f4fe3300ba327d5a9ceceeee207 100644 (file)
--- 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