Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit 43af9e8

Browse files
committed
Add Makefile mingw
Add a Makefile for mingw compiler (used with Windows)
1 parent 65776e7 commit 43af9e8

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

src/Makefile.mingw

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
# files
3+
4+
EXE = fruit-reloaded
5+
6+
OBJS = attack.o board.o book.o egbb.o engine.o eval.o fen.o hash.o list.o main.o \
7+
material.o move.o move_check.o move_do.o move_evasion.o move_gen.o move_legal.o \
8+
option.o pawn.o piece.o posix.o protocol.o pst.o pv.o random.o recog.o search.o \
9+
search_full.o see.o sort.o square.o tb.o test.o thread.o trans.o util.o \
10+
value.o vector.o
11+
12+
# rules
13+
14+
all: $(EXE) .depend
15+
16+
clean:
17+
$(RM) *.o .depend gmon.out fruit-reloaded
18+
19+
# general
20+
21+
CXX = x86_64-w64-mingw32-g++.exe
22+
CXXFLAGS = -Wall -pipe
23+
LDFLAGS = -lm
24+
25+
# C++
26+
27+
CXXFLAGS += -fno-exceptions -fno-rtti
28+
29+
# optimisation
30+
31+
CXXFLAGS += -O3 -fstrict-aliasing
32+
#CXXFLAGS += -fomit-frame-pointer
33+
34+
# cpu
35+
36+
#CXXFLAGS += -march=core2
37+
38+
# strip
39+
40+
LDFLAGS += -s
41+
42+
# dependencies
43+
44+
$(EXE): $(OBJS)
45+
$(CXX) $(LDFLAGS) -o $@ $(OBJS)
46+
47+
.depend:
48+
$(CXX) -MM $(OBJS:.o=.cpp) > $@
49+
50+
include .depend
51+

0 commit comments

Comments
 (0)