From: H.G.Muller Date: Wed, 6 Jul 2022 08:40:12 +0000 (+0200) Subject: Adapt WinBoard makefile.gcc for NVDA use X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=6b42fa839bf9974116ae40639e33c275e2766688;p=xboard.git Adapt WinBoard makefile.gcc for NVDA use To interface with the screen reader it needs an include file and a library. --- diff --git a/winboard/jaws.c b/winboard/jaws.c index 502b10f..3757fbc 100644 --- a/winboard/jaws.c +++ b/winboard/jaws.c @@ -242,7 +242,9 @@ AdaptMenu() #ifdef NVDA -# include "nvdaController.h" +# define S2(X) #X +# define STRINGIFY(X) S2(X) +# include STRINGIFY(NVDA/nvdaController.h) void SayNVDA(char *text, BOOL interrupt) diff --git a/winboard/makefile.gcc b/winboard/makefile.gcc index 92c2a6d..3565b8a 100644 --- a/winboard/makefile.gcc +++ b/winboard/makefile.gcc @@ -18,8 +18,9 @@ compile = @echo "$1"; $(CC) $(CFLAGS) $1 USE_DEBUG=0 -# JAWS support? +# JAWS support? (Set to 2 for NVDA support!) JAWS=0 +NVDADIR = . # set this to 1 unless you don't mind linking with cygwin1.dll @@ -40,6 +41,9 @@ DEFS = -D_WIN32_IE=0x0300 -DWIN32 ifeq ($(JAWS),1) DEFS += -DJAWS endif +ifeq ($(JAWS),2) + DEFS += -DJAWS -DNVDA=$(NVDADIR) +endif WARN = -Wall -Wno-char-subscripts -Wno-parentheses ARCH = ifeq ($(USE_DEBUG),0) @@ -51,6 +55,9 @@ endif CF = -c $(WARN) -pipe $(CFDEBUG) $(DEFS) -I. -I.. CFLAGS = $(CF) $(ARCH) $(OPTS) $(CFCYG) LFLAGS = $(LFCYG) $(CFDEBUG) -fpic -s -mwindows -lwsock32 -lwinmm -lcomctl32 -lmsimg32 +ifeq ($(JAWS),2) + LFLAGS += $(NVDADIR)/nvdaControllerClient32.lib +endif all: $(PROJ).exe @@ -77,7 +84,7 @@ $(PROJ).exe: $(OBJS) $(PROJ).hlp winboard.o: winboard.c config.h winboard.h ../common.h ../frontend.h ../backend.h \ ../moves.h defaults.h resource.h wclipbrd.h \ - wsockerr.h woptions.h wsnap.h ../lists.h help.h ../args.h + wsockerr.h woptions.h wsnap.h ../lists.h help.h ../args.h jaws.c $(call compile, $<) backend.o: ../backend.c config.h ../common.h ../frontend.h ../backend.h \