]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Move pawn_attacks_bb() helper to bitboard.h
[stockfish] / src / Makefile
index 6eb96461d2f05265288be3cebfb453b2025c9eac..f6f36727ae7ecc860b78cbdcdfb48664e71ad359 100644 (file)
@@ -1,7 +1,7 @@
 # Stockfish, a UCI chess playing engine derived from Glaurung 2.1
 # Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
 # Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
-# Copyright (C) 2015-2016 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
+# Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
 #
 # Stockfish is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -141,7 +141,7 @@ endif
 
 ### 3.1 Selecting compiler (default = gcc)
 
-CXXFLAGS += -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 $(EXTRACXXFLAGS)
+CXXFLAGS += -Wall -Wcast-qual -fno-exceptions -std=c++11 $(EXTRACXXFLAGS)
 DEPENDFLAGS += -std=c++11
 LDFLAGS += $(EXTRALDFLAGS)
 
@@ -205,7 +205,9 @@ ifeq ($(COMP),clang)
        CXX=clang++
        CXXFLAGS += -pedantic -Wextra -Wshadow
 ifneq ($(KERNEL),Darwin)
+ifneq ($(KERNEL),OpenBSD)
        LDFLAGS += -latomic
+endif
 endif
 
        ifeq ($(ARCH),armv7)
@@ -300,8 +302,6 @@ ifeq ($(optimize),yes)
 
        ifeq ($(comp),clang)
                ifeq ($(KERNEL),Darwin)
-                               CXXFLAGS += -flto
-                               LDFLAGS += $(CXXFLAGS)
                        ifeq ($(arch),i386)
                                CXXFLAGS += -mdynamic-no-pic
                        endif
@@ -347,24 +347,20 @@ endif
 ### 3.8 Link Time Optimization, it works since gcc 4.5 but not on mingw under Windows.
 ### This is a mix of compile and link time options because the lto link phase
 ### needs access to the optimization flags.
-ifeq ($(comp),gcc)
-       ifeq ($(optimize),yes)
-       ifeq ($(debug),no)
+ifeq ($(optimize),yes)
+ifeq ($(debug), no)
+       ifeq ($(comp),$(filter $(comp),gcc clang))
                CXXFLAGS += -flto
                LDFLAGS += $(CXXFLAGS)
        endif
-       endif
-endif
 
-ifeq ($(comp),mingw)
+       ifeq ($(comp),mingw)
        ifeq ($(KERNEL),Linux)
-       ifeq ($(optimize),yes)
-       ifeq ($(debug),no)
                CXXFLAGS += -flto
                LDFLAGS += $(CXXFLAGS)
        endif
        endif
-       endif
+endif
 endif
 
 ### 3.9 Android 5 can only run position independent executables. Note that this