diff options
author | Sven Gothel <[email protected]> | 2008-06-24 20:08:47 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-06-24 20:08:47 +0000 |
commit | 381d6874d9a9d944e91952509212ce16cd054a26 (patch) | |
tree | bd945343235ede4e64430fc5a118b4ef0efaa917 | |
parent | a8d2e240c2d843562500b68bb3f0f4434044f2f1 (diff) |
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
-rw-r--r-- | make/build.xml | 21 | ||||
-rw-r--r-- | make/cgl-macosx.cfg | 5 | ||||
-rwxr-xr-x | make/cglext.cfg | 3 | ||||
-rw-r--r-- | make/gl-common-gl2.cfg | 2 | ||||
-rw-r--r-- | make/gl-gl2.cfg | 3 | ||||
-rw-r--r-- | make/glx-x11.cfg | 3 | ||||
-rwxr-xr-x | make/glxext.cfg | 3 | ||||
-rw-r--r-- | make/jawt-macosx.cfg | 2 | ||||
-rw-r--r-- | make/jawt-win32.cfg | 2 | ||||
-rw-r--r-- | make/jawt-x11.cfg | 2 | ||||
-rw-r--r-- | make/make.jogl.all.sh | 2 | ||||
-rwxr-xr-x | make/stub_includes/common/gles2.c | 2 | ||||
-rwxr-xr-x | make/stub_includes/opengl/GLES2/gl2.h | 26 | ||||
-rw-r--r-- | make/wgl-win32.cfg | 5 | ||||
-rw-r--r-- | make/wglext.cfg | 3 | ||||
-rw-r--r-- | 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 @@ <patternset id="c.src.files.jogl"> <include name="${rootrel.src.c.jogl}/InternalBufferUtils.c"/> <include name="${rootrel.src.c.jogl}/*.m" if="isOSX"/> - <!-- FIXME: the Mixer should be moved to another library --> - <include name="${rootrel.src.c.jogl}/Mixer.cpp" if="isWindows"/> - <!-- FIXME: the WindowsWindow should be moved to another library --> - <include name="${rootrel.src.c.jogl}/WindowsWindow.c" if="isWindows"/> - <!-- FIXME: the X11Window should be moved to another library --> - <include name="${rootrel.src.c.jogl}/X11Window.c" if="isX11"/> - <include name="${rootrel.generated.c.jogl}/*GL*.c" unless="jogl.noglnatives"/> <include name="${rootrel.src.c.jogl}/XineramaHelper.c" if="isX11"/> + <include name="${rootrel.generated.c.jogl}/*GL*.c" unless="jogl.noglnatives"/> + <include name="${rootrel.generated.c.jogl}/X11/*.c" if="isX11"/> + <include name="${rootrel.generated.c.jogl}/OSX/*.c" if="isOSX"/> + <include name="${rootrel.generated.c.jogl}/Windows/*.c" if="isWindows"/> <!-- Xinerama supporting functions for Linux only (for now) --> <!-- Also supported on Solaris, but works differently --> <include name="${rootrel.src.c.jogl}/Xinerama.c" if="isLinux"/> + <!-- FIXME: the Mixer should be moved to another library --> + <include name="${rootrel.src.c.jogl}/Mixer.cpp" if="isWindows"/> + <!-- FIXME: the NEWT WindowsWindow should be moved to another library --> + <include name="${rootrel.src.c.jogl}/WindowsWindow.c" if="isWindows"/> + <!-- FIXME: the NEWT X11Window should be moved to another library --> + <include name="${rootrel.src.c.jogl}/X11Window.c" if="isX11"/> </patternset> <patternset id="c.src.files.jogl_awt"> @@ -1329,10 +1332,10 @@ <!-- FIXME: this is temporary until we move this to another workspace --> <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.all.jar}" class="com.sun.javafx.audio.windows.waveout.Mixer" /> <!-- FIXME: this is temporary until we move this to another workspace --> - <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.all.jar}" class="com.sun.javafx.newt.windows.WindowsWindow" /> + <javah destdir="../build/gensrc/native/jogl/Windows" classpath="${jogl.all.jar}" class="com.sun.javafx.newt.windows.WindowsWindow" /> <!-- FIXME: this is temporary until we move this to another workspace --> - <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.all.jar}" class="com.sun.javafx.newt.x11.X11Window" /> + <javah destdir="../build/gensrc/native/jogl/X11" classpath="${jogl.all.jar}" class="com.sun.javafx.newt.x11.X11Window" /> <!-- Compile stuff --> <antcall target="c.build" inheritRefs="true"> 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.* |