From c91f003551542c2aab62dd8ef89a7894c7e50689 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 15 Jun 2009 22:42:48 +0000 Subject: Copied JOGL_2_SANDBOX r145 on to trunk; JOGL_2_SANDBOX branch is now closed git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@147 a78bb65f-1512-4460-ba86-f6dc96a7bf27 --- make/Manifest | 2 + make/Manifest-rt | 3 + make/build.xml | 530 +++++++++++++++++++ make/dynlink-macosx.cfg | 25 + make/dynlink-unix-CustomJavaCode.java | 18 + make/dynlink-unix.cfg | 22 + make/dynlink-windows-CustomJavaCode.java | 11 + make/dynlink-windows.cfg | 30 ++ make/gluegen-cpptasks.xml | 755 ++++++++++++++++++++++++++++ make/gluegen.compiler.xml | 22 + make/gluegen.properties | 31 ++ make/lib/JOGLDocLinksGeneratorAndLibs.jar | Bin 0 -> 566650 bytes make/lib/cdc_fp.jar | Bin 0 -> 1494529 bytes make/lib/cpptasks-patch.tar.gz | Bin 0 -> 7743 bytes make/lib/cpptasks-version.txt | 4 + make/lib/cpptasks.jar | Bin 0 -> 345356 bytes make/stub_includes/macosx/dynamic-linker.h | 46 ++ make/stub_includes/unix/dynamic-linker.h | 47 ++ make/stub_includes/windows/dynamic-linker.h | 32 ++ make/validate-properties.xml | 51 ++ 20 files changed, 1629 insertions(+) create mode 100755 make/Manifest create mode 100755 make/Manifest-rt create mode 100755 make/build.xml create mode 100755 make/dynlink-macosx.cfg create mode 100755 make/dynlink-unix-CustomJavaCode.java create mode 100755 make/dynlink-unix.cfg create mode 100755 make/dynlink-windows-CustomJavaCode.java create mode 100755 make/dynlink-windows.cfg create mode 100755 make/gluegen-cpptasks.xml create mode 100644 make/gluegen.compiler.xml create mode 100755 make/gluegen.properties create mode 100755 make/lib/JOGLDocLinksGeneratorAndLibs.jar create mode 100755 make/lib/cdc_fp.jar create mode 100644 make/lib/cpptasks-patch.tar.gz create mode 100755 make/lib/cpptasks-version.txt create mode 100755 make/lib/cpptasks.jar create mode 100755 make/stub_includes/macosx/dynamic-linker.h create mode 100755 make/stub_includes/unix/dynamic-linker.h create mode 100755 make/stub_includes/windows/dynamic-linker.h create mode 100755 make/validate-properties.xml (limited to 'make') diff --git a/make/Manifest b/make/Manifest new file mode 100755 index 0000000..1677feb --- /dev/null +++ b/make/Manifest @@ -0,0 +1,2 @@ +Main-Class: com.sun.gluegen.GlueGen +Class-Path: antlr.jar diff --git a/make/Manifest-rt b/make/Manifest-rt new file mode 100755 index 0000000..da817d3 --- /dev/null +++ b/make/Manifest-rt @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Implementation-Title: GlueGen Run-Time +Implementation-Version: @BASEVERSION@ diff --git a/make/build.xml b/make/build.xml new file mode 100755 index 0000000..2dadefc --- /dev/null +++ b/make/build.xml @@ -0,0 +1,530 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/make/dynlink-macosx.cfg b/make/dynlink-macosx.cfg new file mode 100755 index 0000000..8ba4c51 --- /dev/null +++ b/make/dynlink-macosx.cfg @@ -0,0 +1,25 @@ +Style AllStatic +JavaClass MacOSXDynamicLinkerImpl +Package com.sun.gluegen.runtime +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 +CustomCCode #include + +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 new file mode 100755 index 0000000..5d10edf --- /dev/null +++ b/make/dynlink-unix-CustomJavaCode.java @@ -0,0 +1,18 @@ +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 new file mode 100755 index 0000000..d762c8f --- /dev/null +++ b/make/dynlink-unix.cfg @@ -0,0 +1,22 @@ +Style AllStatic +JavaClass UnixDynamicLinkerImpl +Package com.sun.gluegen.runtime +Implements UnixDynamicLinkerImpl DynamicLinker +JavaOutputDir ../src/java +NativeOutputDir ../src/native/unix +HierarchicalNativeOutput false + +IncludeAs CustomJavaCode UnixDynamicLinkerImpl dynlink-unix-CustomJavaCode.java +CustomCCode #include +CustomCCode #include + +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 new file mode 100755 index 0000000..4101f4c --- /dev/null +++ b/make/dynlink-windows-CustomJavaCode.java @@ -0,0 +1,11 @@ +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 new file mode 100755 index 0000000..fe69e1c --- /dev/null +++ b/make/dynlink-windows.cfg @@ -0,0 +1,30 @@ +Style AllStatic +JavaClass WindowsDynamicLinkerImpl +Package com.sun.gluegen.runtime +Implements WindowsDynamicLinkerImpl DynamicLinker +JavaOutputDir ../src/java +NativeOutputDir ../src/native/windows +HierarchicalNativeOutput false + +IncludeAs CustomJavaCode WindowsDynamicLinkerImpl dynlink-windows-CustomJavaCode.java +CustomCCode #include +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/gluegen-cpptasks.xml b/make/gluegen-cpptasks.xml new file mode 100755 index 0000000..b64abfc --- /dev/null +++ b/make/gluegen-cpptasks.xml @@ -0,0 +1,755 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/make/gluegen.compiler.xml b/make/gluegen.compiler.xml new file mode 100644 index 0000000..ee7ebee --- /dev/null +++ b/make/gluegen.compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/make/gluegen.properties b/make/gluegen.properties new file mode 100755 index 0000000..bc5af68 --- /dev/null +++ b/make/gluegen.properties @@ -0,0 +1,31 @@ +############################################################################### +# The host specific properties. The build will inform you of required +# properties. This file must be copied into your home directory (pointed +# to by the Java system property user.home) and the copy modified appropriately. +############################################################################### +# +# The required antlr.jar property that is the full path to the antlr.jar +# including the name of the jar +# +# Windows +antlr.jar=C:/Users/kbr/ANTLR/antlr-2.7.2/antlr.jar +# Linux +# antlr.jar=/home/kbr/antlr-2.7.2/antlr.jar +# Mac OS X +# antlr.jar=/Users/kbr/antlr-2.7.2/antlr.jar +# Solaris +# antlr.jar=/export/kbr/ANTLR/antlr-2.7.2/antlr.jar + +# If you are building the native code for the GlueGen run-time library +# on Windows and have the Microsoft Visual C++ compilers installed, +# you can choose an alternate compiler with which to build the native +# code. Valid strings here are "vc6", "vc7", "vc8", "vc8_x64", "vc9", and +# "mingw". +# win32.c.compiler=vc6 + +# If you are building on a Mac OS X system supporting +# cross-compilation and want to generate fat binaries containing +# x86_64 code, uncomment the property below +# macosx64=true + +#user.compiler.import="${user.home}/gluegen.compiler.xml" diff --git a/make/lib/JOGLDocLinksGeneratorAndLibs.jar b/make/lib/JOGLDocLinksGeneratorAndLibs.jar new file mode 100755 index 0000000..b72764c Binary files /dev/null and b/make/lib/JOGLDocLinksGeneratorAndLibs.jar differ diff --git a/make/lib/cdc_fp.jar b/make/lib/cdc_fp.jar new file mode 100755 index 0000000..ada2e3b Binary files /dev/null and b/make/lib/cdc_fp.jar differ diff --git a/make/lib/cpptasks-patch.tar.gz b/make/lib/cpptasks-patch.tar.gz new file mode 100644 index 0000000..22f1cde Binary files /dev/null and b/make/lib/cpptasks-patch.tar.gz differ diff --git a/make/lib/cpptasks-version.txt b/make/lib/cpptasks-version.txt new file mode 100755 index 0000000..2e7dd72 --- /dev/null +++ b/make/lib/cpptasks-version.txt @@ -0,0 +1,4 @@ +Current cpptasks is from CVS repository at +:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib +as of 10/5/2005 with patches applied for Forte C compiler (Bug +1314266) and fat binary generation on Mac OS X (Bug 1313421). diff --git a/make/lib/cpptasks.jar b/make/lib/cpptasks.jar new file mode 100755 index 0000000..005691c Binary files /dev/null and b/make/lib/cpptasks.jar differ diff --git a/make/stub_includes/macosx/dynamic-linker.h b/make/stub_includes/macosx/dynamic-linker.h new file mode 100755 index 0000000..11afcdc --- /dev/null +++ b/make/stub_includes/macosx/dynamic-linker.h @@ -0,0 +1,46 @@ +/* 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 & + Peter O'Gorman +*/ + +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 new file mode 100755 index 0000000..7071438 --- /dev/null +++ b/make/stub_includes/unix/dynamic-linker.h @@ -0,0 +1,47 @@ +/* Portions extracted from Solaris dlfcn.h */ + +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * Copyright (c) 1989 AT&T + * All Rights Reserved + * + */ + +/* + * Valid values for handle argument to dlsym(3x). + */ +#define RTLD_NEXT -1LL /* look in `next' dependency */ +#define RTLD_DEFAULT -2LL /* look up symbol from scope */ + /* of current object */ +#define RTLD_SELF -3LL /* look in `ourself' */ +#define RTLD_PROBE -4LL /* look up symbol from scope */ + /* of current object, */ + /* using currently */ + /* loaded objects only. */ + +/* + * Valid values for mode argument to dlopen. + */ +#define RTLD_LAZY 0x00001 /* deferred function binding */ +#define RTLD_NOW 0x00002 /* immediate function binding */ +#define RTLD_NOLOAD 0x00004 /* don't load object */ + +#define RTLD_GLOBAL 0x00100 /* export symbols to others */ +#define RTLD_LOCAL 0x00000 /* symbols are only available */ + /* to group members */ +#define RTLD_PARENT 0x00200 /* add parent (caller) to */ + /* a group dependencies */ +#define RTLD_GROUP 0x00400 /* resolve symbols within */ + /* members of the group */ +#define RTLD_WORLD 0x00800 /* resolve symbols within */ + /* global objects */ +#define RTLD_NODELETE 0x01000 /* do not remove members */ +#define RTLD_FIRST 0x02000 /* only first object is */ + /* available for dlsym */ + +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 new file mode 100755 index 0000000..1b06902 --- /dev/null +++ b/make/stub_includes/windows/dynamic-linker.h @@ -0,0 +1,32 @@ +/* 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); diff --git a/make/validate-properties.xml b/make/validate-properties.xml new file mode 100755 index 0000000..195fb2a --- /dev/null +++ b/make/validate-properties.xml @@ -0,0 +1,51 @@ + + + + + + + + + + ******************************************************************** + ** The property "antlr.jar" was not set in the GlueGen properties ** + ** file ** + ** "${user.properties.file}" ** + ** (or this file was not found). ** + ** ** + ** Please set "antlr.jar" to to the full path of the ANTLR jar ** + ** including the jar itself. ** + ******************************************************************** + + + + + + + + ******************************************************************* + ** Your CLASSPATH environment variable appears to be set (some ** + ** GlueGen classes are currently visible to the build.) This can ** + ** cause the build to fail. Please unset your CLASSPATH ** + ** variable and restart the build. ** + ******************************************************************* + + + + + + + + -- cgit v1.2.3