Browse Source

prepare for Cygwin ppremake

David Rose 23 years ago
parent
commit
efee3f595b
3 changed files with 23 additions and 14 deletions
  1. 19 11
      dtool/Config.pp
  2. 2 1
      dtool/Sources.pp
  3. 2 2
      dtool/pptempl/Global.pp

+ 19 - 11
dtool/Config.pp

@@ -255,9 +255,15 @@
 
 
 // Is OpenGL installed, and where?  This should include libGL as well
 // Is OpenGL installed, and where?  This should include libGL as well
 // as libGLU, if they are in different places.
 // as libGLU, if they are in different places.
-#defer GL_IPATH
-#defer GL_LPATH /usr/X11R6/lib
-#defer GL_LIBS GL GLU
+#if $[WINDOWS_PLATFORM]
+  #defer GL_IPATH
+  #defer GL_LPATH
+  #define GL_LIBS opengl32.lib glu32.lib 
+#else
+  #defer GL_IPATH
+  #defer GL_LPATH /usr/X11R6/lib
+  #defer GL_LIBS GL GLU
+#endif
 #defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]]
 #defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]]
 
 
 // Is Chromium OpenGL installed, and where?  This should include libcr_opengl32.
 // Is Chromium OpenGL installed, and where?  This should include libcr_opengl32.
@@ -283,16 +289,18 @@
 #define HAVE_GLUT
 #define HAVE_GLUT
 
 
 // Should we try to build the WGL interface?
 // Should we try to build the WGL interface?
-#define HAVE_WGL $[WINDOWS_PLATFORM]
+#defer HAVE_WGL $[and $[HAVE_GL],$[WINDOWS_PLATFORM]]
 
 
 // Should we try to build the SGI-specific glxdisplay?
 // Should we try to build the SGI-specific glxdisplay?
 #define HAVE_SGIGL $[eq $[PLATFORM],Irix]
 #define HAVE_SGIGL $[eq $[PLATFORM],Irix]
 
 
 // Is DirectX available, and should we try to build with it?
 // Is DirectX available, and should we try to build with it?
-#define DX_IPATH
-#define DX_LPATH
-#define DX_LIBS
-#defer HAVE_DX $[libtest $[DX_LPATH],$[DX_LIBS]]
+#if $[WINDOWS_PLATFORM]
+  #define DX_IPATH
+  #define DX_LPATH
+  #define DX_LIBS ddraw.lib dxguid.lib
+  #defer HAVE_DX $[libtest $[DX_LPATH],$[DX_LIBS]]
+#endif
 
 
 // Do you want to build the Renderman interface?
 // Do you want to build the Renderman interface?
 #define HAVE_RIB
 #define HAVE_RIB
@@ -404,9 +412,9 @@
 //    INTEL  (Intel C/C++ compiler)
 //    INTEL  (Intel C/C++ compiler)
 
 
 #if $[WINDOWS_PLATFORM]
 #if $[WINDOWS_PLATFORM]
-#if $[eq $[USE_COMPILER],]
-  #define USE_COMPILER MSVC7
-#endif    
+  #if $[eq $[USE_COMPILER],]
+    #define USE_COMPILER MSVC7
+  #endif    
 #elif $[eq $[PLATFORM], Irix]
 #elif $[eq $[PLATFORM], Irix]
   #define USE_COMPILER MIPS
   #define USE_COMPILER MIPS
 #elif $[eq $[PLATFORM], Linux]
 #elif $[eq $[PLATFORM], Linux]

+ 2 - 1
dtool/Sources.pp

@@ -7,4 +7,5 @@
 #define SAMPLE_SOURCE_FILE src/dtoolbase/dtoolbase.cxx
 #define SAMPLE_SOURCE_FILE src/dtoolbase/dtoolbase.cxx
 
 
 #define EXTRA_DIST \
 #define EXTRA_DIST \
-    Config.Irix.pp Config.Linux.pp Config.Win32.pp LocalSetup.pp Package.pp
+    Config.Irix.pp Config.Linux.pp Config.Win32.pp Config.Cygwin.pp \
+    LocalSetup.pp Package.pp

+ 2 - 2
dtool/pptempl/Global.pp

@@ -49,7 +49,7 @@
 // it's easy to make them so (e.g. on Unix platforms), and static on
 // it's easy to make them so (e.g. on Unix platforms), and static on
 // platforms where dynamic libraries aren't quite so robust (e.g. on
 // platforms where dynamic libraries aren't quite so robust (e.g. on
 // Windows).
 // Windows).
-#if $[eq $[PLATFORM],Win32]
+#if $[WINDOWS_PLATFORM]
   #map static_libs TARGET(*/static_lib_target */ss_lib_target)
   #map static_libs TARGET(*/static_lib_target */ss_lib_target)
   #map dynamic_libs TARGET(*/lib_target */noinst_lib_target */metalib_target)
   #map dynamic_libs TARGET(*/lib_target */noinst_lib_target */metalib_target)
 #else
 #else
@@ -547,7 +547,7 @@
 #defun get_lpath
 #defun get_lpath
   #define alt_lpath $[stl_lpath] $[nspr_lpath] $[python_lpath]
   #define alt_lpath $[stl_lpath] $[nspr_lpath] $[python_lpath]
   
   
-  #if $[eq $[PLATFORM],Win32]  
+  #if $[WINDOWS_PLATFORM]  
     #set alt_lpath $[WIN32_PLATFORMSDK_LIBPATH] $[alt_lpath] 
     #set alt_lpath $[WIN32_PLATFORMSDK_LIBPATH] $[alt_lpath] 
   #endif  
   #endif  
   #if $[ne $[USE_CRYPTO] $[components $[USE_CRYPTO],$[active_component_libs] $[transitive_link]],]
   #if $[ne $[USE_CRYPTO] $[components $[USE_CRYPTO],$[active_component_libs] $[transitive_link]],]