Browse Source

towards a 64-bit mac build

David Rose 16 years ago
parent
commit
691947449c
2 changed files with 11 additions and 5 deletions
  1. 3 1
      dtool/Config.OSX.pp
  2. 8 4
      dtool/src/dtoolbase/dtool_platform.h

+ 3 - 1
dtool/Config.OSX.pp

@@ -138,7 +138,9 @@
 #define HAVE_GL 1
 #define HAVE_GL 1
 
 
 // What additional flags should we pass to interrogate?
 // What additional flags should we pass to interrogate?
-#define SYSTEM_IGATE_FLAGS -D__FLT_EVAL_METHOD__=0  -D__i386__ -D__const=const -Dvolatile -Dmutable -D__LITTLE_ENDIAN__ -D__inline__=inline -D__GNUC__
+#define BASE_IGATE_FLAGS -D__FLT_EVAL_METHOD__=0  -D__const=const -Dvolatile -Dmutable -D__LITTLE_ENDIAN__ -D__inline__=inline -D__GNUC__
+#define IGATE_ARCH -D__i386__
+#defer SYSTEM_IGATE_FLAGS $[BASE_IGATE_FLAGS] $[IGATE_ARCH]
 
 
 // We don't need worry about defining WORDS_BIGENDIAN (and we
 // We don't need worry about defining WORDS_BIGENDIAN (and we
 // shouldn't anyway, since ppc and intel are different).  We rely on
 // shouldn't anyway, since ppc and intel are different).  We rely on

+ 8 - 4
dtool/src/dtoolbase/dtool_platform.h

@@ -36,14 +36,16 @@
 #define DTOOL_PLATFORM "iphone"
 #define DTOOL_PLATFORM "iphone"
 #elif defined(__ppc__)
 #elif defined(__ppc__)
 #define DTOOL_PLATFORM "osx_ppc"
 #define DTOOL_PLATFORM "osx_ppc"
-#else
+#elif defined(__i386__)
 #define DTOOL_PLATFORM "osx_i386"
 #define DTOOL_PLATFORM "osx_i386"
+#elif defined(__x86_64)
+#define DTOOL_PLATFORM "osx_amd64"
 #endif
 #endif
 
 
 #elif defined(__FreeBSD__)
 #elif defined(__FreeBSD__)
 #if defined(__x86_64)
 #if defined(__x86_64)
 #define DTOOL_PLATFORM "freebsd_amd64"
 #define DTOOL_PLATFORM "freebsd_amd64"
-#else
+#elif defined(__i386__)
 #define DTOOL_PLATFORM "freebsd_i386"
 #define DTOOL_PLATFORM "freebsd_i386"
 #endif
 #endif
 
 
@@ -58,11 +60,13 @@
 
 
 #elif defined(__ppc__)
 #elif defined(__ppc__)
 #define DTOOL_PLATFORM "linux_ppc"
 #define DTOOL_PLATFORM "linux_ppc"
+#endif
 
 
-#else
+#ifndef DTOOL_PLATFORM
 #error "Can't determine platform; please define DTOOL_PLATFORM in Config.pp file."
 #error "Can't determine platform; please define DTOOL_PLATFORM in Config.pp file."
-
 #endif
 #endif
 
 
+
+
 #endif
 #endif