--- brandy-1.20~pre5.orig/makefile
+++ brandy-1.20~pre5/makefile
@@ -3,7 +3,7 @@
 CC = gcc
 LD = gcc
 
-CFLAGS += -g -DDEBUG -I/usr/include/SDL
+CFLAGS += -g -I/usr/include/SDL
 CFLAGS2 = -O2 -I/usr/include/SDL
 
 LDFLAGS =
@@ -244,7 +244,7 @@
 	strip brandy
 
 check:
-	$(CC) $(CFLAGS) -Wall -O2 $(SRC) $(LIBS) -o brandy
+	$(CC) $(CFLAGS) -Wall $(SRC) $(LIBS) -o brandy
 
 clean:
 	rm -f $(SRCDIR)/*.o brandy
--- brandy-1.20~pre5.orig/src/keyboard.c
+++ brandy-1.20~pre5/src/keyboard.c
@@ -162,7 +162,7 @@
 #if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
  | defined(TARGET_DJGPP) | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD)\
  | defined(TARGET_AMIGA) & defined(__GNUC__)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
 #include <sys/time.h>
 #include <sys/types.h>
 #include <errno.h>
@@ -286,6 +286,8 @@
 #define OSVERSION 0xF5
 #elif defined(TARGET_GNUKFREEBSD)
 #define OSVERSION 0xF4
+#elif defined(TARGET_GNU)
+#define OSVERSION 0xF3
 #else
 #error Target operating system is either not defined or not supported
 #endif
@@ -333,7 +335,7 @@
 
 #if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
  | defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) & defined(__GNUC__)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
 
 static struct termios origtty;	/* Copy of original keyboard parameters */
 static int32 keyboard;		/* File descriptor for keyboard */
@@ -410,7 +412,7 @@
 
 #if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
  | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) & defined(__GNUC__)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
 
 /* ----- Linux-, *BSD- and MACOS-specific keyboard input functions ----- */
 
@@ -1502,7 +1504,7 @@
 
 #elif defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
  | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) & defined(__GNUC__)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
 
 /*
 ** 'init_keyboard' initialises the keyboard code. It checks to
--- brandy-1.20~pre5.orig/src/target.h
+++ brandy-1.20~pre5/src/target.h
@@ -89,6 +89,12 @@
 #define BRANDY_OS "GNU/kFreeBSD"
 #endif
 
+#if (defined __GNU__)
+#define TARGET_GNU
+#define USE_SDL
+#define BRANDY_OS "GNU/Hurd"
+#endif
+
 #ifdef DJGPP
 #define TARGET_DJGPP
 #define BRANDY_OS "DJGPP"
@@ -163,7 +169,7 @@
 #define EDITOR_VARIABLE "EDITOR"
 #define DEFAULT_EDITOR "edit"
 #elif defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_FREEBSD)\
- | defined(TARGET_OPENBSD) | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_OPENBSD) | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
 #define EDITOR_VARIABLE "EDITOR"
 #define DEFAULT_EDITOR "vi"
 #elif defined(TARGET_MACOSX)
@@ -189,7 +195,7 @@
 #define DIR_SEPS "\\/:"
 #define DIR_SEP '\\'
 #elif defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
- | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
 #define DIR_SEPS "/"
 #define DIR_SEP '/'
 #elif defined(TARGET_RISCOS)
@@ -206,7 +212,7 @@
 #define MACTYPE 0x600
 #elif defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
  | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
 #define MACTYPE 0x800
 #elif defined(TARGET_DJGPP) | defined(TARGET_WIN32) | defined(TARGET_BCC32)
 #define MACTYPE 0x2000
