]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Merge remote-tracking branch 'upstream/master'
[stockfish] / src / Makefile
index 3971ea78fda15c111bfa1aebbb2dd55582cddd8b..aeb8ba9d29b7d81df4720ebfde628c3b4d7feb38 100644 (file)
@@ -1,5 +1,5 @@
 # Stockfish, a UCI chess playing engine derived from Glaurung 2.1
-# Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+# Copyright (C) 2004-2022 The Stockfish developers (see AUTHORS file)
 #
 # Stockfish is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -407,12 +407,14 @@ ifeq ($(COMP),clang)
        ifneq ($(KERNEL),Darwin)
        ifneq ($(KERNEL),OpenBSD)
        ifneq ($(KERNEL),FreeBSD)
+       ifneq ($(findstring MINGW,$(KERNEL)),MINGW)
        ifneq ($(RTLIB),compiler-rt)
                LDFLAGS += -latomic
        endif
        endif
        endif
        endif
+       endif
 
        ifeq ($(arch),$(filter $(arch),armv7 armv8))
                ifeq ($(OS),Android)
@@ -423,6 +425,11 @@ ifeq ($(COMP),clang)
                CXXFLAGS += -m$(bits)
                LDFLAGS += -m$(bits)
        endif
+
+       ifeq ($(findstring MINGW,$(KERNEL)),MINGW)
+               LDFLAGS += -static
+       endif
+
 endif
 
 ifeq ($(KERNEL),Darwin)