From ec3e1dc6119ca97e0d848e9ad02e3b8c1e1c4fd3 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Thu, 13 Mar 2003 06:22:31 +0000 Subject: [PATCH] Fixes for Mac OS X --- Make/instdemosrc | 4 +++- Make/makedefs | 2 +- Make/makedirrules | 4 ++-- Make/makerules | 2 +- examples/osgcameragroup/GNUmakefile | 4 ++-- include/osg/Vec2 | 2 +- include/osgDB/Field | 2 +- src/Demos/osglogo/osglogo.cpp | 2 +- src/osgDB/Field.cpp | 10 +++++----- src/osgPlugins/quicktime/GNUmakefile | 4 ++-- src/osgProducer/GNUmakefile | 1 + 11 files changed, 20 insertions(+), 17 deletions(-) diff --git a/Make/instdemosrc b/Make/instdemosrc index c69168be8..f3b35e3c9 100755 --- a/Make/instdemosrc +++ b/Make/instdemosrc @@ -21,6 +21,8 @@ shift; shift; shift; shift; shift; shift; shift; shift; OTHER_LIBS=$1 TIFF_LIB=$2 +[ "`uname`" = "Darwin" ] && MAKE=make || MAKE=gmake + copy_demo_source() { @@ -32,7 +34,7 @@ copy_demo_source() cd $TOPDIR/src/Demos/$d [ -d $INST_DEMO_SRC/$d ] || mkdir -m 0755 -p $INST_DEMO_SRC/$d echo " installing $d" - for f in `gmake __instfiles | grep -v gmake` + for f in `$MAKE __instfiles | grep -v $MAKE` do src=`echo $f | cut -f1 -d"="` dst=`echo $f | cut -f2 -d"="` diff --git a/Make/makedefs b/Make/makedefs index 7729158cd..bb24ef0db 100644 --- a/Make/makedefs +++ b/Make/makedefs @@ -289,7 +289,7 @@ endif #### MacOS X specific definitions ifeq ($(OS),Darwin) C++ = c++ - INC += + INC += DEF += -Wall -D__DARWIN_OSX__ OPTF = -O2 DBGF = -g -DOSG_COMPILE_UNIT_TESTS diff --git a/Make/makedirrules b/Make/makedirrules index 8add1ff83..68056f5d8 100644 --- a/Make/makedirrules +++ b/Make/makedirrules @@ -1,6 +1,6 @@ default : $(DIRS) - @for f in $(DIRS); do cd $$f; $(MAKE) $@ || exit 1; cd ..; done + @for f in $(DIRS); do echo "Entering directory $$f"; cd $$f; $(MAKE) $@ || exit 1; cd ..; done $(RECURSIVE_TARGETS) : $(DIRS) - @for f in $(DIRS); do cd $$f; $(MAKE) $@ || exit 1; cd ..; done + @for f in $(DIRS); do echo "Entering directory $$f"; cd $$f; $(MAKE) $@ || exit 1; cd ..; done diff --git a/Make/makerules b/Make/makerules index 594b58b1e..dbe7d07f9 100644 --- a/Make/makerules +++ b/Make/makerules @@ -179,7 +179,7 @@ endif depend : $(MAKEDEPEND) __link : - sh $(TOPDIR)/Make/dolink.sh $(TOPDIR) $(LNSRC) $(LNDEST) "$(LINK)" + @sh $(TOPDIR)/Make/dolink.sh $(TOPDIR) $(LNSRC) $(LNDEST) "$(LINK)" __instfiles : @echo $(INSTFILES) diff --git a/examples/osgcameragroup/GNUmakefile b/examples/osgcameragroup/GNUmakefile index 77e8a5a21..4bf24a62f 100644 --- a/examples/osgcameragroup/GNUmakefile +++ b/examples/osgcameragroup/GNUmakefile @@ -12,8 +12,8 @@ INSTFILES = \ EXEC = osgcameragroup -INC += $(PRODUCER_INCLUDE_DIR) -LDFLAGS += $(PRODUCER_LIB_DIR) +INC += $(PRODUCER_INCLUDE_DIR) -I/usr/X11R6/include +LDFLAGS += $(PRODUCER_LIB_DIR) -L/usr/X11R6/lib include $(TOPDIR)/Make/makerules diff --git a/include/osg/Vec2 b/include/osg/Vec2 index 57e685a0c..d592eb665 100644 --- a/include/osg/Vec2 +++ b/include/osg/Vec2 @@ -136,7 +136,7 @@ class Vec2 /// Length of the vector = sqrt( vec . vec ) inline float length() const { - return sqrtf( _v[0]*_v[0] + _v[1]*_v[1] ); + return sqrt( _v[0]*_v[0] + _v[1]*_v[1] ); } /// Length squared of the vector = vec . vec diff --git a/include/osgDB/Field b/include/osgDB/Field index 7895157a4..4d086cc20 100644 --- a/include/osgDB/Field +++ b/include/osgDB/Field @@ -55,7 +55,7 @@ class OSGDB_EXPORT Field REAL, INTEGER, BLANK, - UNINTIALISED + UNINITIALISED }; FieldType getFieldType() const; diff --git a/src/Demos/osglogo/osglogo.cpp b/src/Demos/osglogo/osglogo.cpp index e07b8e57a..b96ad8918 100644 --- a/src/Demos/osglogo/osglogo.cpp +++ b/src/Demos/osglogo/osglogo.cpp @@ -45,7 +45,7 @@ class MyBillboardTransform : public osg::PositionAttitudeTransform osg::Vec3 side = _axis^_normal; side.normalize(); - float angle = atan2f(eyevector*_normal,eyevector*side); + float angle = atan2(eyevector*_normal,eyevector*side); billboardRotation.makeRotate(osg::PI_2-angle,_axis); } diff --git a/src/osgDB/Field.cpp b/src/osgDB/Field.cpp index 4d8eff2f9..3252cb47c 100644 --- a/src/osgDB/Field.cpp +++ b/src/osgDB/Field.cpp @@ -59,7 +59,7 @@ void Field::_init() _fieldCacheSize = 0; _fieldCache = NULL; - _fieldType = UNINTIALISED; + _fieldType = UNINITIALISED; _withinQuotes = false; @@ -97,7 +97,7 @@ void Field::_copy(const Field& ic) void Field::setWithinQuotes(bool withinQuotes) { _withinQuotes=withinQuotes; - _fieldType = UNINTIALISED; + _fieldType = UNINITIALISED; } @@ -133,7 +133,7 @@ char* Field::takeStr() _fieldCache = NULL; _fieldCacheSize = 0; - _fieldType = UNINTIALISED; + _fieldType = UNINITIALISED; _withinQuotes = false; return field; @@ -175,13 +175,13 @@ void Field::addChar(char c) } _fieldCache[_fieldCacheSize++] = c; _fieldCache[_fieldCacheSize] = 0; - _fieldType = UNINTIALISED; + _fieldType = UNINITIALISED; } Field::FieldType Field::getFieldType() const { - if (_fieldType==UNINTIALISED && _fieldCache) + if (_fieldType==UNINITIALISED && _fieldCache) { _fieldType = calculateFieldType(_fieldCache,_withinQuotes); } diff --git a/src/osgPlugins/quicktime/GNUmakefile b/src/osgPlugins/quicktime/GNUmakefile index 6f22eed54..1a1b09eb9 100644 --- a/src/osgPlugins/quicktime/GNUmakefile +++ b/src/osgPlugins/quicktime/GNUmakefile @@ -1,8 +1,8 @@ TOPDIR = ../../.. include $(TOPDIR)/Make/makedefs -CXXFILES = ReaderWriterQT.cpp -CFILES = QTtexture.c +CXXFILES = ReaderWriterQT.cpp\ + QTtexture.cpp LIBS += $(QUICKTIME) $(OSG_LIBS) $(OTHER_LIBS) diff --git a/src/osgProducer/GNUmakefile b/src/osgProducer/GNUmakefile index 1e049163f..7b31c631a 100644 --- a/src/osgProducer/GNUmakefile +++ b/src/osgProducer/GNUmakefile @@ -11,6 +11,7 @@ CXXFILES =\ LIBS += -lProducer $(GL_LIBS) -losgGA -losgUtil -losgDB -losg $(OTHER_LIBS) DEF += -DOSGPRODUCER_LIBRARY +INC += -I/usr/X11R6/include TARGET_BASENAME = osgProducer LIB = $(LIB_PREFIX)$(TARGET_BASENAME).$(LIB_EXT)