Computer Chess Club Archives


Search

Terms

Messages

Subject: New makefile to compile crafty under DOS with gnu 2.9.5

Author: Michel Langeveld

Date: 12:19:42 10/26/99


To folowing makefile appears to work...

Although the "make clean" still doesn't work properly since there's no rm in DOS
it's doing fine. (Does someone knows a neat way to solve this?)

Added also -s as LDFLAGS since it removes some information out of the source so
the exe will be smaller.

I also changed m486 to -mpentiumpro since -m486 is not a valid option anymore
(it must be -mi486 or it's a little bit outdated.)

Bob: can you modify the current makefile of the crafty package also to this one
with the other targets unaltered so we can build it again under dos.

Although make still complains (it's probably because there are to much object
files in the commandline) it produces an working exe.

gcc -s -o crafty searchr.o search.o thread.o searchmp.o repeat.o next.o nexte.o
nextr.o history.o quiesce.o evaluate.o movgen.o make.o unmake.o hash.o attacks.o
 swap.o boolean.o utility.o valid.o probe.o book.o data.o drawn.o edit.o enprise
.o epd.o epdglue.o init.o input.o interupt.o iterate.o main.o option.o output.o
phase.o ponder.o preeval.o resign.o root.o learn.o setboard.o test.o time.o vali
date.o annotate.o analyze.o evtest.o bench.o egtb.o egtbpv.o dgt.o x86-dos.o -lm

make.exe: *** [crafty] Error -1

If some knows something better let me know...

Tade...

# DOS
target  = DOS
CC      = gcc
CFLAGS  = -fomit-frame-pointer -mpentiumpro -O3 -Wall
CPP     = $(CC)
LDFLAGS = -s
opt     = -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \
	  -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST
asm     = x86-dos.o


# Do not change anything below this line!

opts = $(opt) -D$(target)

objects = searchr.o search.o thread.o searchmp.o repeat.o next.o nexte.o      \
       nextr.o history.o quiesce.o evaluate.o movgen.o make.o unmake.o hash.o \
       attacks.o swap.o boolean.o utility.o valid.o probe.o book.o data.o     \
       drawn.o edit.o enprise.o epd.o epdglue.o init.o input.o interupt.o     \
       iterate.o main.o option.o output.o phase.o ponder.o preeval.o resign.o \
       root.o learn.o setboard.o test.o time.o validate.o annotate.o          \
       analyze.o evtest.o bench.o egtb.o egtbpv.o dgt.o $(asm)

includes = data.h chess.h

epdincludes = epd.h epddefs.h epdglue.h

eval_users = data.o evaluate.o preeval.o

crafty: $(objects)
	$(CC) $(LDFLAGS) -o crafty $(objects) -lm  $(LIBS)
	@rm -f X86-elf.S
	@rm -f X86-aout.S

dgt:    dgtdrv.o
	@cc -O -o dgt dgtdrv.c

egtb.o: egtb.cpp
	$(CPP) -c $(CFLAGS) $(opts) egtb.cpp
clean:
	-rm -f *.o crafty X86-elf.X X86-aout.S

$(objects): $(includes)

$(eval_users): evaluate.h

epd.o epdglue.o option.o init.o : $(epdincludes)

.s.o:
	$(AS) $(AFLAGS) -o $*.o $*.s

.c.o:
	$(CC) $(CFLAGS) $(opts) -c $*.c

X86-aout.o:
	sed -e 's/ALIGN/4/' X86.s > X86-aout.S
	$(CC) -c X86-aout.S
	@rm X86-aout.S

X86-elf.o:
	sed -e '/ _/s// /' -e '/^_/s///' -e 's/ALIGN/16/' X86.s > X86-elf.S
	$(CC) -c X86-elf.S
	@rm X86-elf.S

x86-dos.o:
	$(CC) -c X86.S -o x86-dos.o




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.