X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=c836fd426eff02b44c6458e472a764c53b85b1bc;hp=b08b15f3272a60fe3168c7d6d121775f0e2dfd7d;hb=4dded4e72f9b9582db8adc9a478e9eda5841d8c5;hpb=85a7456bd7e8a1a01cdbfa8f4b6fb563d15a37c6 diff --git a/src/Makefile b/src/Makefile index b08b15f3..c836fd42 100644 --- a/src/Makefile +++ b/src/Makefile @@ -33,10 +33,9 @@ BINDIR = $(PREFIX)/bin PGOBENCH = ./$(EXE) bench 32 1 10 default depth ### Object files -OBJS = application.o bitboard.o pawns.o material.o endgame.o evaluate.o main.o \ - misc.o move.o movegen.o history.o movepick.o search.o piece.o \ - position.o direction.o tt.o uci.o ucioption.o \ - mersenne.o book.o bitbase.o san.o benchmark.o timeman.o +OBJS = bitboard.o pawns.o material.o endgame.o evaluate.o main.o \ + misc.o move.o movegen.o history.o movepick.o search.o position.o \ + tt.o uci.o ucioption.o book.o bitbase.o san.o benchmark.o timeman.o ### ========================================================================== @@ -200,6 +199,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++ @@ -225,8 +233,12 @@ ifeq ($(comp),gcc) CXXFLAGS += -ansi -pedantic -Wno-long-long -Wextra endif +ifeq ($(comp),mingw) + CXXFLAGS += -Wno-long-long -Wextra +endif + ifeq ($(comp),icc) - CXXFLAGS += -wd383,981,10187,10188,11505,11503 -Wcheck -Wabi -Wdeprecated -strict-ansi + CXXFLAGS += -wd383,981,1418,1419,10187,10188,11505,11503 -Wcheck -Wabi -Wdeprecated -strict-ansi endif ifeq ($(os),osx) @@ -261,6 +273,10 @@ ifeq ($(optimize),yes) endif endif + ifeq ($(comp),mingw) + CXXFLAGS += -O3 + endif + ifeq ($(comp),icc) CXXFLAGS += -fast @@ -340,6 +356,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 +429,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 +470,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)