
CC = cl

LD = link

ASM = as

FLAGS   = /O2 /G6 /Gr /Ob2 /FAs

OBJECTS = atqs.obj bitop.obj datos.obj eval.obj fen.obj genjug.obj\
gentest.obj hash.obj initataq.obj initeval.obj  initpos.obj input.obj\
itera.obj main.obj mueve.obj negascou.obj probe.obj see.obj\
sort.obj verif.obj xboard.obj time.obj command.obj book.obj uci.obj\
skipl.obj btree.obj stack.obj tbindex.obj config.obj multipv.obj

all: pepito.exe

pepito.exe: $(OBJECTS)
        $(LD) /out:pepito.exe $(OBJECTS)

$(OBJECTS): datos.h tipos.h macros.h

pepito: tbindex.obj
        $(CC) $(FLAGS) pepito.c tbindex.obj

atqs.obj: atqs.c
	$(CC) $(FLAGS) /c /out:atqs.obj atqs.c
bitop.obj: bitop.c
	$(CC) $(FLAGS) /c /out:bitop.obj bitop.c
datos.obj: datos.c
	$(CC) $(FLAGS) /c /out:datos.obj datos.c
eval.obj: eval.c
	$(CC) $(FLAGS) /c /out:eval.obj eval.c
fen.obj:  fen.c
	$(CC) $(FLAGS) /c /out:fen.obj fen.c
genjug.obj: genjug.c genjug.h
	$(CC) $(FLAGS) /c /out:genjug.obj genjug.c
gentest.obj: gentest.c
	$(CC) $(FLAGS) /c /out:gentest.obj gentest.c
hash.obj: hash.c
	$(CC) $(FLAGS) /c /out:hash.obj hash.c
initataq.obj: initataq.c
	$(CC) $(FLAGS) /c /out:initataq.obj initataq.c
initeval.obj: initeval.c
	$(CC) $(FLAGS) /c /out:initeval.obj initeval.c
initpos.obj: initpos.c
	$(CC) $(FLAGS) /c /out:initpos.obj initpos.c
input.obj: input.c
	$(CC) $(FLAGS) /c /out:input.obj input.c
itera.obj: itera.c
	$(CC) $(FLAGS) /c /out:itera.obj itera.c
main.obj: main.c
	$(CC) $(FLAGS) /c /out:main.obj main.c
mueve.obj: mueve.c
	$(CC) $(FLAGS) /c /out:mueve.obj mueve.c
negascou.obj: negascou.c
	$(CC) $(FLAGS) /c /out:negascou.obj negascou.c
pgn.obj: pgn.c
	$(CC) $(FLAGS) /c /out:pgn.obj pgn.c
probe.obj: probe.c
	$(CC) $(FLAGS) /c /out:probe.obj probe.c
see.obj: see.c
	$(CC) $(FLAGS) /c /out:see.obj see.c
sort.obj: sort.c
	$(CC) $(FLAGS) /c /out:sort.obj sort.c
tbindex.obj: tbindex.cpp egtb_glu.h
	$(CC) $(FLAGS) /c /out:tbindex.obj tbindex.cpp
verif.obj: verif.c
	$(CC) $(FLAGS) /c /out:verif.obj verif.c
xboard.obj: xboard.c
	$(CC) $(FLAGS) /c /out:xboard.obj xboard.c
time.obj: time.c
	$(CC) $(FLAGS) /c /out:time.obj time.c
config.obj: config.c
	$(CC) $(FLAGS) /c /out:config.obj config.c
command.obj: command.c command.h
        $(CC) $(FLAGS) /c /out:command.obj command.c
uci.obj: uci.c uci.h
        $(CC) $(FLAGS) /c /out:uci.obj uci.c
book.obj: book.c book.h
        $(CC) $(FLAGS) /c /out:book.obj book.c
btree.obj: btree.c btree.h
        $(CC) $(FLAGS) /c /out:btree.obj btree.c
skipl.obj: skipl.c skipl.h
        $(CC) $(FLAGS) /c /out:skipl.obj skipl.c
stack.obj: stack.h stack.c
        $(CC) $(FLAGS) /c /out:stack.obj stack.c
multipv.obj: multipv.c
        $(CC) $(FLAGS) /c /out:multipv.obj multipv.c

clean:
        erase *.obj
