Skip to content

Commit 9fb6fd6

Browse files
committed
Fixed Makefile to clean up everything
Make cpu specific optimization optional Merged original README to README.md
1 parent cc1f95a commit 9fb6fd6

File tree

3 files changed

+37
-33
lines changed

3 files changed

+37
-33
lines changed

Makefile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ SRCS = \
4444
thordb.c \
4545
timer.c \
4646
unflip.c
47-
# bitbvald.c
4847

4948
HEADERS = \
5049
autoplay.h \
@@ -85,7 +84,6 @@ HEADERS = \
8584
thordb.h \
8685
timer.h \
8786
unflip.h
88-
# bitbvald.h
8987

9088

9189
BOOKTOOL_SRCS = $(SRCS) booktool.c
@@ -105,6 +103,7 @@ PRACTICE_EXE = practice
105103
ENDDEV_EXE = enddev
106104
ZEBRA_EXE = zebra
107105
SCRZEBRA_EXE = scrzebra
106+
TUNE8DBS_EXE = tune8dbs
108107

109108

110109

@@ -123,14 +122,11 @@ CXX = g++
123122

124123
# --- Flags ---
125124

126-
DEFS = -DINCLUDE_BOOKTOOL -DTEXT_BASED -DUSE_PENTIUM_ASM -DZLIB_STATIC
127-
#DEFS = -DUSE_PENTIUM_ASM -DZLIB_STATIC
125+
DEFS = -DINCLUDE_BOOKTOOL -DTEXT_BASED -DZLIB_STATIC
128126

129127
WARNINGS = -Wall -Wcast-align -Wwrite-strings -Wstrict-prototypes -Winline
130-
#OPTS = -O2 -s -fomit-frame-pointer -march=pentium -malign-functions=6 -fschedule-insns2
131-
OPTS = -O4 -s -fomit-frame-pointer -mtune=pentium2 -falign-functions=32
132-
#OPTS = -O4 -pg -mtune=pentium2 -falign-functions=32
133-
#OPTS = -O4 -g -mtune=pentium2
128+
OPTS = -O4 -s -fomit-frame-pointer -falign-functions=32
129+
#OPTS = -O4 -s -fomit-frame-pointer -mtune=core2 -falign-functions=32
134130

135131
CFLAGS = $(OPTS) $(WARNINGS) $(DEFS)
136132
CXXFLAGS = $(CFLAGS)
@@ -154,7 +150,10 @@ libzebra.a: $(OBJS)
154150
clean :
155151
$(RM) $(OBJS) booktool.o zebra.o scrzebra.o $(ZEBRA_EXE) a.out core \
156152
*.stackdump gmon.out $(PRACTICE_OBJS) $(PRACTICE_EXE) \
157-
libzebra.a *.da
153+
libzebra.a *.da \
154+
$(BOOKTOOL_OBJS) $(ENDDEV_OBJS) \
155+
$(AUTOPLAY_EXE) $(BOOKTOOL_EXE) $(ENDDEV_EXE) $(SCRZEBRA_EXE) $(TUNE8DBS_EXE) \
156+
158157

159158
booktool : $(OBJS) $(BOOKTOOL_OBJS) autop.o
160159
$(CC) -o $(BOOKTOOL_EXE) $(CFLAGS) $(BOOKTOOL_OBJS) autop.o $(LDFLAGS)
@@ -174,7 +173,7 @@ bookinst:
174173
$(CC) -o bookinst $(CFLAGS) bookinst.c myrandom.o
175174

176175
tune8dbs:
177-
$(CC) -o tune8dbs $(CFLAGS) tune8dbs.c $(LDFLAGS)
176+
$(CC) -o $(TUNE8DBS_EXE) $(CFLAGS) tune8dbs.c $(LDFLAGS)
178177

179178
genbb: genbb.o
180179
$(CC) -o genbb genbb.o

README

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,31 @@ Othello program created by Gunnar Andersson
55

66
This repository has started by uploading original code, as of 2014/04/29, by Gunnar Andersson
77

8-
Gunner's website: http://radagast.se/othello/
9-
Original source code: http://radagast.se/othello/zebra.tar.gz
8+
## Web sites
9+
10+
* Gunner's website: http://radagast.se/othello/
11+
* Original source code: http://radagast.se/othello/zebra.tar.gz
12+
13+
14+
## README (ORIGINAL)
15+
----- LICENSE -----
16+
17+
This piece of software is released under the GPL.
18+
See the file COPYING for more information.
19+
20+
----- COMPILING -----
21+
22+
You need make and a C compiler, e.g. GCC, to compile Zebra. Run "make all"
23+
to build Zebra and some tools. I have built Zebra using Cygwin and GCC 3.2.
24+
Using an older or newer version of GCC should work fine. ICC should also
25+
work, but I have not access to it. The inline assembly can only be used
26+
if you run GCC, so performance will probably take a big hit if you use a
27+
compiler that is not capable of reading GCC-style inline assembly.
28+
29+
----- RUNNING -----
30+
31+
Copy coeffs2.bin and book.bin from the directory where WZebra is installed
32+
to the directory where Zebra and its tools are found.
33+
"./zebra -help" describes the available options. If you find the help text
34+
too terse: Use the force, read the source.
35+

0 commit comments

Comments
 (0)