Clean up Carbon build procedures somewhat. I still don't have anything that
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Fri, 7 Feb 2003 01:33:24 +0000 (01:33 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Fri, 7 Feb 2003 01:33:24 +0000 (01:33 +0000)
actually works, but I think I'm getting closer.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2810 cda61777-01e9-0310-a592-d414129be87e

mac/README.mac
mac/mac.c
mkfiles.pl

index 0d4ae5f..fbe34cf 100644 (file)
@@ -1,4 +1,4 @@
-$Id: README.mac,v 1.24 2003/02/02 16:02:50 ben Exp $
+$Id: README.mac,v 1.25 2003/02/07 01:33:24 ben Exp $
 
 Information about PuTTY for the Mac OS
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -12,19 +12,27 @@ Compiling it:
  MPW
   <ftp://ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./
    MPW-GM_Images/MPW-GM.img.bin>
+  Install this in the usual way.
 
- Universal Headers (optional)
+ Universal Headers
   <ftp://ftp.apple.com/developer/Development_Kits/
    UniversalHeaders3.4.2.img.bin>
+  Install using the script in "Documentation:MPW Users - ReadMe".
 
  Text Encoding Converter SDK
   <ftp://ftp.apple.com/developer/Development_Kits/TEC_1.5.sit.hqx>
-
- Install MPW, install the new Universal Headers (optional), then put
- the contents of the "68K Static Libraries" directory of the Text
- Encoding Converter SDK into "Interfaces&Libraries:Libraries:Libraries",
- and the contents of the "Stub Libraries" directory into
- "Interfaces&Libraries:Libraries:SharedLibraries".
+  Copy contents of "68K Static Libraries" to
+   "Interfaces&Libraries:Libraries:Libraries".
+  Copy contents of "Stub Libraries" to
+   "Interfaces&Libraries:Libraries:SharedLibraries".
+
+ CarbonStdCLib.o
+  <ftp://ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/
+   MPW_Website_Downloads/CarbonStdCLib.o-3.8d3.hqx>
+  Copy contents of "CIncludes" to
+   "Interfaces&Libraries:Interfaces:CIncludes".
+  Copy contents of "PPCLibraries" to
+   "Interfaces&Libraries:Libraries:PPCLibraries".
 
  The "mkputty.mpw" script does all the work, and currently producess a
  Classic 68K build of PuTTY called "PuTTY.68k", a non-Carbon PowerPC
index 2c4794d..4c317ed 100644 (file)
--- a/mac/mac.c
+++ b/mac/mac.c
@@ -1,4 +1,4 @@
-/* $Id: mac.c,v 1.45 2003/02/04 23:39:26 ben Exp $ */
+/* $Id: mac.c,v 1.46 2003/02/07 01:33:24 ben Exp $ */
 /*
  * Copyright (c) 1999 Ben Harris
  * All rights reserved.
 #include "ssh.h"
 #include "mac.h"
 
-#if !TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
+/*
+ * This is used by (I think) CarbonStdCLib, but only exists in
+ * CarbonLib 1.1 and later.  Muppets.  Happily, it's documented to be
+ * a synonym for NULL.
+ */
+#include <CFBase.h>
+const CFAllocatorRef kCFAllocatorDefault = NULL;
+#else
 QDGlobals qd;
 #endif
 
index 2ac8e16..626141b 100755 (executable)
@@ -617,7 +617,7 @@ LinkOptions = -c 'pTTY' -fragname PuTTY
 LinkOptions_68K = {LinkOptions} -br 68k -model far -compact
 LinkOptions_CFM68K = {LinkOptions} -br 020 -model cfmseg -compact
 LinkOptions_PPC = {LinkOptions}
-LinkOptions_Carbon = {LinkOptions}
+LinkOptions_Carbon = -m __appstart -w {LinkOptions}
 
 Libs_68K =     "{CLibraries}StdCLib.far.o" \xb6
                "{Libraries}MacRuntime.o" \xb6
@@ -660,7 +660,11 @@ Libs_PPC = {Libs_CFM} \xb6
                "{PPCLibraries}OpenTransportAppPPC.o" \xb6
                "{PPCLibraries}OpenTptInetPPC.o"
 
-Libs_Carbon =  "{SharedLibraries}CarbonLib"
+Libs_Carbon =  "{PPCLibraries}CarbonStdCLib.o" \xb6
+               "{PPCLibraries}StdCRuntime.o" \xb6
+               "{PPCLibraries}PPCCRuntime.o" \xb6
+               "{SharedLibraries}CarbonLib" \xb6
+               "{SharedLibraries}StdCLib"
 
 END
 print &splitline("all \xc4 " . join(" ", &progrealnames("M")), undef, "\xb6");