diff -ru crafty-19.3-orig/Makefile crafty-19.3/Makefile
--- crafty-19.3-orig/Makefile	Fri Mar 28 23:07:32 2003
+++ crafty-19.3/Makefile	Sat Mar 29 01:33:36 2003
@@ -16,6 +16,7 @@
 #     NT_i386    {80X86 architecture running Windows 95 or NT}
 #     NT_AXP     {DEC Alpha running Windows NT}
 #     DOS        {PC running dos/windows, using DJGPP port of gcc to compile}
+#     MACOSX     (MacOS X)
 #     NEXT       {NextStep}
 #     OS/2       {IBM OS/2 warp}
 #     SGI        {SGI Workstation running Irix (SYSV/R4) Unix}
@@ -302,6 +303,20 @@
 		LDFLAGS='$(LDFLAGS) $(CFLAGS)' \
 		LIBS='-lpthread' \
 		opt='$(opt) -DSMP -DCPUS=8 -DFAST -DPOSIX -DNOBUILTINS' \
+		crafty-make
+
+
+macosx:
+	$(MAKE) target=NetBSD \
+		CC=cc CXX=c++ \
+		CFLAGS='$(CFLAGS) -D_REENTRANT -g -O3 -Wall \
+			-fomit-frame-pointer -funroll-all-loops \
+			-finline-functions -ffast-math' \
+		CXFLAGS='$(CFLAGS) -fno-exceptions' \
+		LDFLAGS='$(LDFLAGS)' \
+		opt='$(opt) -DFAST \
+		     -DBOOKDIR=\"$(prefix)/lib/crafty\" \
+		     -DTBDIR=\"$(prefix)/lib/crafty/TB\"' \
 		crafty-make
 
 netbsd:
Only in crafty-19.3: Makefile~
diff -ru crafty-19.3-orig/chess.h crafty-19.3/chess.h
--- crafty-19.3-orig/chess.h	Fri Mar 28 23:07:32 2003
+++ crafty-19.3/chess.h	Fri Mar 28 23:15:05 2003
@@ -193,6 +193,9 @@
 #  if !defined(BOOKDIR)
 #    define     BOOKDIR        "."
 #  endif
+#  if !defined(LEARNDIR)
+#    define     LEARNDIR        "."
+#  endif
 #  if !defined(LOGDIR)
 #    define      LOGDIR        "."
 #  endif
Only in crafty-19.3: chess.h~
diff -ru crafty-19.3-orig/data.c crafty-19.3/data.c
--- crafty-19.3-orig/data.c	Fri Mar 28 23:07:32 2003
+++ crafty-19.3/data.c	Fri Mar 28 23:15:05 2003
@@ -341,6 +341,7 @@
   int       new_game =                              0;
   char      channel_title[32] =                  {""};
   char      book_path[128] =                {BOOKDIR};
+  char      learn_path[128] =                {LEARNDIR};
   char      log_path[128] =                  {LOGDIR};
   char      tb_path[128] =                    {TBDIR};
   char      rc_path[128] =                    {RCDIR};
Only in crafty-19.3: data.c~
diff -ru crafty-19.3-orig/data.h crafty-19.3/data.h
--- crafty-19.3-orig/data.h	Fri Mar 28 23:07:32 2003
+++ crafty-19.3/data.h	Fri Mar 28 23:15:05 2003
@@ -104,6 +104,7 @@
   extern int            channel;
   extern char           channel_title[32];
   extern char           book_path[128];
+  extern char           learn_path[128];
   extern char           log_path[128];
   extern char           tb_path[128];
   extern char           rc_path[128];
Only in crafty-19.3: data.h~
diff -ru crafty-19.3-orig/init.c crafty-19.3/init.c
--- crafty-19.3-orig/init.c	Fri Mar 28 23:07:32 2003
+++ crafty-19.3/init.c	Fri Mar 28 23:15:05 2003
@@ -229,25 +229,25 @@
     }
   }
 #if defined(MACOS)
-  sprintf(log_filename,":%s:book.lrn",book_path);
+  sprintf(log_filename,":%s:book.lrn",learn_path);
 #else
-  sprintf(log_filename,"%s/book.lrn",book_path);
+  sprintf(log_filename,"%s/book.lrn",learn_path);
 #endif
   book_lrn_file=fopen(log_filename,"a");
   if (!book_lrn_file) {
 #if defined(MACOS)
-    printf("unable to open book learning file [:%s:book.lrn].\n",book_path);
+    printf("unable to open book learning file [:%s:book.lrn].\n",learn_path);
 #else
-    printf("unable to open book learning file [%s/book.lrn].\n",book_path);
+    printf("unable to open book learning file [%s/book.lrn].\n",learn_path);
 #endif
     printf("learning disabled.\n");
     learning&=~(book_learning+result_learning);
   }
   if (learning&position_learning) {
 #if defined(MACOS)
-    sprintf(log_filename,":%s:position.bin",book_path);
+    sprintf(log_filename,":%s:position.bin",learn_path);
 #else
-    sprintf(log_filename,"%s/position.bin",book_path);
+    sprintf(log_filename,"%s/position.bin",learn_path);
 #endif
     position_file=fopen(log_filename,"rb+");
     if (position_file) {
@@ -267,18 +267,18 @@
       }
       else {
 #if defined(MACOS)
-        printf("unable to open position learning file [:%s:position.bin].\n",book_path);
+        printf("unable to open position learning file [:%s:position.bin].\n",learn_path);
 #else
-        printf("unable to open position learning file [%s/position.bin].\n",book_path);
+        printf("unable to open position learning file [%s/position.bin].\n",learn_path);
 #endif
         printf("learning disabled.\n");
         learning&=~position_learning;
       }
     }
 #if defined(MACOS)
-    sprintf(log_filename,":%s:position.lrn",book_path);
+    sprintf(log_filename,":%s:position.lrn",learn_path);
 #else
-    sprintf(log_filename,"%s/position.lrn",book_path);
+    sprintf(log_filename,"%s/position.lrn",learn_path);
 #endif
     position_lrn_file=fopen(log_filename,"r");
     if (!position_lrn_file) {
diff -ru crafty-19.3-orig/learn.c crafty-19.3/learn.c
--- crafty-19.3-orig/learn.c	Fri Mar 28 23:07:32 2003
+++ crafty-19.3/learn.c	Fri Mar 28 23:15:05 2003
@@ -518,9 +518,9 @@
 #endif
     fclose(book_lrn_file);
 #if defined(MACOS)
-    sprintf(text,":%s:book.lrn",book_path);
+    sprintf(text,":%s:book.lrn",learn_path);
 #else
-    sprintf(text,"%s/book.lrn",book_path);
+    sprintf(text,"%s/book.lrn",learn_path);
 #endif
     book_lrn_file=fopen(text,"w");
     fseek(book_file,0,SEEK_SET);
@@ -834,26 +834,26 @@
   if (nargs>1 && !strcmp(args[1],"clear")) {
     fclose(position_file);
 #if defined(MACOS)
-    sprintf(text,":%s:position.lrn",book_path);
+    sprintf(text,":%s:position.lrn",learn_path);
 #else
-    sprintf(text,"%s/position.lrn",book_path);
+    sprintf(text,"%s/position.lrn",learn_path);
 #endif
     position_lrn_file=fopen(text,"w");
     if (!position_lrn_file) {
 #if defined(MACOS)
       printf("unable to open position learning file [:%s:position.lrn].\n",
-             book_path);
+             learn_path);
 #else
       printf("unable to open position learning file [%s/position.lrn].\n",
-             book_path);
+             learn_path);
 #endif
       return;
     }
     fprintf(position_lrn_file,"position\n");
 #if defined(MACOS)
-    sprintf(text,":%s:position.bin",book_path);
+    sprintf(text,":%s:position.bin",learn_path);
 #else
-    sprintf(text,"%s/position.bin",book_path);
+    sprintf(text,"%s/position.bin",learn_path);
 #endif
     position_file=fopen(text,"wb+");
     if (position_file) {
@@ -866,10 +866,10 @@
     else {
 #if defined(MACOS)
       printf("unable to open position learning file [:%s:position.bin].\n",
-             book_path);
+             learn_path);
 #else
       printf("unable to open position learning file [%s/position.bin].\n",
-             book_path);
+             learn_path);
 #endif
       return;
     }
diff -ru crafty-19.3-orig/main.c crafty-19.3/main.c
--- crafty-19.3-orig/main.c	Fri Mar 28 23:07:32 2003
+++ crafty-19.3/main.c	Fri Mar 28 23:15:05 2003
@@ -2959,6 +2959,9 @@
   char *directory_spec=getenv("CRAFTY_BOOK_PATH");
   if (directory_spec)
     strncpy (book_path, directory_spec, sizeof book_path);
+  directory_spec=getenv("CRAFTY_LEARN_PATH");
+  if (directory_spec)
+    strncpy (learn_path, directory_spec, sizeof learn_path);
   directory_spec=getenv("CRAFTY_LOG_PATH");
   if (directory_spec)
     strncpy (log_path, directory_spec, sizeof log_path);
Only in crafty-19.3: main.c~
diff -ru crafty-19.3-orig/option.c crafty-19.3/option.c
--- crafty-19.3-orig/option.c	Fri Mar 28 23:07:32 2003
+++ crafty-19.3/option.c	Fri Mar 28 23:15:05 2003
@@ -2647,6 +2647,7 @@
     }
     if (!strchr(args[1],'(')) {
       if (strstr(args[0],"bookpath")) strcpy(book_path,args[1]);
+      else if (strstr(args[0],"learnpath")) strcpy(learn_path,args[1]);
       else if (strstr(args[0],"logpath")) strcpy(log_path,args[1]);
       else if (strstr(args[0],"tbpath")) {
         strcpy(tb_path,args[1]);
Only in crafty-19.3: option.c~
