From: Eric Mullins Date: Tue, 14 Jul 2009 04:26:56 +0000 (-0600) Subject: Updated cmdline makefiles to be able to produce JAWS binaries. X-Git-Tag: v4.4.0.beta1~8 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=a315e02d0fd3ee18914b012f7fc0c4d9ae1504cb;p=xboard.git Updated cmdline makefiles to be able to produce JAWS binaries. This breaks support for MSVC 4.x. It may still be possible to use that compiler if you obtain the latest SDK from Microsoft. MSVC 6.0 still works, but I had to change the target windows version to 0x500 which causes warnings about building beta applications. This is all due to the use of MENUBARINFO data type in the jaws binary. You can reduce the WINVER to 0x0400 safely if you are not building a JAWS binary, and MSVC 4.x will work fine. --- diff --git a/winboard/makefile.gcc b/winboard/makefile.gcc index 43fb4fe..aea08d9 100644 --- a/winboard/makefile.gcc +++ b/winboard/makefile.gcc @@ -12,6 +12,7 @@ OBJS=backend.o book.o gamelist.o lists.o moves.o pgntags.o uci.o zippy.o\ # make compiling less spammy compile = @echo "$1"; $(CC) $(CFLAGS) $1 +compile = $(CC) $(CFLAGS) $1 # Debugging? @@ -37,6 +38,9 @@ FLEX = "flex.exe" # we need version 2.5.4 or later, cygwin's is 2.5.35 # "c:/mingw/mingw32/bin/flex.exe" HC="C:/Program Files/Help Workshop/hcrtf" -xn DEFS = -D_WIN32_IE=0x0300 -DWIN32 +ifeq ($(JAWS),1) + DEFS += -DJAWS +endif WARN = -Wall -Wno-char-subscripts -Wno-parentheses ARCH = ifeq ($(USE_DEBUG),0) @@ -49,14 +53,6 @@ CF = -c $(WARN) -pipe $(CFDEBUG) $(DEFS) -I. -I.. CFLAGS = $(CF) $(ARCH) $(OPTS) $(CFCYG) LFLAGS = $(LFCYG) $(CFDEBUG) -fpic -s -mwindows -lwsock32 -lwinmm -lcomctl32 -# set up for JAWS -RESDEPS = $(PROJ).rc $(PROJ).h resource.h -ifeq ($(JAWS),1) - RESDEPS = jaws.rc resource.h jaws.h - DEFS += -DJAWS -endif - - all: $(PROJ).exe @@ -75,7 +71,8 @@ $(PROJ).hlp : $(PROJ).rtf # Update the resource if necessary -wbres.o: $(RESDEPS) +#wbres.o: $(RESDEPS) +wbres.o: $(PROJ).rc $(PROJ).h resource.h windres $(DEFS) --use-temp-file --include-dir .. $< -O coff -o $@ diff --git a/winboard/makefile.ms b/winboard/makefile.ms index b4157e9..c6b886c 100644 --- a/winboard/makefile.ms +++ b/winboard/makefile.ms @@ -16,12 +16,19 @@ OBJS=backend.obj book.obj gamelist.obj lists.obj moves.obj pgntags.obj uci.obj z USE_DEBUG=0 +# JAWS support? +JAWS=0 + + CC = @cl RC = @rc LINK = link HC="c:\program files\help workshop\hcrtf.exe" -xn FLEX = "c:/mingw/mingw32/bin/flex.exe" -DEFS = -D_WIN32_IE=0x300 -DWIN32 -DWINVER=0x400 -D_WIN32_WINDOWS=0x500 +DEFS = -D_WIN32_IE=0x300 -DWIN32 -DWINVER=0x0500 -D_WIN32_WINDOWS=0x500 +!if $(JAWS) == 1 +DEFS = -DJAWS $(DEFS) +!endif #WARN = -W3 ARCH = @@ -76,7 +83,7 @@ parser.c: ../parser.l winboard.obj: winboard.c config.h winboard.h ../common.h ../frontend.h \ ../backend.h ../moves.h wgamelist.h defaults.h resource.h wclipbrd.h \ - wedittags.h wsockerr.h woptions.h wsnap.h ../lists.h help.h + wedittags.h wsockerr.h woptions.h wsnap.h ../lists.h help.h $(CC) $(CFLAGS) winboard.c backend.obj: ../backend.c config.h ../common.h ../frontend.h ../backend.h \ @@ -135,9 +142,9 @@ wlayout.obj: wlayout.c config.h ../common.h winboard.h resource.h wsockerr.obj: wsockerr.c wsockerr.h $(CC) $(CFLAGS) wsockerr.c -help.obj: help.c help.h - $(CC) $(CFLAGS) help.c - +help.obj: help.c help.h + $(CC) $(CFLAGS) help.c + wsnap.obj: wsnap.c wsnap.h $(CC) $(CFLAGS) wsnap.c