Browse Source

add Cygwin platform

David Rose 23 years ago
parent
commit
96aa6712a3
3 changed files with 17 additions and 6 deletions
  1. 9 0
      dtool/Config.Cygwin.pp
  2. 4 2
      dtool/Config.pp
  3. 4 4
      dtool/pptempl/System.pp

+ 9 - 0
dtool/Config.Cygwin.pp

@@ -0,0 +1,9 @@
+//
+// Config.Cygwin.pp
+//
+// This file defines some custom config variables for the Windows
+// platform, when ppremake has been compiled using Cygwin.  It
+// inherits most of its parameters from Config.Win32.pp.
+//
+
+#include $[THISDIRPREFIX]Config.Win32.pp

+ 4 - 2
dtool/Config.pp

@@ -66,8 +66,10 @@
 //              not taking advantage of distributed make, because of
 //              the overhead associated with Cygwin fork() calls.
 
-#if $[eq $[PLATFORM],Win32]
+#if $[eq $[PLATFORM], Win32]
   #define BUILD_TYPE gmsvc
+#elif $[eq $[PLATFORM], Cygwin]
+  #define BUILD_TYPE msvc
 #else
   #define BUILD_TYPE unix
 #endif
@@ -401,7 +403,7 @@
 
 #if $[eq $[PLATFORM], Win32]
 #if $[eq $[USE_COMPILER],]
-  #define USE_COMPILER MSVC
+  #define USE_COMPILER MSVC7
 #endif    
 #elif $[eq $[PLATFORM], Irix]
   #define USE_COMPILER MIPS

+ 4 - 4
dtool/pptempl/System.pp

@@ -41,8 +41,8 @@
 // PLATFORM variable, and help it to control the effects of functions
 // like $[os] and $[isfullpath].
 
-// True if we are building on some flavor of Unix.
-#define UNIX_PLATFORM $[ne $[PLATFORM],Win32]
-
 // True if we are building on some flavor of Windows.
-#define WINDOWS_PLATFORM $[eq $[PLATFORM],Win32]
+#define WINDOWS_PLATFORM $[or $[eq $[PLATFORM],Win32]$[eq $[PLATFORM],Cygwin]]
+
+// True if we are building on some flavor of Unix.
+#define UNIX_PLATFORM $[not $[WINDOWS_PLATFORM]]