Fix multi-leg promotions
[xboard.git] / winboard / makefile.gcc
index ca70cc4..77fc0b9 100644 (file)
@@ -5,9 +5,9 @@ PROJ=winboard
 \r
 \r
 OBJS=backend.o book.o gamelist.o lists.o moves.o pgntags.o uci.o zippy.o\\r
- parser.o wbres.o wclipbrd.o wedittags.o wengineo.o wevalgraph.o\\r
- wgamelist.o whistory.o winboard.o wlayout.o woptions.o wsnap.o\\r
- wsockerr.o help.o\r
+ parser.o wbres.o wclipbrd.o wedittags.o wengineoutput.o wevalgraph.o\\r
+ wgamelist.o whistory.o history.o winboard.o wlayout.o woptions.o wsnap.o\\r
+ wsockerr.o help.o wsettings.o wchat.o engineoutput.o evalgraph.o\r
 \r
 \r
 # make compiling less spammy\r
@@ -18,22 +18,28 @@ compile = @echo "$1"; $(CC) $(CFLAGS) $1
 USE_DEBUG=0\r
 \r
 \r
+# JAWS support?\r
+JAWS=0\r
+\r
+\r
 # set this to 1 unless you don't mind linking with cygwin1.dll\r
 USE_MINGW=1\r
 \r
 \r
 # set up for cygwin or not\r
 ifeq ($(USE_MINGW),1)\r
-CFCYG = -mno-cygwin\r
+CFCYG = -mno-cygwin -DUSE_I64\r
 LFCYG = -mno-cygwin -lmsvcrt\r
 endif\r
 \r
-\r
 CC = gcc\r
 FLEX = "flex.exe" # we need version 2.5.4 or later, cygwin's is 2.5.35\r
 #      "c:/mingw/mingw32/bin/flex.exe"\r
 HC="C:/Program Files/Help Workshop/hcrtf" -xn\r
 DEFS = -D_WIN32_IE=0x0300 -DWIN32\r
+ifeq ($(JAWS),1)\r
+  DEFS += -DJAWS\r
+endif\r
 WARN = -Wall -Wno-char-subscripts -Wno-parentheses\r
 ARCH =\r
 ifeq ($(USE_DEBUG),0)\r
@@ -46,7 +52,6 @@ CF = -c $(WARN) -pipe $(CFDEBUG) $(DEFS) -I. -I..
 CFLAGS = $(CF) $(ARCH) $(OPTS) $(CFCYG)\r
 LFLAGS = $(LFCYG) $(CFDEBUG) -fpic -s -mwindows -lwsock32 -lwinmm -lcomctl32\r
 \r
-\r
 all: $(PROJ).exe\r
 \r
 \r
@@ -58,22 +63,12 @@ clean:
 \r
 # Update the help file if necessary\r
 $(PROJ).hlp : $(PROJ).rtf\r
-       $(HC) $(PROJ).hpj\r
-       @cat $(PROJ).err\r
-       @mv $(PROJ).hlp tmp.hlp\r
-       @mv tmp.hlp $(PROJ).hlp # these moves to get the case right\r
+       $(HC) $(PROJ).hpj && @cat $(PROJ).err && @mv $(PROJ).hlp tmp.hlp && @mv tmp.hlp $(PROJ).hlp || true # these moves to get the case right\r
 \r
 \r
 # Update the resource if necessary\r
-wbres.o: $(PROJ).rc $(PROJ).h resource.h\r
-       windres --use-temp-file --include-dir .. $< -O coff -o $@\r
-\r
-\r
-# note: cygwin flex needs m4 package.  cygwin-setup forgets this dependency\r
-# note2: use mingw flex instead... although I got cygwin's flex working (with m4),\r
-#        it didn't produce a useable parser.c (1000's of errors)\r
-parser.c: ../parser.l\r
-       $(FLEX) -oparser.c -L ../parser.l\r
+wbres.o: $(PROJ).rc $(PROJ).h resource.h config.h\r
+       windres $(DEFS) --use-temp-file --include-dir .. $< -O coff -o $@\r
 \r
 \r
 $(PROJ).exe: $(OBJS) $(PROJ).hlp\r
@@ -81,15 +76,15 @@ $(PROJ).exe: $(OBJS) $(PROJ).hlp
 \r
 \r
 winboard.o: winboard.c config.h winboard.h ../common.h ../frontend.h ../backend.h \\r
-       ../moves.h wgamelist.h defaults.h resource.h wclipbrd.h \\r
-       wedittags.h wsockerr.h woptions.h wsnap.h ../lists.h help.h
+       ../moves.h defaults.h resource.h wclipbrd.h \\r
+       wsockerr.h woptions.h wsnap.h ../lists.h help.h ../args.h\r
        $(call compile, $<)\r
 \r
 backend.o: ../backend.c config.h ../common.h ../frontend.h ../backend.h \\r
        ../parser.h ../moves.h ../zippy.h ../backendz.h ../gettext.h ../lists.h\r
        $(call compile, $<)\r
 \r
-parser.o: parser.c config.h ../common.h ../backend.h ../parser.h \\r
+parser.o: ../parser.c config.h ../common.h ../backend.h ../parser.h \\r
        ../frontend.h ../moves.h ../lists.h\r
        $(call compile, $<)\r
 \r
@@ -104,44 +99,56 @@ gamelist.o: ../gamelist.c config.h ../lists.h ../common.h ../frontend.h \
        ../backend.h ../parser.h\r
        $(call compile, $<)\r
 \r
-wclipbrd.obj: wclipbrd.c config.h ../common.h ../frontend.h ../backend.h \\r
+wclipbrd.o: wclipbrd.c config.h ../common.h ../frontend.h ../backend.h \\r
        winboard.h resource.h wclipbrd.h ../lists.h\r
        $(call compile, $<)\r
 \r
-wedittags.obj: wedittags.c config.h ../common.h winboard.h resource.h ../frontend.h \\r
-       ../backend.h ../lists.h wedittags.h\r
+wedittags.o: wedittags.c config.h ../common.h winboard.h resource.h ../frontend.h \\r
+       ../backend.h ../lists.h\r
        $(call compile, $<)\r
 \r
-wgamelist.obj: wgamelist.c config.h. ../common.h winboard.h resource.h ../frontend.h \\r
-       ../backend.h wgamelist.h ../lists.h\r
+wgamelist.o: wgamelist.c config.h ../common.h winboard.h resource.h ../frontend.h \\r
+       ../backend.h ../lists.h\r
        $(call compile, $<)\r
 \r
-woptions.obj: woptions.c config.h ../common.h ../frontend.h ../backend.h ../lists.h \\r
+woptions.o: woptions.c config.h ../common.h ../frontend.h ../backend.h ../lists.h \\r
        defaults.h winboard.h resource.h\r
        $(call compile, $<)\r
 \r
-wengineo.obj: wengineo.c config.h ../common.h ../frontend.h ../backend.h \\r
-       ../lists.h winboard.h resource.h wsnap.h\r
+wengineoutput.o: wengineoutput.c ../engineoutput.h config.h ../common.h \\r
+       ../frontend.h ../backend.h ../lists.h winboard.h resource.h wsnap.h\r
        $(call compile, $<)\r
 \r
-whistory.obj: whistory.c config.h ../common.h ../frontend.h ../backend.h \\r
-       ../lists.h winboard.h resource.h wsnap.h\r
+engineoutput.o: ../engineoutput.c ../engineoutput.h config.h ../common.h \\r
+       ../frontend.h ../backend.h ../lists.h\r
        $(call compile, $<)\r
 \r
-wevalgraph.obj: wevalgraph.c config.h ../common.h ../frontend.h ../backend.h \\r
+whistory.o: whistory.c config.h ../common.h ../frontend.h ../backend.h \\r
        ../lists.h winboard.h resource.h wsnap.h\r
        $(call compile, $<)\r
 \r
-wlayout.obj: wlayout.c config.h ../common.h winboard.h resource.h\r
+history.o: ../history.c config.h ../common.h ../frontend.h ../backend.h \\r
+       ../lists.h\r
+       $(call compile, $<)\r
+\r
+wevalgraph.o: wevalgraph.c ../evalgraph.h config.h ../common.h ../frontend.h \\r
+       ../backend.h ../lists.h winboard.h resource.h wsnap.h\r
        $(call compile, $<)\r
 \r
-wsockerr.obj: wsockerr.c wsockerr.h\r
+evalgraph.o: ../evalgraph.c ../evalgraph.h config.h ../common.h ../frontend.h \\r
+       ../backend.h ../lists.h\r
        $(call compile, $<)\r
 \r
-help.o: help.c help.h
-       $(call compile, $<)
-
-wsnap.obj: wsnap.c wsnap.h\r
+wlayout.o: wlayout.c config.h ../common.h ../frontend.h winboard.h resource.h\r
+       $(call compile, $<)\r
+\r
+wsockerr.o: wsockerr.c wsockerr.h\r
+       $(call compile, $<)\r
+\r
+help.o: help.c help.h\r
+       $(call compile, $<)\r
+\r
+wsnap.o: wsnap.c wsnap.h\r
        $(call compile, $<)\r
 \r
 pgntags.o: ../pgntags.c config.h ../common.h ../frontend.h ../backend.h \\r
@@ -155,7 +162,13 @@ zippy.o: ../zippy.c config.h ../common.h ../zippy.h ../frontend.h \
 book.o: ../book.c ../common.h ../backend.h ../lists.h\r
        $(call compile, $<)\r
 \r
-uci.o: ../uci.c ..//common.h ../backend.h ../frontend.h ../lists.h\r
+uci.o: ../uci.c ../common.h ../backend.h ../frontend.h ../lists.h\r
+       $(call compile, $<)\r
+\r
+wsettings.o: wsettings.c ../common.h ../backend.h ../frontend.h ../lists.h\r
+       $(call compile, $<)\r
+\r
+wchat.o: wchat.c winboard.h wsnap.h ../common.h ../backend.h ../frontend.h ../lists.h\r
        $(call compile, $<)\r
 \r
 %.o: %.c\r