X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=4433fad7334269f225fc437931f54d12cb4ba783;hp=3feaf11b7b730a406fa2aad14ad174cbdaf82f7f;hb=9f626725aeb770a38be093a9a47a461053cf7008;hpb=247c2cd207517b0ab761ed660a45f1cb0f2caae4 diff --git a/src/Makefile b/src/Makefile index 3feaf11b..4433fad7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -200,6 +200,15 @@ ifeq ($(COMP),) COMP=gcc endif +ifeq ($(COMP),mingw) + comp=mingw + CXX=g++ + profile_prepare = gcc-profile-prepare + profile_make = gcc-profile-make + profile_use = gcc-profile-use + profile_clean = gcc-profile-clean +endif + ifeq ($(COMP),gcc) comp=gcc CXX=g++ @@ -219,14 +228,18 @@ ifeq ($(COMP),icc) endif ### 3.2 General compiler settings -CXXFLAGS = -g -Wall -Wcast-qual -ansi -fno-exceptions -fno-rtti $(EXTRACXXFLAGS) +CXXFLAGS = -g -Wall -Wcast-qual -fno-exceptions -fno-rtti $(EXTRACXXFLAGS) ifeq ($(comp),gcc) - CXXFLAGS += -pedantic -Wno-long-long -Wextra + CXXFLAGS += -ansi -pedantic -Wno-long-long -Wextra +endif + +ifeq ($(comp),mingw) + CXXFLAGS += -Wno-long-long -Wextra endif ifeq ($(comp),icc) - CXXFLAGS += -wd383,869,981,10187,10188,11505,11503 + CXXFLAGS += -wd383,981,10187,10188,11505,11503 -Wcheck -Wabi -Wdeprecated -strict-ansi endif ifeq ($(os),osx) @@ -261,6 +274,10 @@ ifeq ($(optimize),yes) endif endif + ifeq ($(comp),mingw) + CXXFLAGS += -O3 + endif + ifeq ($(comp),icc) CXXFLAGS += -fast @@ -340,6 +357,7 @@ help: @echo "" @echo "gcc > Gnu compiler (default)" @echo "icc > Intel compiler" + @echo "mingw > Gnu compiler with MinGW under Windows" @echo "" @echo "Non-standard targets:" @echo "" @@ -412,7 +430,7 @@ install: -strip $(BINDIR)/$(EXE) clean: - $(RM) $(EXE) *.o .depend *~ core bench.txt *.gcda + $(RM) $(EXE) $(EXE).exe *.o .depend *~ core bench.txt *.gcda testrun: @$(PGOBENCH) @@ -453,7 +471,7 @@ config-sanity: @test "$(prefetch)" = "yes" || test "$(prefetch)" = "no" @test "$(bsfq)" = "yes" || test "$(bsfq)" = "no" @test "$(popcnt)" = "yes" || test "$(popcnt)" = "no" - @test "$(comp)" = "gcc" || test "$(comp)" = "icc" + @test "$(comp)" = "gcc" || test "$(comp)" = "icc" || test "$(comp)" = "mingw" $(EXE): $(OBJS) $(CXX) -o $@ $(OBJS) $(LDFLAGS)