diff --git a/panda/src/downloader/Sources.pp b/panda/src/downloader/Sources.pp index 266692caa3..1539ad94e0 100644 --- a/panda/src/downloader/Sources.pp +++ b/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 diff --git a/panda/src/downloader/asyncDecompressor.cxx b/panda/src/downloader/asyncDecompressor.cxx index b44a5f86b1..de2ed5c42b 100644 --- a/panda/src/downloader/asyncDecompressor.cxx +++ b/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 @@ -36,7 +30,6 @@ #include #include #include -#endif #include "asyncDecompressor.h" diff --git a/panda/src/downloader/asyncDownloader.cxx b/panda/src/downloader/asyncDownloader.cxx index b6a54de0b4..d8216c63fd 100644 --- a/panda/src/downloader/asyncDownloader.cxx +++ b/panda/src/downloader/asyncDownloader.cxx @@ -15,13 +15,7 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 @@ -31,7 +25,6 @@ #include #include #include -#endif #include "asyncDownloader.h" #include diff --git a/panda/src/downloader/asyncExtractor.cxx b/panda/src/downloader/asyncExtractor.cxx index d2c7efba4d..fc478fe60f 100644 --- a/panda/src/downloader/asyncExtractor.cxx +++ b/panda/src/downloader/asyncExtractor.cxx @@ -15,13 +15,7 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 @@ -29,7 +23,6 @@ #include #include #include -#endif #include "asyncExtractor.h" diff --git a/panda/src/downloader/asyncUtility.cxx b/panda/src/downloader/asyncUtility.cxx index 7cfba5df39..080571d22e 100644 --- a/panda/src/downloader/asyncUtility.cxx +++ b/panda/src/downloader/asyncUtility.cxx @@ -15,19 +15,15 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 + #undef WINDOWS_LEAN_AND_MEAN +#else #include #endif diff --git a/panda/src/downloader/config_downloader.cxx b/panda/src/downloader/config_downloader.cxx index b63c56af4b..15b8fe5946 100644 --- a/panda/src/downloader/config_downloader.cxx +++ b/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 #include - -#if !defined(WIN32_VC) || defined(NO_PCH) #include "config_downloader.h" -#endif Configure(config_downloader); diff --git a/panda/src/downloader/decompressor.cxx b/panda/src/downloader/decompressor.cxx index 65915a1adf..9482925770 100644 --- a/panda/src/downloader/decompressor.cxx +++ b/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 @@ -35,7 +29,6 @@ #include #include -#endif #include "decompressor.h" diff --git a/panda/src/downloader/downloadDb.cxx b/panda/src/downloader/downloadDb.cxx index a857935008..6766b61607 100644 --- a/panda/src/downloader/downloadDb.cxx +++ b/panda/src/downloader/downloadDb.cxx @@ -15,16 +15,8 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 diff --git a/panda/src/downloader/download_utils.cxx b/panda/src/downloader/download_utils.cxx index 8d09b58803..7a528a13d6 100644 --- a/panda/src/downloader/download_utils.cxx +++ b/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 -#endif ulong check_crc(Filename name) { diff --git a/panda/src/downloader/downloader.cxx b/panda/src/downloader/downloader.cxx index f2ed3348dc..836a56dba4 100644 --- a/panda/src/downloader/downloader.cxx +++ b/panda/src/downloader/downloader.cxx @@ -15,13 +15,7 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 @@ -29,7 +23,6 @@ #include #include -#endif #include "downloader.h" diff --git a/panda/src/downloader/downloader_composite1.cxx b/panda/src/downloader/downloader_composite1.cxx new file mode 100644 index 0000000000..daa3f0cac0 --- /dev/null +++ b/panda/src/downloader/downloader_composite1.cxx @@ -0,0 +1,4 @@ +#include "config_downloader.cxx" +#include "asyncUtility.cxx" +#include "extractor.cxx" + diff --git a/panda/src/downloader/downloader_composite2.cxx b/panda/src/downloader/downloader_composite2.cxx new file mode 100644 index 0000000000..fa080f85ba --- /dev/null +++ b/panda/src/downloader/downloader_composite2.cxx @@ -0,0 +1,3 @@ +#include "multiplexStream.cxx" +#include "multiplexStreamBuf.cxx" + diff --git a/panda/src/downloader/downloader_composite3.cxx b/panda/src/downloader/downloader_composite3.cxx new file mode 100644 index 0000000000..4063eedca7 --- /dev/null +++ b/panda/src/downloader/downloader_composite3.cxx @@ -0,0 +1,3 @@ +#include "downloader.cxx" +#include "downloadDb.cxx" + diff --git a/panda/src/downloader/downloader_composite4.cxx b/panda/src/downloader/downloader_composite4.cxx new file mode 100644 index 0000000000..e1e6ed00d8 --- /dev/null +++ b/panda/src/downloader/downloader_composite4.cxx @@ -0,0 +1,4 @@ +#include "download_utils.cxx" +#include "decompressor.cxx" +#include "zcompressor.cxx" + diff --git a/panda/src/downloader/downloader_headers.h b/panda/src/downloader/downloader_headers.h deleted file mode 100644 index e9d2ea0221..0000000000 --- a/panda/src/downloader/downloader_headers.h +++ /dev/null @@ -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 -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// - -#ifdef WIN32_VC -#define WINDOWS_LEAN_AND_MEAN -#include -#undef WINDOWS_LEAN_AND_MEAN -#endif - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "config_downloader.h" -#include "download_utils.h" -#pragma hdrstop - diff --git a/panda/src/downloader/extractor.cxx b/panda/src/downloader/extractor.cxx index 2a59f1ceda..6c484ad9d1 100644 --- a/panda/src/downloader/extractor.cxx +++ b/panda/src/downloader/extractor.cxx @@ -15,21 +15,13 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 #include #include -#endif - #include "extractor.h" //////////////////////////////////////////////////////////////////// diff --git a/panda/src/downloader/multiplexStream.cxx b/panda/src/downloader/multiplexStream.cxx index f2b36c9c34..2e99e5c223 100644 --- a/panda/src/downloader/multiplexStream.cxx +++ b/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" diff --git a/panda/src/downloader/multiplexStreamBuf.cxx b/panda/src/downloader/multiplexStreamBuf.cxx index 058eeae566..690ec8029e 100644 --- a/panda/src/downloader/multiplexStreamBuf.cxx +++ b/panda/src/downloader/multiplexStreamBuf.cxx @@ -16,20 +16,14 @@ // //////////////////////////////////////////////////////////////////// -#if defined(WIN32_VC) && !defined(NO_PCH) -#include "downloader_headers.h" -#endif +#include "multiplexStreamBuf.h" -#pragma hdrstop - -#if defined(WIN32_VC) && defined(NO_PCH) +#if defined(WIN32_VC) #define WINDOWS_LEAN_AND_MEAN #include #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. diff --git a/panda/src/downloader/patcher.cxx b/panda/src/downloader/patcher.cxx index 9cc6b5adf2..5acd356e33 100644 --- a/panda/src/downloader/patcher.cxx +++ b/panda/src/downloader/patcher.cxx @@ -15,18 +15,9 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 -#endif - #include "patcher.h" //////////////////////////////////////////////////////////////////// diff --git a/panda/src/downloader/zcompressor.cxx b/panda/src/downloader/zcompressor.cxx index 746d740fa4..e3d76329cf 100644 --- a/panda/src/downloader/zcompressor.cxx +++ b/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 -#endif - #include "zcompressor.h" ////////////////////////////////////////////////////////////////////