From 381d6874d9a9d944e91952509212ce16cd054a26 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 24 Jun 2008 20:08:47 +0000 Subject: generate OS dependent native code in a separate directory git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1673 232f8b59-042b-4e1e-8c03-345bb8c30851 --- make/build.xml | 21 ++++++++++++--------- make/cgl-macosx.cfg | 5 +++-- make/cglext.cfg | 3 +++ make/gl-common-gl2.cfg | 2 -- make/gl-gl2.cfg | 3 +++ make/glx-x11.cfg | 3 +++ make/glxext.cfg | 3 +++ make/jawt-macosx.cfg | 2 +- make/jawt-win32.cfg | 2 +- make/jawt-x11.cfg | 2 +- make/make.jogl.all.sh | 2 +- make/stub_includes/common/gles2.c | 2 +- make/stub_includes/opengl/GLES2/gl2.h | 26 ++++++++++++++++++-------- make/wgl-win32.cfg | 5 +++-- make/wglext.cfg | 3 +++ make/x11-lib.cfg | 2 +- 16 files changed, 57 insertions(+), 29 deletions(-) diff --git a/make/build.xml b/make/build.xml index 931df333d..72205f662 100644 --- a/make/build.xml +++ b/make/build.xml @@ -1204,17 +1204,20 @@ - - - - - - - + + + + + + + + + + @@ -1329,10 +1332,10 @@ - + - + diff --git a/make/cgl-macosx.cfg b/make/cgl-macosx.cfg index 21409e84a..96387826a 100644 --- a/make/cgl-macosx.cfg +++ b/make/cgl-macosx.cfg @@ -1,8 +1,9 @@ # This .cfg file is used to generate the interface to the CGL routines # used internally by the MacOSXGLContext implementation. -Package com.sun.opengl.impl.macosx.cgl JavaOutputDir ../build/gensrc/classes -NativeOutputDir ../build/gensrc/native/jogl +NativeOutputDir ../build/gensrc/native/jogl/OSX + +Package com.sun.opengl.impl.macosx.cgl JavaClass CGL Style allstatic Include gl-common-gl2.cfg diff --git a/make/cglext.cfg b/make/cglext.cfg index b37cdfc6c..f5ca85ae5 100755 --- a/make/cglext.cfg +++ b/make/cglext.cfg @@ -3,6 +3,9 @@ # Note that there are currently no such extensions exposed on Mac OS # X, but if in the future there are, this structure will allow them to # be easily exposed. +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl/OSX + Package com.sun.opengl.impl.macosx.cgl Style InterfaceAndImpl JavaClass CGLExt diff --git a/make/gl-common-gl2.cfg b/make/gl-common-gl2.cfg index 599793b74..4d86d74cd 100644 --- a/make/gl-common-gl2.cfg +++ b/make/gl-common-gl2.cfg @@ -3,8 +3,6 @@ HierarchicalNativeOutput false Include gl-common.cfg -JavaOutputDir ../build/gensrc/classes -NativeOutputDir ../build/gensrc/native/jogl # XID needs to be treated as a long for 32/64 bit compatibility Opaque long XID diff --git a/make/gl-gl2.cfg b/make/gl-gl2.cfg index c99a4cefa..6dae9e6d3 100644 --- a/make/gl-gl2.cfg +++ b/make/gl-gl2.cfg @@ -1,4 +1,7 @@ # This .cfg file is used to generate the GL interface and implementing class. +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl + Package javax.media.opengl Style InterfaceAndImpl JavaClass GL2 diff --git a/make/glx-x11.cfg b/make/glx-x11.cfg index 71f71ddd2..e7ef1fa63 100644 --- a/make/glx-x11.cfg +++ b/make/glx-x11.cfg @@ -1,5 +1,8 @@ # This .cfg file is used to generate the interface to the GLX routines # used internally by the X11GLContext implementation. +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl/X11 + Package com.sun.opengl.impl.x11.glx JavaClass GLX Style allstatic diff --git a/make/glxext.cfg b/make/glxext.cfg index f412b4b63..6dd9e5c19 100755 --- a/make/glxext.cfg +++ b/make/glxext.cfg @@ -1,5 +1,8 @@ # This .cfg file is used to generate the interface and implementing # class for the GLX extensions. +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl/X11 + Package com.sun.opengl.impl.x11.glx Style InterfaceAndImpl JavaClass GLXExt diff --git a/make/jawt-macosx.cfg b/make/jawt-macosx.cfg index 31f2cf911..1cabe39be 100644 --- a/make/jawt-macosx.cfg +++ b/make/jawt-macosx.cfg @@ -4,7 +4,7 @@ Style AllStatic Package com.sun.opengl.impl.awt JavaClass JAWTFactory JavaOutputDir ../build/gensrc/classes -NativeOutputDir ../build/gensrc/native/jogl +NativeOutputDir ../build/gensrc/native/jogl/OSX HierarchicalNativeOutput false diff --git a/make/jawt-win32.cfg b/make/jawt-win32.cfg index a3ef041bc..8a7f769e3 100644 --- a/make/jawt-win32.cfg +++ b/make/jawt-win32.cfg @@ -4,7 +4,7 @@ Style AllStatic Package com.sun.opengl.impl.awt JavaClass JAWTFactory JavaOutputDir ../build/gensrc/classes -NativeOutputDir ../build/gensrc/native/jogl +NativeOutputDir ../build/gensrc/native/jogl/Windows HierarchicalNativeOutput false diff --git a/make/jawt-x11.cfg b/make/jawt-x11.cfg index 8dd54080c..70d5caa31 100644 --- a/make/jawt-x11.cfg +++ b/make/jawt-x11.cfg @@ -4,7 +4,7 @@ Style AllStatic Package com.sun.opengl.impl.awt JavaClass JAWTFactory JavaOutputDir ../build/gensrc/classes -NativeOutputDir ../build/gensrc/native/jogl +NativeOutputDir ../build/gensrc/native/jogl/X11 HierarchicalNativeOutput false diff --git a/make/make.jogl.all.sh b/make/make.jogl.all.sh index ca5da7197..5fbc8781b 100644 --- a/make/make.jogl.all.sh +++ b/make/make.jogl.all.sh @@ -2,4 +2,4 @@ . ../../setenv-build-jogl.sh -ant $* 2>&1 | tee make.jogl.all.log +ant -v $* 2>&1 | tee make.jogl.all.log diff --git a/make/stub_includes/common/gles2.c b/make/stub_includes/common/gles2.c index d0b44a46f..f74b1686f 100755 --- a/make/stub_includes/common/gles2.c +++ b/make/stub_includes/common/gles2.c @@ -1,4 +1,4 @@ -#define GLAPI +#define GL_APIENTRY #define GL_APICALL // Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in diff --git a/make/stub_includes/opengl/GLES2/gl2.h b/make/stub_includes/opengl/GLES2/gl2.h index 172c5adb0..9c68b1e7a 100755 --- a/make/stub_includes/opengl/GLES2/gl2.h +++ b/make/stub_includes/opengl/GLES2/gl2.h @@ -43,27 +43,37 @@ extern "C" { * Definition of GL_APICALL and GL_APIENTRY *-----------------------------------------------------------------------*/ -/* -#if defined(_WIN32) || defined(__VC32__) // Win32 +#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) +#define __WIN32__ +#endif + +#if !defined(GL_APICALL) +# if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) # if defined (_DLL_EXPORTS) # define GL_APICALL __declspec(dllexport) # else # define GL_APICALL __declspec(dllimport) # endif -#elif defined (__ARMCC_VERSION) // ADS +# define GL_APIENTRY __stdcall +# elif defined (__ARMCC_VERSION) // ADS # define GL_APICALL -#elif defined (__SYMBIAN32__) && defined (__GCC32__) // Symbian GCC +# define GL_APIENTRY +# elif defined (__SYMBIAN32__) && defined (__GCC32__) // Symbian GCC # define GL_APICALL __declspec(dllexport) -#elif defined (__GNUC__) // GCC dependencies (kludge) -# define GL_APICALL +# define GL_APIENTRY +# else +# define GL_APICALL extern +# define GL_APIENTRY +# endif #endif #if !defined (GL_APICALL) # error Unsupported platform! #endif -*/ -#define GL_APIENTRY +#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) +# define PRAGMA_EXPORT_SUPPORTED 1 +#endif /*------------------------------------------------------------------------- * Data type definitions diff --git a/make/wgl-win32.cfg b/make/wgl-win32.cfg index 5065ffeea..88bffa3d7 100644 --- a/make/wgl-win32.cfg +++ b/make/wgl-win32.cfg @@ -1,8 +1,9 @@ # This .cfg file is used to generate the interface to the wgl routines # used internally by the WindowsGLContext implementation. -Package com.sun.opengl.impl.windows.wgl JavaOutputDir ../build/gensrc/classes -NativeOutputDir ../build/gensrc/native/jogl +NativeOutputDir ../build/gensrc/native/jogl/Windows + +Package com.sun.opengl.impl.windows.wgl JavaClass WGL Style allstatic Include gl-common-gl2.cfg diff --git a/make/wglext.cfg b/make/wglext.cfg index 346f56148..f4a21ab03 100644 --- a/make/wglext.cfg +++ b/make/wglext.cfg @@ -1,5 +1,8 @@ # This .cfg file is used to generate the interface and implementing # class for the WGL extensions. +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl/Windows + Package com.sun.opengl.impl.windows.wgl Style InterfaceAndImpl JavaClass WGLExt diff --git a/make/x11-lib.cfg b/make/x11-lib.cfg index d0b9e8c45..041a1b326 100644 --- a/make/x11-lib.cfg +++ b/make/x11-lib.cfg @@ -7,7 +7,7 @@ Style allstatic HierarchicalNativeOutput false JavaOutputDir ../build/gensrc/classes -NativeOutputDir ../build/gensrc/native/jogl +NativeOutputDir ../build/gensrc/native/jogl/X11 # Imports needed by all glue code Import java.nio.* -- cgit v1.2.3