diff options
author | Sven Gothel <[email protected]> | 2013-06-17 10:09:32 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-06-17 10:09:32 +0200 |
commit | e18771cc020f6fd42f6427540c079e48699ab310 (patch) | |
tree | 4ddfbbac05b8a332888711d53233969863362446 | |
parent | 5d211c6fa6a0452cc4569712e436184e34504a88 (diff) |
Complete 5d211c6fa6a0452cc4569712e436184e34504a88: Remove generate.nativelibrary.sources and dynlink* gluegen files due to manual impl.
-rw-r--r-- | make/build.xml | 52 | ||||
-rwxr-xr-x | make/dynlink-macosx.cfg | 25 | ||||
-rwxr-xr-x | make/dynlink-unix-CustomJavaCode.java | 18 | ||||
-rwxr-xr-x | make/dynlink-unix.cfg | 22 | ||||
-rwxr-xr-x | make/dynlink-windows-CustomJavaCode.java | 11 | ||||
-rwxr-xr-x | make/dynlink-windows.cfg | 30 | ||||
-rwxr-xr-x | make/stub_includes/macosx/dynamic-linker.h | 46 | ||||
-rw-r--r-- | make/stub_includes/unix/dynamic-linker.h | 55 | ||||
-rwxr-xr-x | make/stub_includes/windows/dynamic-linker.h | 32 |
9 files changed, 0 insertions, 291 deletions
diff --git a/make/build.xml b/make/build.xml index 5f9e570..de2f41d 100644 --- a/make/build.xml +++ b/make/build.xml @@ -227,58 +227,6 @@ </gluegen> --> </target> - <!-- Use GlueGen to generate the source code for the NativeLibrary - implementation. Note that to make the build process simpler (in - particular, the nightly builds) we do not do this every time we - run the build, but instead check in the generated sources to - the source tree. --> - <target name="generate.nativelibrary.sources" depends="init.gg" > - <!-- Define the appropriate include paths --> - <dirset id="stub.includes.fileset.windows" dir="."> - <include name="stub_includes/windows/**" /> - </dirset> - <dirset id="stub.includes.fileset.unix" dir="."> - <include name="stub_includes/unix/**" /> - </dirset> - <dirset id="stub.includes.fileset.macosx" dir="."> - <include name="stub_includes/macosx/**" /> - </dirset> - - <!-- Execute it against all of the OSs' header files --> - <gluegen src="stub_includes/windows/dynamic-linker.h" - config="dynlink-windows.cfg" - includeRefId="stub.includes.fileset.windows" - emitter="com.jogamp.gluegen.JavaEmitter" - dumpCPP="false" - debug="false"> - <classpath refid="gluegen.classpath" /> - </gluegen> - <gluegen src="stub_includes/unix/elf-header.h" - config="dynlink-unix.cfg" - includeRefId="stub.includes.fileset.unix" - emitter="com.jogamp.gluegen.JavaEmitter" - dumpCPP="false" - debug="false"> - <classpath refid="gluegen.classpath" /> - </gluegen> - <gluegen src="stub_includes/unix/dynamic-linker.h" - config="dynlink-unix.cfg" - includeRefId="stub.includes.fileset.unix" - emitter="com.jogamp.gluegen.JavaEmitter" - dumpCPP="false" - debug="false"> - <classpath refid="gluegen.classpath" /> - </gluegen> - <gluegen src="stub_includes/macosx/dynamic-linker.h" - config="dynlink-macosx.cfg" - includeRefId="stub.includes.fileset.macosx" - emitter="com.jogamp.gluegen.JavaEmitter" - dumpCPP="false" - debug="false"> - <classpath refid="gluegen.classpath" /> - </gluegen> - </target> - <!-- ================================================================== --> <!-- - Compile the native C code for GlueGen's dynamic linker interface. diff --git a/make/dynlink-macosx.cfg b/make/dynlink-macosx.cfg deleted file mode 100755 index 6079eb8..0000000 --- a/make/dynlink-macosx.cfg +++ /dev/null @@ -1,25 +0,0 @@ -Style AllStatic -JavaClass MacOSXDynamicLinkerImpl -Package com.jogamp.common.os -Implements MacOSXDynamicLinkerImpl DynamicLinker -JavaOutputDir ../src/java -NativeOutputDir ../src/native/macosx -HierarchicalNativeOutput false - -# Note that we can use the same CustomJavaCode as the unix -# implementation, but some of the constants (e.g. RTLD_GLOBAL) resolve -# to different values -IncludeAs CustomJavaCode MacOSXDynamicLinkerImpl dynlink-unix-CustomJavaCode.java -CustomCCode #include <dlfcn.h> -CustomCCode #include </usr/include/machine/types.h> - -ArgumentIsString dlopen 0 -ArgumentIsString dlsym 1 -ReturnsString dlerror -Opaque long void* - -# Hide the platform-specific functions -AccessControl dlopen PRIVATE -AccessControl dlsym PRIVATE -AccessControl dlclose PRIVATE -AccessControl dlerror PRIVATE diff --git a/make/dynlink-unix-CustomJavaCode.java b/make/dynlink-unix-CustomJavaCode.java deleted file mode 100755 index 5d10edf..0000000 --- a/make/dynlink-unix-CustomJavaCode.java +++ /dev/null @@ -1,18 +0,0 @@ -public long openLibrary(String pathname) { - // Note we use RTLD_GLOBAL visibility to allow this functionality to - // be used to pre-resolve dependent libraries of JNI code without - // requiring that all references to symbols in those libraries be - // looked up dynamically via the ProcAddressTable mechanism; in - // other words, one can actually link against the library instead of - // having to dlsym all entry points. System.loadLibrary() uses - // RTLD_LOCAL visibility so can't be used for this purpose. - return dlopen(pathname, RTLD_LAZY | RTLD_GLOBAL); -} - -public long lookupSymbol(long libraryHandle, String symbolName) { - return dlsym(libraryHandle, symbolName); -} - -public void closeLibrary(long libraryHandle) { - dlclose(libraryHandle); -} diff --git a/make/dynlink-unix.cfg b/make/dynlink-unix.cfg deleted file mode 100755 index a8be5b7..0000000 --- a/make/dynlink-unix.cfg +++ /dev/null @@ -1,22 +0,0 @@ -Style AllStatic -JavaClass UnixDynamicLinkerImpl -Package com.jogamp.common.os -Implements UnixDynamicLinkerImpl DynamicLinker -JavaOutputDir ../src/java -NativeOutputDir ../src/native/unix -HierarchicalNativeOutput false - -IncludeAs CustomJavaCode UnixDynamicLinkerImpl dynlink-unix-CustomJavaCode.java -CustomCCode #include <dlfcn.h> -CustomCCode #include <inttypes.h> - -ArgumentIsString dlopen 0 -ArgumentIsString dlsym 1 -ReturnsString dlerror -Opaque long void* - -# Hide the platform-specific functions -AccessControl dlopen PRIVATE -AccessControl dlsym PRIVATE -AccessControl dlclose PRIVATE -AccessControl dlerror PRIVATE diff --git a/make/dynlink-windows-CustomJavaCode.java b/make/dynlink-windows-CustomJavaCode.java deleted file mode 100755 index 4101f4c..0000000 --- a/make/dynlink-windows-CustomJavaCode.java +++ /dev/null @@ -1,11 +0,0 @@ -public long openLibrary(String libraryName) { - return LoadLibraryW(libraryName); -} - -public long lookupSymbol(long libraryHandle, String symbolName) { - return GetProcAddressA(libraryHandle, symbolName); -} - -public void closeLibrary(long libraryHandle) { - FreeLibrary(libraryHandle); -} diff --git a/make/dynlink-windows.cfg b/make/dynlink-windows.cfg deleted file mode 100755 index db6f766..0000000 --- a/make/dynlink-windows.cfg +++ /dev/null @@ -1,30 +0,0 @@ -Style AllStatic -JavaClass WindowsDynamicLinkerImpl -Package com.jogamp.common.os -Implements WindowsDynamicLinkerImpl DynamicLinker -JavaOutputDir ../src/java -NativeOutputDir ../src/native/windows -HierarchicalNativeOutput false - -IncludeAs CustomJavaCode WindowsDynamicLinkerImpl dynlink-windows-CustomJavaCode.java -CustomCCode #include <windows.h> -CustomCCode /* This typedef is apparently needed for compilers before VC8, -CustomCCode and for the embedded ARM compilers we're using */ -CustomCCode #if (_MSC_VER < 1400) || defined(UNDER_CE) -CustomCCode typedef int intptr_t; -CustomCCode #endif -CustomCCode /* GetProcAddress doesn't exist in A/W variants under desktop Windows */ -CustomCCode #ifndef UNDER_CE -CustomCCode #define GetProcAddressA GetProcAddress -CustomCCode #endif - -ArgumentIsString LoadLibraryW 0 -ArgumentIsString GetProcAddressA 1 -Opaque long HANDLE -Opaque long PROC - -# Hide the platform-specific functions -AccessControl GetLastError PRIVATE -AccessControl LoadLibraryW PRIVATE -AccessControl GetProcAddressA PRIVATE -AccessControl FreeLibrary PRIVATE diff --git a/make/stub_includes/macosx/dynamic-linker.h b/make/stub_includes/macosx/dynamic-linker.h deleted file mode 100755 index a3c2f8d..0000000 --- a/make/stub_includes/macosx/dynamic-linker.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Portions extracted from Mac OS X dlfcn.h */ - -/* - * Copyright (c) 2004-2005 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/* - Based on the dlcompat work done by: - Jorge Acereda <[email protected]> & - Peter O'Gorman <[email protected]> -*/ - -extern int dlclose(void * __handle); -extern char * dlerror(void); -extern void * dlopen(const char * __path, int __mode); -extern void * dlsym(void * __handle, const char * __symbol); - -#define RTLD_LAZY 0x1 -#define RTLD_NOW 0x2 -#define RTLD_LOCAL 0x4 -#define RTLD_GLOBAL 0x8 - -/* - * Special handle arguments for dlsym(). - */ -#define RTLD_NEXT -1LL /* Search subsequent objects. */ -#define RTLD_DEFAULT -2LL /* Use default search algorithm. */ diff --git a/make/stub_includes/unix/dynamic-linker.h b/make/stub_includes/unix/dynamic-linker.h deleted file mode 100644 index 378f1a5..0000000 --- a/make/stub_includes/unix/dynamic-linker.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/include/dlfcn.h,v 1.2.2.3 2000/01/21 02:31:40 jdp Exp $ - * - * See: ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change - */ - - -/* - * Special handle arguments for dlsym()/dlinfo(). - */ -#define RTLD_DEFAULT 0L /* Use default search algorithm. */ -#define RTLD_NEXT -1LL /* Search subsequent objects. */ -#define RTLD_SELF -3LL /* Search the caller itself. */ - -/* - * Modes and flags for dlopen(). - */ -#define RTLD_LAZY 0x1 /* Bind function calls lazily. */ -#define RTLD_NOW 0x2 /* Bind function calls immediately. */ -#define RTLD_MODEMASK 0x3 -#define RTLD_GLOBAL 0x100 /* Make symbols globally available. */ -#define RTLD_LOCAL 0x0 /* Opposite of RTLD_GLOBAL, and the default. */ - -extern void *dlopen(const char *, int); -extern void *dlsym(void *, const char *); -extern int dlclose(void *); -extern char *dlerror(void); - diff --git a/make/stub_includes/windows/dynamic-linker.h b/make/stub_includes/windows/dynamic-linker.h deleted file mode 100755 index 1b06902..0000000 --- a/make/stub_includes/windows/dynamic-linker.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Windows #defines and typedefs required for processing of extracts - from WINDOWS.H */ - -#define FAR -#define WINBASEAPI -#define WINAPI -#define CONST const -#define VOID void -typedef int BOOL; -typedef unsigned char BYTE; -typedef unsigned int DWORD; -typedef int INT; -typedef int INT32; -typedef __int64 INT64; -typedef float FLOAT; -typedef struct _handle* HANDLE; -typedef HANDLE HMODULE; -typedef long LONG; -typedef const char* LPCSTR; -typedef const short* LPCWSTR; -typedef void* LPVOID; -typedef struct _proc* PROC; -typedef unsigned int* PUINT; -typedef unsigned int UINT; -typedef unsigned short USHORT; -typedef unsigned short WORD; - -// Dynamic loading routines -WINBASEAPI DWORD WINAPI GetLastError(VOID); -WINBASEAPI HMODULE WINAPI LoadLibraryW(LPCWSTR lpLibFileName); -WINBASEAPI PROC WINAPI GetProcAddressA(HMODULE hModule, LPCSTR lpProcName); -WINBASEAPI BOOL WINAPI FreeLibrary(HMODULE hLibModule); |