Changeset 3230

Show
Ignore:
Timestamp:
08/04/04 10:27:43 (10 years ago)
Author:
robert
Message:

From Norman Vine (with small tweaks by Robert Osfield), build fixes for Cygwin

Location:
OpenSceneGraph/trunk
Files:
33 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/Make/dependencies

    r2980 r3230  
    22# Dependency library which have been installed on this system 
    33 
    4 GDAL_INSTALLED = no 
     4GDAL_INSTALLED = yes 
    55JASPER_INSTALLED = no 
    66 
  • OpenSceneGraph/trunk/Make/makedefs

    r3206 r3230  
    198198    FREETYPE_LIB      = /usr/local/lib/libfreetype.a 
    199199  endif  
    200     DYNAMICLIBRARYLIB = -ldl 
    201     OSG_LIBS          = -losgGA -losgDB -losgUtil -losg  
    202     GL_LIBS           = -lGLU -lGL  
    203     X_INC             = -I/usr/X11R6/include 
    204     X_LIBS            = -lXext -lXmu -lXi -lX11  
    205     SOCKET_LIBS       = -lsocket -lnsl 
    206     INSTBINCMD        = cp 
    207     INSTDEVCMD        = cp 
    208     INST_LOCATION     = /opt/OpenSceneGraph 
    209     MAKEDIST          = $(TOPDIR)/Make/makepkg 
    210     OTHER_LIBS        = -lOpenThreads 
     200 
     201  DYNAMICLIBRARYLIB = -ldl 
     202  OSG_LIBS          = -losgGA -losgDB -losgUtil -losg  
     203  GL_LIBS           = -lGLU -lGL  
     204  X_INC             = -I/usr/X11R6/include 
     205  X_LIBS            = -lXext -lXmu -lXi -lX11  
     206  SOCKET_LIBS       = -lsocket -lnsl 
     207  INSTBINCMD        = cp 
     208  INSTDEVCMD        = cp 
     209  INST_LOCATION     = /opt/OpenSceneGraph 
     210  MAKEDIST          = $(TOPDIR)/Make/makepkg 
     211  OTHER_LIBS        = -lOpenThreads 
     212 
     213  GDAL_INCLUDES     = -I`gdal-config --prefix`/include 
     214  GDAL_LIBS         = `gdal-config --dep-libs` 
     215  GDAL_LIBS         += `gdal-config --libs` 
     216 
     217 
    211218endif 
    212219 
     
    291298        MAKEDIST          = $(TOPDIR)/Make/makeirixdist 
    292299 
     300        GDAL_INCLUDES     = -I`gdal-config --prefix`/include 
     301        GDAL_LIBS         = `gdal-config --dep-libs` 
     302        GDAL_LIBS         += `gdal-config --libs` 
     303 
     304 
    293305endif 
    294306 
     
    369381  endif 
    370382 
     383  GDAL_INCLUDES     = -I`gdal-config --prefix`/include 
     384  GDAL_LIBS         = `gdal-config --dep-libs` 
     385  GDAL_LIBS         += `gdal-config --libs` 
     386 
    371387endif 
    372388 
     
    396412  TIFF_LIB          = -ltiff 
    397413  GIF_LIBS          = -lungif 
     414 
     415  GDAL_INCLUDES     = -I`gdal-config --prefix`/include 
     416  GDAL_LIBS         = `gdal-config --dep-libs` 
     417  GDAL_LIBS         += `gdal-config --libs` 
     418 
    398419endif 
    399420 
     
    442463  TIFF_LIBS       = -ltiff -lz -ljpeg 
    443464 
     465  GDAL_INCLUDES     = -I`gdal-config --prefix`/include 
     466  GDAL_LIBS         = `gdal-config --dep-libs` 
     467  GDAL_LIBS         += `gdal-config --libs` 
     468 
    444469endif 
    445470 
     
    452477  OPTF              = -O2  
    453478  DBGF              = -g -DOSG_COMPILE_UNIT_TESTS 
    454   SHARED            = -shared\ 
    455                         -Wl,--out-implib,$(TOPDIR)/lib/$(OS)/lib$(TARGET_BASENAME).dll.a  
    456                         -Wl,--export-all-symbols 
     479  SHARED            = -shared \ 
     480                      -Wl,--out-implib,$(TOPDIR)/lib/$(OS)/lib$(TARGET_BASENAME).dll.a \ 
     481                      -Wl,--export-all-symbols 
    457482 
    458483  EXE_EXT           =.exe 
     
    472497  GIF_LIBS          = -lungif 
    473498  TIFF_LIB          = -ltiff -lz -ljpeg 
    474   FREETYPE_LIB      = -lfreetype 
     499  FREETYPE_LIB      = `freetype-config --libs` 
     500 
     501  GDAL_INCLUDES     = -I`gdal-config --prefix`/include 
     502  GDAL_LIBS         = `gdal-config --dep-libs` 
     503  GDAL_LIBS         += `gdal-config --libs` 
    475504 
    476505  LIBINST    = bin 
     
    496525#### Mingw specific definitions 
    497526ifeq ($(OS),MINGW) 
    498   C++               = c++ -mthreads 
     527  C++               = c++ -mthreads  
     528# -fomit-frame-pointer -march=pentium3 -msse -mmmx -mfpmath=sse 
    499529  DEPARG            = -M 
    500530  INC               +=  
    501531  DEF               += -DWIN32 -Wall 
    502532# -W 
    503   OPTF              = -O2  
     533  OPTF              = -O2 
    504534  DBGF              = -g -DOSG_COMPILE_UNIT_TESTS 
    505535  SHARED            = -shared -mthreads \ 
     
    524554  TIFF_LIB          = -ltiff -lz -ljpeg 
    525555  FREETYPE_LIB      = -lfreetype 
     556  GDAL_LIB          =  -lgdal -ljpeg -lgeotiff -ltiff -lpng -lz 
    526557 
    527558  LIBXML2_INCLUDE = -I/usr/mingw/include/libxml2 
     
    593624  GIF_LIBS          = -L/opt/libungif/lib -lungif 
    594625 
     626  GDAL_INCLUDES     = -I`gdal-config --prefix`/include 
     627  GDAL_LIBS         = `gdal-config --dep-libs` 
     628  GDAL_LIBS         += `gdal-config --libs` 
     629 
    595630endif 
    596631 
  • OpenSceneGraph/trunk/NEWS.txt

    r3227 r3230  
    1111     
    1212    DatabasePager 
     13     
     14    Double Vec & Matrix classes 
    1315     
    1416    osgUtil - tristipper, simplifier, GLObjectVisitor. 
  • OpenSceneGraph/trunk/examples/osgcluster/broadcaster.cpp

    r2788 r3230  
    33#include <sys/types.h> 
    44 
    5 #if !defined (WIN32) 
     5#if !defined (WIN32) || defined(__CYGWIN__) 
    66#include <sys/ioctl.h> 
    77#include <sys/uio.h> 
     
    2727    #include <net/soioctl.h> 
    2828#elif defined(__CYGWIN__)  
    29     // nothing needed 
     29    #include <unistd.h> 
    3030#elif defined(__sun)  
    3131    #include <unistd.h> 
     
    5757Broadcaster::~Broadcaster( void ) 
    5858{ 
    59 #if defined (WIN32) 
     59#if defined (WIN32) && !defined(__CYGWIN__) 
    6060    closesocket( _so); 
    6161#else 
     
    6666bool Broadcaster::init( void ) 
    6767{ 
    68 #if defined (WIN32) 
     68#if defined (WIN32) && !defined(__CYGWIN__) 
    6969    WORD version = MAKEWORD(1,1); 
    7070    WSADATA wsaData; 
     
    8484        return false; 
    8585    } 
    86 #if defined (WIN32) 
     86#if defined (WIN32) && !defined(__CYGWIN__) 
    8787    const BOOL on = TRUE; 
    8888#else 
     
    9090#endif 
    9191 
    92 #if defined (WIN32) 
     92#if defined (WIN32) && !defined(__CYGWIN__) 
    9393    setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char *) &on, sizeof(int)); 
    9494#else 
     
    100100    if( _address == 0 ) 
    101101    { 
    102 #if defined (WIN32) 
     102#if defined (WIN32) && !defined(__CYGWIN__) 
    103103        setsockopt( _so, SOL_SOCKET, SO_BROADCAST, (const char *) &on, sizeof(int)); 
    104104#else 
     
    106106#endif 
    107107 
    108 #if !defined (WIN32) 
     108#if !defined (WIN32) || defined(__CYGWIN__) 
    109109        struct ifreq ifr; 
    110110#endif 
    111 #if defined (__linux) 
     111#if defined (__linux) || defined(__CYGWIN__) 
    112112        strcpy( ifr.ifr_name, "eth0" ); 
    113113#elif defined(__sun) 
     
    175175    } 
    176176 
    177 #if defined (WIN32) 
     177#if defined (WIN32) && !defined(__CYGWIN__) 
    178178    unsigned int size = sizeof( SOCKADDR_IN ); 
    179179    sendto( _so, (const char *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size ); 
  • OpenSceneGraph/trunk/examples/osgcluster/broadcaster.h

    r1697 r3230  
    88// 
    99 
    10 #ifndef WIN32 
     10#if !defined(WIN32) || defined(__CYGWIN__) 
    1111    #include <netinet/in.h> 
    1212#endif 
     
    3737 
    3838    private : 
    39 #if defined (WIN32) 
     39#if defined(WIN32) && !defined(__CYGWIN__) 
    4040        SOCKET _so; 
    4141#else 
     
    4646        void *_buffer; 
    4747        unsigned int _buffer_size; 
    48 #if defined (WIN32) 
     48#if defined(WIN32) && !defined(__CYGWIN__) 
    4949        SOCKADDR_IN saddr; 
    5050#else 
  • OpenSceneGraph/trunk/examples/osgcluster/osgcluster.cpp

    r3067 r3230  
    1313#include <osg/Quat> 
    1414 
    15 #if defined (WIN32) 
     15#if defined (WIN32) && !defined(__CYGWIN__) 
    1616#include <winsock.h> 
    1717#endif 
  • OpenSceneGraph/trunk/examples/osgcluster/receiver.cpp

    r1697 r3230  
    22#include <fcntl.h> 
    33#include <sys/types.h> 
    4 #if defined (WIN32) 
     4#if defined (WIN32) && !defined(__CYGWIN__) 
    55#include <winsock.h> 
    66#else 
     
    2727Receiver::~Receiver( void ) 
    2828{ 
    29 #if defined (WIN32) 
     29#if defined (WIN32) && !defined(__CYGWIN__) 
    3030    closesocket( _so); 
    3131#else 
     
    3636bool Receiver::init( void ) 
    3737{ 
    38 #ifdef WIN32 
     38#if defined(WIN32) && !defined(__CYGWIN__) 
    3939    WORD version = MAKEWORD(1,1); 
    4040    WSADATA wsaData; 
     
    5454    return false; 
    5555    } 
    56 #if defined (WIN32) 
     56#if defined (WIN32) && !defined(__CYGWIN__) 
    5757//    const BOOL on = TRUE; 
    5858//    setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char*) &on, sizeof(int)); 
     
    6565    saddr.sin_family = AF_INET; 
    6666    saddr.sin_port   = htons( _port ); 
    67 #if defined (WIN32) 
     67#if defined (WIN32) && !defined(__CYGWIN__) 
    6868    saddr.sin_addr.s_addr =  htonl(INADDR_ANY); 
    6969#else 
     
    118118    tv.tv_usec = 0; 
    119119 
    120 #if defined (WIN32) 
     120#if defined (WIN32) && !defined(__CYGWIN__) 
    121121//    saddr.sin_port   = htons( _port ); 
    122122    recvfrom( _so, (char *)_buffer, _buffer_size, 0, (sockaddr*)&saddr, &size ); 
  • OpenSceneGraph/trunk/examples/osgcluster/receiver.h

    r1697 r3230  
    99// 
    1010 
    11 #ifndef WIN32 
     11#if !defined(WIN32) || defined(__CYGWIN__) 
    1212    #include <netinet/in.h> 
    1313#endif 
     
    3434 
    3535    private : 
    36 #if defined (WIN32) 
     36#if defined (WIN32) && !defined(__CYGWIN__) 
    3737        SOCKET _so; 
    38 #else 
    39     int _so; 
    40 #endif 
    41 #if defined (WIN32) 
    4238        SOCKADDR_IN saddr; 
    4339#else 
     40        int _so; 
    4441        struct sockaddr_in saddr; 
    4542#endif 
  • OpenSceneGraph/trunk/examples/osgdem/GNUmakefile

    r3200 r3230  
    55        osgdem.cpp\ 
    66 
    7 ifneq ("$(GDAL_INCLUDES)","") 
    87INC += $(GDAL_INCLUDES) 
     8 
     9LIBS     += -losgProducer -lProducer -losgTerrain -losgFX -losgGL2 -losgText -losgGA -losgDB -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)  
     10 
     11ifeq ($(OS),MINGW) 
     12LIBS    += -ljpeg -lpng -lgeotiff -ltiff -lz -L/usr/mingw/lib/malloc.o 
    913endif 
    10  
    11 ifneq ("$(GDAL_LIB_DIR)","") 
    12 LDFLAGS += -L$(GDAL_LIB_DIR) 
    13 endif 
    14  
    15 LIBS     += -losgProducer -lProducer -losgTerrain -losgFX -losgGL2 -losgText -losgGA -losgDB -losgUtil -losg -lgdal $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)  
    1614 
    1715INSTFILES = \ 
  • OpenSceneGraph/trunk/include/osg/AnimationPath

    r3008 r3230  
    1515#define OSG_ANIMATIONPATH 1 
    1616 
     17#include <map> 
     18#include <istream> 
     19#include <float.h> 
     20 
    1721#include <osg/Matrixf> 
    1822#include <osg/Matrixd> 
    1923#include <osg/Quat> 
    2024#include <osg/NodeCallback> 
    21  
    22 #include <map> 
    23 #include <istream> 
    24 #include <float.h> 
    2525 
    2626namespace osg { 
  • OpenSceneGraph/trunk/include/osg/Array

    r3208 r3230  
    1515#define OSG_ARRAY 1 
    1616 
    17 #include <osg/Object> 
    18 #include <osg/GL> 
     17#include <vector> 
     18 
    1919#include <osg/Vec2> 
    2020#include <osg/Vec3> 
     
    2222#include <osg/UByte4> 
    2323 
    24 #include <vector> 
     24#include <osg/Object> 
     25#include <osg/GL> 
    2526 
    2627namespace osg { 
  • OpenSceneGraph/trunk/include/osg/AutoTransform

    r2761 r3230  
    1515#define OSG_AUTOTRANSFORM 1 
    1616 
     17#include <osg/AnimationPath> 
    1718#include <osg/Group> 
    1819#include <osg/Transform> 
    19 #include <osg/AnimationPath> 
    2020#include <osg/Quat> 
    2121 
  • OpenSceneGraph/trunk/include/osg/CoordinateSystemNode

    r3051 r3230  
    148148    X = (N+height)*cos_latitude*cos(longitude); 
    149149    Y = (N+height)*cos_latitude*sin(longitude); 
    150     Z = (N*(1-_eccentricitySquared)+height)*sin(latitude); 
     150    Z = (N*(1-_eccentricitySquared)+height)*sin_latitude; 
    151151} 
    152152 
  • OpenSceneGraph/trunk/include/osg/Vec2d

    r3134 r3230  
    1616 
    1717#include <osg/Vec2f> 
    18  
    19 #include <ostream> 
    2018 
    2119namespace osg { 
  • OpenSceneGraph/trunk/include/osg/Vec2f

    r3048 r3230  
    1515#define OSG_VEC2F 1 
    1616 
     17#include <ostream> 
     18 
    1719#include <osg/Math> 
    18  
    19 #include <ostream> 
    2020 
    2121namespace osg { 
  • OpenSceneGraph/trunk/include/osg/Vec3d

    r3134 r3230  
    1717#include <osg/Vec3f> 
    1818 
    19 #include <ostream> 
    20  
    2119namespace osg { 
    2220 
  • OpenSceneGraph/trunk/include/osg/Vec3f

    r3011 r3230  
    1515#define OSG_VEC3F 1 
    1616 
     17#include <ostream> 
     18 
    1719#include <osg/Math> 
    18  
    19 #include <ostream> 
    2020 
    2121namespace osg { 
  • OpenSceneGraph/trunk/include/osg/Vec4f

    r3008 r3230  
    1717#include <osg/Vec3f> 
    1818 
    19 #include <ostream> 
    20  
    2119namespace osg { 
    2220 
  • OpenSceneGraph/trunk/include/osgDB/ReadFile

    r2877 r3230  
    1515#define OSGDB_READFILE 1 
    1616 
     17#include <string> 
     18 
    1719#include <osg/Node> 
    1820#include <osg/Image> 
     
    2123#include <osgDB/Export> 
    2224#include <osgDB/Registry> 
    23  
    24 #include <string> 
    2525 
    2626namespace osgDB { 
  • OpenSceneGraph/trunk/include/osgText/Font

    r3159 r3230  
    1515#define OSGTEXT_FONT 1 
    1616 
     17#include <string> 
     18 
    1719#include <osg/Vec2> 
    1820#include <osg/Image> 
     
    2325 
    2426#include <osgText/Export> 
    25  
    26 #include <string> 
    2727 
    2828namespace osgText { 
  • OpenSceneGraph/trunk/include/osgText/String

    r2674 r3230  
    1515#define OSGTEXT_STRING 1 
    1616 
    17 #include <osg/Referenced> 
    18 #include <osgText/Export> 
    19  
    2017#include <vector> 
    2118#include <set> 
    2219#include <string> 
     20 
     21#include <osg/Referenced> 
     22#include <osgText/Export> 
    2323 
    2424namespace osgText { 
  • OpenSceneGraph/trunk/include/osgUtil/CullVisitor

    r3214 r3230  
    1515#define OSGUTIL_CULLVISITOR 1 
    1616 
     17#include <map> 
     18#include <vector> 
     19 
    1720#include <osg/NodeVisitor> 
    1821#include <osg/BoundingSphere> 
     
    2528#include <osg/ClearNode> 
    2629#include <osg/Notify> 
    27 #include <osg/Notify> 
    2830 
    2931#include <osg/CullStack> 
     
    3133#include <osgUtil/RenderGraph> 
    3234#include <osgUtil/RenderStage> 
    33  
    34 #include <map> 
    35 #include <vector> 
    3635 
    3736#include <osg/Vec3> 
  • OpenSceneGraph/trunk/include/osgUtil/SmoothingVisitor

    r1529 r3230  
    3131 
    3232        /// default to traversing all children. 
    33         SmoothingVisitor() 
    34         { 
    35             setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN); 
    36         } 
    37  
     33        SmoothingVisitor(); 
     34        virtual ~SmoothingVisitor(); 
     35         
    3836        /// smooth geoset by creating per vertex normals. 
    3937        static void smooth(osg::Geometry& geoset); 
  • OpenSceneGraph/trunk/src/osgPlugins/directx/directx.h

    r1471 r3230  
    2525#define _DIRECTX_H_ 
    2626 
    27 #include <osg/Math> 
    28  
    2927#include <string> 
    3028#include <vector> 
    3129#include <fstream> 
     30 
     31#include <osg/Math> 
    3232 
    3333namespace DX { 
  • OpenSceneGraph/trunk/src/osgPlugins/gdal/GNUmakefile

    r3200 r3230  
    55        ReaderWriterGDAL.cpp\ 
    66 
    7 ifneq ("$(GDAL_INCLUDES)","") 
     7 
    88INC += $(GDAL_INCLUDES) 
    9 endif 
    109 
    11 ifneq ("$(GDAL_LIB_DIR)","") 
    12 LDFLAGS += -L$(GDAL_LIB_DIR) 
    13 endif 
    14  
    15 LIBS  += $(OSG_LIBS) -lgdal $(OTHER_LIBS) 
     10LIBS  += $(OSG_LIBS) $(GDAL_LIBS) $(OTHER_LIBS) 
    1611 
    1712TARGET_BASENAME = gdal 
  • OpenSceneGraph/trunk/src/osgPlugins/obj/glm.cpp

    r2530 r3230  
    99 
    1010/* includes */ 
     11#include "glm.h" 
    1112#include <math.h> 
    1213#include <stdio.h> 
     
    1516#include <osg/Math> 
    1617#include <stdlib.h> 
    17 #include "glm.h" 
    1818 
    1919#include <osg/Math> 
  • OpenSceneGraph/trunk/src/osgPlugins/txp/trpage_sys.h

    r2570 r3230  
    3838#include <windows.h> 
    3939 
     40#ifdef __MSC_VER 
    4041// Microsoft Developer warnings that annoy me 
    4142#pragma warning ( disable : 4251) 
    4243#pragma warning ( disable : 4275) 
    4344#pragma warning ( disable : 4786) 
     45#endif 
    4446 
    4547// Somewhat system independent file deletion macro 
  • OpenSceneGraph/trunk/src/osgProducer/KeyboardMouseCallback.cpp

    r2427 r3230  
     1#include <osgProducer/KeyboardMouseCallback> 
     2 
    13#include <osg/Math> 
    24#include <osg/Notify> 
    3  
    4 #include <osgProducer/KeyboardMouseCallback> 
    55 
    66#include <float.h> 
  • OpenSceneGraph/trunk/src/osgTerrain/GNUmakefile

    r3200 r3230  
    99    Version.cpp\ 
    1010 
    11 ifneq ("$(GDAL_INCLUDES)","") 
    12 INC += $(GDAL_INCLUDES) 
    13 endif 
    14  
    15 ifneq ("$(GDAL_LIB_DIR)","") 
    16 LDFLAGS += -L$(GDAL_LIB_DIR) 
    17 endif 
    18  
    1911DEF     += -DOSGTERRAIN_LIBRARY 
    2012 
    21 LIBS  +=  -losgDB -losgUtil -losg -lgdal $(GL_LIBS) $(OTHER_LIBS) 
     13INC += $(GDAL_INCLUDES) 
     14 
     15LIBS  +=  -losgDB -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(OTHER_LIBS) 
    2216 
    2317TARGET_BASENAME = osgTerrain 
  • OpenSceneGraph/trunk/src/osgText/DefaultFont.h

    r1994 r3230  
    1515#define NEWTEXT_DEFAULTFONT_H 1 
    1616 
     17#include <map> 
     18 
    1719#include <osg/ref_ptr> 
    1820 
    1921#include <osgText/Font> 
    20  
    21 #include <map> 
    2222 
    2323namespace osgText { 
  • OpenSceneGraph/trunk/src/osgText/String.cpp

    r2674 r3230  
    11#include <osgText/String> 
    22 
     3#include <osg/Notify> 
    34#include <osg/Math> 
    4 #include <osg/Notify> 
    55 
    66using namespace osgText; 
  • OpenSceneGraph/trunk/src/osgText/Text.cpp

    r3195 r3230  
    1313 
    1414 
     15#include <vector> 
     16#include <osgText/Text> 
     17 
     18#include <osg/Math> 
    1519#include <osg/GL> 
    16 #include <osg/Math> 
    1720#include <osgUtil/CullVisitor> 
    1821#include <osgDB/ReadFile> 
    19 #include <osgText/Text> 
    2022 
    2123#include "DefaultFont.h" 
  • OpenSceneGraph/trunk/src/osgUtil/SmoothingVisitor.cpp

    r2315 r3230  
    8787}; 
    8888 
     89SmoothingVisitor::SmoothingVisitor() 
     90{ 
     91    setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN); 
     92} 
     93 
     94SmoothingVisitor::~SmoothingVisitor() 
     95{ 
     96} 
     97 
    8998void SmoothingVisitor::smooth(osg::Geometry& geom) 
    9099{