From 64287153042961f7bd986b93950c881ccdc43199 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Tue, 16 Apr 2002 15:21:24 +0000 Subject: [PATCH] Added makedirdefs via a request from Bob Kheune. This allows us to edit the DIRS cruft in a single file in the Make directory instead of having to edit multiple files. Also edited Makefiles that needed to include this file. Also cleaned up txp loader to compile with SunOS. This needs to be retested on other platforms. --- Make/makedirdefs | 81 +++++++++++++++++++++++++++++++ Makefile | 3 +- src/Demos/Makefile | 20 +------- src/Makefile | 10 +--- src/osgPlugins/Makefile | 32 +----------- src/osgPlugins/txp/trpage_read.h | 2 +- src/osgPlugins/txp/trpage_scene.h | 2 +- src/osgPlugins/txp/trpage_sys.h | 5 -- src/osgPlugins/txp/trpage_write.h | 7 +-- 9 files changed, 95 insertions(+), 67 deletions(-) create mode 100644 Make/makedirdefs diff --git a/Make/makedirdefs b/Make/makedirdefs new file mode 100644 index 000000000..435cf9856 --- /dev/null +++ b/Make/makedirdefs @@ -0,0 +1,81 @@ + +################################################################ +# Directories traversed from the top level +TOP_LEVEL_DIRS = src + + +################################################################ +# Directories traversed in the TOPDIR/src directory +SRC_DIRS = \ + osg\ + osgUtil\ + osgDB\ + osgGLUT\ + osgPlugins\ + osgText\ + Demos + + +################################################################ +# Directories traversed in the TOPDIR/src/osgPlugins directory + +PLUGIN_DIRS = \ + osg\ + rgb\ + lib3ds\ + flt\ + obj\ + lwo\ + txp\ + dw\ + bmp\ + pic\ + tga\ + osgtgz\ + tgz\ + zip + +# comment in if you have Performer installed. +# PLUGIN_DIRS += pfb + +# comment in if you want Open DX support, currently not on by default +# since we havn't yet checked compilation on all platforms yet. +PLUGIN_DIRS += dx + +# comment in if you have Quicktime installed, i.e under Mac OS. +# if in this case then its likely you'll want to comment out the below +# png, jpeg, gif and tiff plugins. +# PLUGIN_DIRS += quicktime + +# comment in if you have libpng installed. +PLUGIN_DIRS += png + +# comment in if you have libjpeg installed. +PLUGIN_DIRS += jpeg + +# comment in if you have libungif installed. +PLUGIN_DIRS += gif + +# comment in if you have libtiff installed. +PLUGIN_DIRS += tiff + +################################################################ +# Directories traversed in the TOPDIR/src/Demos directory + +DEMOS_DIRS = \ + hangglide\ + osgbillboard\ + osgcluster\ + osgconv\ + osgcopy\ + osgcube\ + osghud\ + osgimpostor\ + osgreflect\ + osgscribe\ + osgstereoimage\ + osgtext\ + osgtexture\ + osgviews\ + osgversion\ + sgv diff --git a/Makefile b/Makefile index 181631cf7..40d42c135 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ TOPDIR = . include $(TOPDIR)/Make/makedefs +include $(TOPDIR)/Make/makedirdefs -DIRS = src +DIRS = $(TOP_LEVEL_DIRS) include $(TOPDIR)/Make/makedirrules include $(TOPDIR)/Make/instrules diff --git a/src/Demos/Makefile b/src/Demos/Makefile index 50f319e85..828bc326c 100644 --- a/src/Demos/Makefile +++ b/src/Demos/Makefile @@ -1,23 +1,7 @@ TOPDIR = ../.. include $(TOPDIR)/Make/makedefs +include $(TOPDIR)/Make/makedirdefs -DIRS = \ - hangglide\ - osgbillboard\ - osgcluster\ - osgconv\ - osgcopy\ - osgcube\ - osghud\ - osgimpostor\ - osgreflect\ - osgscribe\ - osgstereoimage\ - osgtext\ - osgtexture\ - osgviews\ - osgversion\ - sgv - +DIRS = $(DEMOS_DIRS) include $(TOPDIR)/Make/makedirrules diff --git a/src/Makefile b/src/Makefile index eb609e9be..8d65fea1e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,13 +1,7 @@ TOPDIR = .. include $(TOPDIR)/Make/makedefs +include $(TOPDIR)/Make/makedirdefs -DIRS = \ - osg\ - osgUtil\ - osgDB\ - osgGLUT\ - osgPlugins\ - osgText\ - Demos +DIRS = $(SRC_DIRS) include $(TOPDIR)/Make/makedirrules diff --git a/src/osgPlugins/Makefile b/src/osgPlugins/Makefile index 0df81e2dc..586c2d21a 100644 --- a/src/osgPlugins/Makefile +++ b/src/osgPlugins/Makefile @@ -1,35 +1,7 @@ TOPDIR = ../.. include $(TOPDIR)/Make/makedefs +include $(TOPDIR)/Make/makedirdefs -#DIRS = osg rgb lib3ds flt obj lwo txp dw bmp pic tga osgtgz tgz zip -DIRS = osg rgb lib3ds flt obj lwo dw bmp pic tga osgtgz tgz zip - -#DIRS += txp - -# comment in if you have Performer installed. -# DIRS += pfb - -# comment in if you want Open DX support, currently not on by default -# since we havn't yet checked compilation on all platforms yet. -DIRS += dx - -# comment in if you have Quicktime installed, i.e under Mac OS. -# if in this case then its likely you'll want to comment out the below -# png, jpeg, gif and tiff plugins. -# DIRS += quicktime - -# comment in if you have libpng installed. -DIRS += png - -# comment in if you have libjpeg installed. -DIRS += jpeg - -# comment in if you have libungif installed. -DIRS += gif - -# comment in if you have libtiff installed. -DIRS += tiff - - +DIRS = $(PLUGIN_DIRS) include $(TOPDIR)/Make/makedirrules diff --git a/src/osgPlugins/txp/trpage_read.h b/src/osgPlugins/txp/trpage_read.h index a28f8a004..8231d0ac0 100644 --- a/src/osgPlugins/txp/trpage_read.h +++ b/src/osgPlugins/txp/trpage_read.h @@ -77,7 +77,7 @@ private: #if defined(_WIN32) typedef std::map tok_map; #else - typedef std::map > tok_map; + typedef std::map > tok_map; #endif tok_map tokenMap; trpgr_Token defCb; // Call this when no others are called diff --git a/src/osgPlugins/txp/trpage_scene.h b/src/osgPlugins/txp/trpage_scene.h index fbb33b6a4..6d2e9b598 100644 --- a/src/osgPlugins/txp/trpage_scene.h +++ b/src/osgPlugins/txp/trpage_scene.h @@ -206,7 +206,7 @@ public: #if defined(_WIN32) typedef std::map GroupMap; #else - typedef std::map > GroupMap; + typedef std::map > GroupMap; #endif trpgSceneGraphParser(void); virtual ~trpgSceneGraphParser(void) { }; diff --git a/src/osgPlugins/txp/trpage_sys.h b/src/osgPlugins/txp/trpage_sys.h index e1a637676..5e74cffda 100644 --- a/src/osgPlugins/txp/trpage_sys.h +++ b/src/osgPlugins/txp/trpage_sys.h @@ -86,13 +86,8 @@ typedef double float64; #include #endif -#if defined(_WIN32) #include #include -#else -#include -#include -#endif #if defined(_WIN32) // PJM // Had to take this out because of an iostream conflict diff --git a/src/osgPlugins/txp/trpage_write.h b/src/osgPlugins/txp/trpage_write.h index 8ca1f8397..9e3c1e9a5 100644 --- a/src/osgPlugins/txp/trpage_write.h +++ b/src/osgPlugins/txp/trpage_write.h @@ -251,9 +251,6 @@ public: bool isValid(void) const; char* getDir(void){return dir;}; -protected: - // Set if we're adding to an existing archive - bool isRegenerate; // Used to keep track of which tiles are in which file class TileFileEntry { @@ -262,6 +259,10 @@ protected: float zmin,zmax; uint32 offset; // Offset into file }; +protected: + // Set if we're adding to an existing archive + bool isRegenerate; + class TileFile { public: int id;