Browse Source

switch precomp hdrs to composite file build

cxgeorge 24 years ago
parent
commit
dfbf81a53e

+ 25 - 14
panda/src/downloader/Sources.pp

@@ -7,22 +7,35 @@
 
 #begin lib_target
   #define TARGET downloader
+  
+  #define COMBINED_SOURCES $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx 
 
-  #define SOURCES                           \
-    config_downloader.cxx                       \
-    config_downloader.h \
-    asyncUtility.I asyncUtility.cxx asyncUtility.h          \
-    extractor.cxx extractor.h   \
-    multiplexStream.I multiplexStream.cxx multiplexStream.h \
-    multiplexStreamBuf.I multiplexStreamBuf.cxx multiplexStreamBuf.h 
+  #define SOURCES \
+    config_downloader.h asyncUtility.I asyncUtility.h \
+    extractor.h  multiplexStream.I multiplexStream.h \
+    multiplexStreamBuf.I multiplexStreamBuf.h 
+    
+  #define INCLUDED_SOURCES                 \
+    config_downloader.cxx asyncUtility.cxx \
+    extractor.cxx multiplexStream.cxx multiplexStreamBuf.cxx
 
   #define IF_NET_SOURCES \
-    downloadDb.I downloadDb.cxx downloadDb.h \
-    downloader.I downloader.cxx downloader.h
+    downloadDb.I downloadDb.h downloader.I downloader.h
+    
+  #define IF_NET_INCLUDED_SOURCES \
+    downloadDb.cxx downloader.cxx 
+    
+  #define IF_NET_COMBINED_SOURCES \ 
+    $[TARGET]_composite4.cxx        
 
-  #define IF_ZLIB_SOURCES                       \
-    decompressor.cxx decompressor.h zcompressor.I zcompressor.cxx   \
-    zcompressor.h download_utils.cxx download_utils.h
+  #define IF_ZLIB_SOURCES \
+    decompressor.h zcompressor.I zcompressor.h download_utils.h
+    
+  #define IF_ZLIB_COMBINED_SOURCES \    
+    $[TARGET]_composite3.cxx    
+    
+  #define IF_ZLIB_INCLUDED_SOURCES \
+    decompressor.cxx zcompressor.cxx download_utils.cxx
 
   #define IF_CRYPTO_SOURCES \
     patcher.cxx                             \
@@ -40,8 +53,6 @@
     patcher.h patcher.I \
     zcompressor.I zcompressor.h
     
-  #define PRECOMPILED_HEADER downloader_headers.h 
-
   #define IGATESCAN all
 
 #end lib_target

+ 0 - 7
panda/src/downloader/asyncDecompressor.cxx

@@ -21,13 +21,7 @@
 ////////////////////////////////////////////////////////////////////
 // Includes
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
-
-#pragma hdrstop
 
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 
 #include <event.h>
@@ -36,7 +30,6 @@
 #include <eventParameter.h>
 #include <filename.h>
 #include <stdio.h>
-#endif
 
 #include "asyncDecompressor.h"
 

+ 0 - 7
panda/src/downloader/asyncDownloader.cxx

@@ -15,13 +15,7 @@
 // [email protected] .
 //
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
-
-#pragma hdrstop
 
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 
 #include <event.h>
@@ -31,7 +25,6 @@
 #include <filename.h>
 #include <errno.h>
 #include <math.h>
-#endif
 
 #include "asyncDownloader.h"
 #include <circBuffer.h>

+ 0 - 7
panda/src/downloader/asyncExtractor.cxx

@@ -15,13 +15,7 @@
 // [email protected] .
 //
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
-
-#pragma hdrstop
 
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 
 #include <event.h>
@@ -29,7 +23,6 @@
 #include <throw_event.h>
 #include <eventParameter.h>
 #include <filename.h>
-#endif
 
 #include "asyncExtractor.h"
 

+ 6 - 10
panda/src/downloader/asyncUtility.cxx

@@ -15,19 +15,15 @@
 // [email protected] .
 //
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
-
-#pragma hdrstop
 
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
-#endif
-
 #include "asyncUtility.h"
-  
-#if !defined(WIN32)
+
+#if defined(WIN32)
+  #define WINDOWS_LEAN_AND_MEAN
+  #include <wtypes.h>
+  #undef WINDOWS_LEAN_AND_MEAN  
+#else
   #include <sys/time.h>
 #endif
 

+ 0 - 9
panda/src/downloader/config_downloader.cxx

@@ -16,18 +16,9 @@
 //
 ////////////////////////////////////////////////////////////////////
 
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
-
-#pragma hdrstop
-
 #include <dconfig.h>
 #include <get_config_path.h>
-
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
-#endif
 
 
 Configure(config_downloader);

+ 0 - 7
panda/src/downloader/decompressor.cxx

@@ -21,13 +21,7 @@
 ////////////////////////////////////////////////////////////////////
 // Includes
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
 
-#pragma hdrstop
-
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 
 #include <stdio.h>
@@ -35,7 +29,6 @@
 
 #include <error_utils.h>
 #include <filename.h>
-#endif
 
 #include "decompressor.h"
 

+ 0 - 8
panda/src/downloader/downloadDb.cxx

@@ -15,16 +15,8 @@
 // [email protected] .
 //
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
 
-#pragma hdrstop
-
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
-#endif
-
 #include "downloadDb.h"
 #include <algorithm>
 

+ 0 - 8
panda/src/downloader/download_utils.cxx

@@ -18,17 +18,9 @@
 
 // This file is compiled only if we have zlib installed.
 
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
-
-#pragma hdrstop
-
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "download_utils.h"
 #include "config_downloader.h"
 #include <zlib.h>
-#endif
 
 ulong
 check_crc(Filename name) {

+ 0 - 7
panda/src/downloader/downloader.cxx

@@ -15,13 +15,7 @@
 // [email protected] .
 //
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
-
-#pragma hdrstop
 
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 
 #include <error_utils.h>
@@ -29,7 +23,6 @@
 
 #include <errno.h>
 #include <math.h>
-#endif
 
 #include "downloader.h"
 

+ 4 - 0
panda/src/downloader/downloader_composite1.cxx

@@ -0,0 +1,4 @@
+#include "config_downloader.cxx"
+#include "asyncUtility.cxx"
+#include "extractor.cxx"
+

+ 3 - 0
panda/src/downloader/downloader_composite2.cxx

@@ -0,0 +1,3 @@
+#include "multiplexStream.cxx"
+#include "multiplexStreamBuf.cxx"
+

+ 3 - 0
panda/src/downloader/downloader_composite3.cxx

@@ -0,0 +1,3 @@
+#include "downloader.cxx"
+#include "downloadDb.cxx"
+

+ 4 - 0
panda/src/downloader/downloader_composite4.cxx

@@ -0,0 +1,4 @@
+#include "download_utils.cxx"
+#include "decompressor.cxx"
+#include "zcompressor.cxx"
+

+ 0 - 40
panda/src/downloader/downloader_headers.h

@@ -1,40 +0,0 @@
-// Filename: downloader_headers.h
-// Created by:  georges (30May01)
-//
-////////////////////////////////////////////////////////////////////
-//
-// PANDA 3D SOFTWARE
-// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
-//
-// All use of this software is subject to the terms of the Panda 3d
-// Software license.  You should have received a copy of this license
-// along with this source code; you will also find a current copy of
-// the license at http://www.panda3d.org/license.txt .
-//
-// To contact the maintainers of this program write to
-// [email protected] .
-//
-////////////////////////////////////////////////////////////////////
-
-#ifdef WIN32_VC
-#define WINDOWS_LEAN_AND_MEAN
-#include <windows.h>
-#undef WINDOWS_LEAN_AND_MEAN
-#endif
-
-#include <errno.h>
-#include <error_utils.h>
-#include <math.h>
-#include <stdio.h>
-#include <zlib.h>
-
-#include <filename.h>
-#include <event.h>
-#include <pt_Event.h>
-#include <eventParameter.h>
-#include <throw_event.h>
-
-#include "config_downloader.h"
-#include "download_utils.h"
-#pragma hdrstop
-

+ 0 - 8
panda/src/downloader/extractor.cxx

@@ -15,21 +15,13 @@
 // [email protected] .
 //
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
 
-#pragma hdrstop
-
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 
 #include <filename.h>
 #include <error_utils.h>
 
 #include <errno.h>
-#endif
-
 #include "extractor.h"
 
 ////////////////////////////////////////////////////////////////////

+ 0 - 6
panda/src/downloader/multiplexStream.cxx

@@ -16,11 +16,5 @@
 //
 ////////////////////////////////////////////////////////////////////
 
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
-
-#pragma hdrstop
-
 #include "multiplexStream.h"
 

+ 2 - 8
panda/src/downloader/multiplexStreamBuf.cxx

@@ -16,20 +16,14 @@
 //
 ////////////////////////////////////////////////////////////////////
 
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
-
-#pragma hdrstop
+#include "multiplexStreamBuf.h"
 
-#if defined(WIN32_VC) && defined(NO_PCH)
+#if defined(WIN32_VC)
 #define WINDOWS_LEAN_AND_MEAN
 #include <windows.h>
 #undef WINDOWS_LEAN_AND_MEAN
 #endif
 
-#include "multiplexStreamBuf.h"
-
 // We use real assert() instead of nassert(), because we're likely
 // to be invoked directly by notify here, and we don't want to
 // risk infinite recursion.

+ 0 - 9
panda/src/downloader/patcher.cxx

@@ -15,18 +15,9 @@
 // [email protected] .
 //
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
 
-#pragma hdrstop
-
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
-
 #include <filename.h>
-#endif
-
 #include "patcher.h"
 
 ////////////////////////////////////////////////////////////////////

+ 0 - 8
panda/src/downloader/zcompressor.cxx

@@ -21,17 +21,9 @@
 ////////////////////////////////////////////////////////////////////
 // Includes
 ////////////////////////////////////////////////////////////////////
-#if defined(WIN32_VC) && !defined(NO_PCH)
-#include "downloader_headers.h"
-#endif
 
-#pragma hdrstop
-
-#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include <zlib.h>
-#endif
-
 #include "zcompressor.h"
 
 ////////////////////////////////////////////////////////////////////