aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsg215889 <[email protected]>2009-07-15 02:01:48 -0700
committersg215889 <[email protected]>2009-07-15 02:01:48 -0700
commitf5389b978ffb8fb229ad1b6db4cb7c957818e5f4 (patch)
treeb864a678972f95a502309b11814b8e4b57fa4d7d
parent27b11223399cba943018a2f18908c4e8e5696b8f (diff)
Build CDC named JARs for CVM in default build, no more specialized build necessary. Fix PointerBuffer allocateDirect()
-rwxr-xr-xmake/build.xml110
-rwxr-xr-xmake/gluegen-cpptasks.xml9
-rw-r--r--make/make.gluegen.all.macosx.sh (renamed from make/make.gluegen.cdcfp.macosx.sh)5
-rw-r--r--make/make.gluegen.cdcfp.linux-x86.sh15
4 files changed, 73 insertions, 66 deletions
diff --git a/make/build.xml b/make/build.xml
index 4537582..90319d6 100755
--- a/make/build.xml
+++ b/make/build.xml
@@ -43,46 +43,49 @@
<property name="gluegen.excludes" value="com/sun/gluegen/runtime/BufferFactoryInternal.java,com/sun/gluegen/nativesig/**" />
</target>
- <target name="init.javame.cdc.fp" if="isCDCFP">
- <property name="javac.bootclasspath.jar" value="lib/cdc_fp.jar" />
+ <target name="setup.javase">
+ <copy file="../src/java/com/sun/gluegen/runtime/BufferFactory.java.javase" tofile="${src.generated.java}/com/sun/gluegen/runtime/BufferFactory.java" />
+ <copy file="../src/java/com/sun/gluegen/runtime/StructAccessor.java.javase" tofile="${src.generated.java}/com/sun/gluegen/runtime/StructAccessor.java" />
+ <copy file="../src/java/com/sun/gluegen/runtime/PointerBuffer.java.javase" tofile="${src.generated.java}/com/sun/gluegen/runtime/PointerBuffer.java" />
</target>
- <target name="setup.javase" unless="isCDCFP">
- <copy file="../src/java/com/sun/gluegen/runtime/BufferFactory.java.javase" tofile="../${rootrel.build}/gensrc/java/com/sun/gluegen/runtime/BufferFactory.java" />
- <copy file="../src/java/com/sun/gluegen/runtime/StructAccessor.java.javase" tofile="../${rootrel.build}/gensrc/java/com/sun/gluegen/runtime/StructAccessor.java" />
- <copy file="../src/java/com/sun/gluegen/runtime/PointerBuffer.java.javase" tofile="../${rootrel.build}/gensrc/java/com/sun/gluegen/runtime/PointerBuffer.java" />
+ <target name="setup.javacdc">
+ <copy file="../src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp" tofile="${src.generated-cdc.java}/com/sun/gluegen/runtime/BufferFactory.java" />
+ <copy file="../src/java/com/sun/gluegen/runtime/StructAccessor.java.javame_cdc_fp" tofile="${src.generated-cdc.java}/com/sun/gluegen/runtime/StructAccessor.java" />
+ <copy file="../src/java/com/sun/gluegen/runtime/PointerBuffer.java.javame_cdc_fp" tofile="${src.generated-cdc.java}/com/sun/gluegen/runtime/PointerBuffer.java" />
</target>
- <target name="setup.javame.cdc.fp" if="isCDCFP">
- <copy file="../src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp" tofile="../${rootrel.build}/gensrc/java/com/sun/gluegen/runtime/BufferFactory.java" />
- <copy file="../src/java/com/sun/gluegen/runtime/StructAccessor.java.javame_cdc_fp" tofile="../${rootrel.build}/gensrc/java/com/sun/gluegen/runtime/StructAccessor.java" />
- <copy file="../src/java/com/sun/gluegen/runtime/PointerBuffer.java.javame_cdc_fp" tofile="../${rootrel.build}/gensrc/java/com/sun/gluegen/runtime/PointerBuffer.java" />
- </target>
-
- <target name="init" depends="load.user.properties,setup-excludes-1,setup-excludes-2,init.javame.cdc.fp">
+ <target name="init" depends="load.user.properties,setup-excludes-1,setup-excludes-2">
<!-- Declare all paths and user defined variables. -->
+ <property name="javac.bootclasspath-cdc.jar" value="lib/cdc_fp.jar" />
+
<!-- The source directories. -->
<property name="src.java" value="../src/java" />
<property name="build" value="../${rootrel.build}" />
<!-- The generated source directories. -->
- <property name="src.generated" value="../${rootrel.build}/gensrc" />
- <property name="src.generated.java" value="../${rootrel.build}/gensrc/java" />
+ <property name="src.generated" value="${build}/gensrc" />
+ <property name="src.generated-cdc" value="${build}/gensrc-cdc" />
+ <property name="src.generated.java" value="${src.generated}/java" />
+ <property name="src.generated-cdc.java" value="${src.generated-cdc}/java" />
<!-- The compiler output directories. -->
<property name="classes" value="${build}/classes" />
+ <property name="classes-cdc" value="${build}/classes-cdc" />
<!-- Call the external config validator script to make sure the config is ok and consistent -->
<ant antfile="validate-properties.xml" inheritall="true"/>
<!-- Create the required output directories. -->
<mkdir dir="${src.generated.java}" />
+ <mkdir dir="${src.generated-cdc.java}" />
<mkdir dir="${classes}" />
+ <mkdir dir="${classes-cdc}" />
- <!-- Set up compilation for either Java SE or Java ME / CDC / FP. -->
- <antcall target="setup.javase" inheritRefs="true" />
- <antcall target="setup.javame.cdc.fp" inheritRefs="true" />
+ <!-- Set up compilation for either Java SE or Java CDC -->
+ <antcall target="setup.javase" inheritRefs="true" />
+ <antcall target="setup.javacdc" inheritRefs="true" />
<!-- Create the classpath for ANTLR. This requires the user-defined
- "antlr.jar" property. -->
@@ -324,18 +327,17 @@
<target name="c.rename.lib.mingw" if="isMingW">
<!-- FIXME: this is a hack; the cpptask should have an option to change the
suffix or at least understand the override from .so to .dll -->
- <move file="../${rootrel.build}/obj/libgluegen-rt.so" tofile="../${rootrel.build}/obj/gluegen-rt.dll" />
+ <move file="${build}/obj/libgluegen-rt.so" tofile="${build}/obj/gluegen-rt.dll" />
</target>
<target name="c.rename.lib.macosx" if="isOSX">
- <!-- FIXME: this is a hack; the cpptask should have an option to change the
- suffix or at least understand the override from dylib to jnilib -->
- <move file="../${rootrel.build}/obj/libgluegen-rt.dylib" tofile="../${rootrel.build}/obj/libgluegen-rt.jnilib" />
+ <move file="${build}/obj/libgluegen-rt.dylib" tofile="${build}/obj/libgluegen-rt.jnilib" />
+ <copy file="${build}/obj/libgluegen-rt.jnilib" tofile="${build}/obj/libgluegen-rt.so" />
</target>
<target name="c.manifest" if="isVC8Family">
<!-- exec mt, the Microsoft Manifest Tool, to include DLL manifests in order to resolve the location of msvcr80.dll -->
- <msvc.manifest objdir="../${rootrel.build}/obj" dllname="gluegen-rt" />
+ <msvc.manifest objdir="${build}/obj" dllname="gluegen-rt" />
</target>
<target name="c.build" depends="c.configure" unless="build.javaonly" >
@@ -353,14 +355,14 @@
<condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>
- <mkdir dir="../${rootrel.build}/obj" />
+ <mkdir dir="${build}/obj" />
<echo message="Compiling ${c.compiler.src.files}" />
<echo message="user.dir=${user.dir}" />
<cc outtype="shared"
- objdir="../${rootrel.build}/obj"
- outfile="../${rootrel.build}/obj/${output.lib.name}"
+ objdir="${build}/obj"
+ outfile="${build}/obj/${output.lib.name}"
optimize="${c.compiler.optimise}"
debug="${c.compiler.debug}"
multithreaded="true"
@@ -393,30 +395,39 @@
<antcall target="c.rename.lib.macosx" inheritRefs="true" />
<antcall target="c.manifest" inheritRefs="true" />
<!-- Create Java Web Start jar file from built file -->
- <jar destfile="../${rootrel.build}/gluegen-rt-natives-${os.and.arch}.jar">
- <fileset dir="../${rootrel.build}/obj">
+ <jar destfile="${build}/gluegen-rt-natives-${os.and.arch}.jar">
+ <fileset dir="${build}/obj">
<include name="*gluegen-rt.${native.library.suffix}" />
</fileset>
</jar>
+ <jar destfile="${build}/gluegen-rt-cdc-natives-${os.and.arch}.jar">
+ <fileset dir="${build}/obj">
+ <include name="*gluegen-rt.${native.library.suffix-cdc}" />
+ </fileset>
+ </jar>
</target>
<target name="build.nativelibrary" unless="build.javaonly" >
<antcall target="c.build" inheritRefs="true" />
</target>
+ <target name="gluegen.build.gluegen-rt-cdc" >
+ <!-- Build just the gluegen-rt-cdc.jar classes using the Java CDC
+ boot classes -->
+ <copy todir="${classes-cdc}">
+ <fileset dir="${classes}"
+ includes="com/** net/**"
+ excludes="com/sun/gluegen/runtime/** com/sun/gluegen/test/**" />
+ </copy>
- <target name="gluegen.rebuild.gluegen-rt" if="isCDCFP">
- <!-- Re-build just the gluegen-rt.jar classes using the Java ME
- boot classes, if they're in use. -->
- <delete dir="../${rootrel.build}/classes/com/sun/gluegen/runtime" />
- <javac destdir="${classes}"
+ <javac destdir="${classes-cdc}"
source="1.4"
debug="true"
debuglevel="source,lines"
excludes="${gluegen.excludes}"
- bootclasspath="${javac.bootclasspath.jar}">
+ bootclasspath="${javac.bootclasspath-cdc.jar}">
<src path="${src.java}" />
- <src path="${src.generated.java}" />
+ <src path="${src.generated-cdc.java}" />
<classpath refid="antlr.classpath" />
</javac>
</target>
@@ -485,14 +496,6 @@
<classpath refid="antlr.classpath" />
</javac>
- <!-- Re-build just the gluegen-rt.jar classes using the Java ME
- boot classes, if they're in use. -->
- <antcall target="gluegen.rebuild.gluegen-rt" inheritRefs="true" />
-
- <!-- Build the (native code) NativeLibrary support for
- gluegen-rt.jar using the just-built GlueGen. -->
- <antcall target="build.nativelibrary" inheritRefs="true" />
-
<!-- Build gluegen.jar. -->
<jar destfile="${build}/gluegen.jar" manifest="Manifest">
<fileset dir="${classes}">
@@ -500,7 +503,6 @@
</fileset>
</jar>
- <!-- Build gluegen-rt.jar. -->
<copy file="Manifest-rt"
tofile="${build}/Manifest-rt.temp"
overwrite="true">
@@ -508,6 +510,8 @@
<filter token="BASEVERSION" value="${gluegen_base_version}"/>
</filterset>
</copy>
+
+ <!-- Build gluegen-rt.jar. -->
<jar destfile="${build}/gluegen-rt.jar" manifest="${build}/Manifest-rt.temp">
<fileset dir="${classes}">
<include name="com/sun/gluegen/runtime/*.class" />
@@ -515,6 +519,22 @@
</fileset>
</jar>
+ <!-- Build the (native code) NativeLibrary support for
+ gluegen-rt[-cdc].jar using the just-built GlueGen. -->
+ <antcall target="build.nativelibrary" inheritRefs="true" />
+
+ <!-- Build just the gluegen-rt-cdc.jar classes using the Java CDC
+ boot classes. -->
+ <antcall target="gluegen.build.gluegen-rt-cdc" inheritRefs="true" />
+
+ <!-- Build gluegen-rt-cdc.jar. -->
+ <jar destfile="${build}/gluegen-rt-cdc.jar" manifest="${build}/Manifest-rt.temp">
+ <fileset dir="${classes-cdc}">
+ <include name="com/sun/gluegen/runtime/*.class" />
+ <include name="com/sun/gluegen/runtime/opengl/*.class" />
+ </fileset>
+ </jar>
+
<!-- Copy antlr.jar into build directory for convenience so
gluegen.jar can be run via "java -jar". antlr.jar is
referenced via a Class-Path entry in the Manifest of
@@ -526,7 +546,7 @@
<target name="clean">
<delete includeEmptyDirs="true" quiet="true">
- <fileset dir="../${rootrel.build}" />
+ <fileset dir="${build}" />
</delete>
</target>
</project>
diff --git a/make/gluegen-cpptasks.xml b/make/gluegen-cpptasks.xml
index 0e9f6af..48f6520 100755
--- a/make/gluegen-cpptasks.xml
+++ b/make/gluegen-cpptasks.xml
@@ -317,7 +317,8 @@
<target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86" unless="gluegen.cpptasks.detected.os.2" />
<target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
- <property name="native.library.suffix" value="*lib" />
+ <property name="native.library.suffix" value="*lib" />
+ <property name="native.library.suffix-cdc" value="so" />
<property name="os.and.arch" value="macosx-universal" />
</target>
@@ -340,7 +341,8 @@
<target name="gluegen.cpptasks.detect.os.solaris" depends="gluegen.cpptasks.detect.os.solaris.sparc,gluegen.cpptasks.detect.os.solaris.sparcv9,gluegen.cpptasks.detect.os.solaris.amd64,gluegen.cpptasks.detect.os.solaris.x86" unless="gluegen.cpptasks.detected.os.2" />
<target name="gluegen.cpptasks.detect.os.unix" unless="gluegen.cpptasks.detected.os.2" if="isUnix">
- <property name="native.library.suffix" value="so" />
+ <property name="native.library.suffix" value="so" />
+ <property name="native.library.suffix-cdc" value="so" />
</target>
<target name="gluegen.cpptasks.detect.os.windows.amd64" unless="gluegen.cpptasks.detected.os.2" if="isWindowsAMD64">
@@ -352,7 +354,8 @@
</target>
<target name="gluegen.cpptasks.detect.os.windows" depends="gluegen.cpptasks.detect.os.windows.amd64,gluegen.cpptasks.detect.os.windows.x86" unless="gluegen.cpptasks.detected.os.2" if="isWindows">
- <property name="native.library.suffix" value="dll" />
+ <property name="native.library.suffix" value="dll" />
+ <property name="native.library.suffix-cdc" value="dll" />
</target>
<target name="gluegen.cpptasks.detect.os.2" depends="gluegen.cpptasks.detect.os.freebsd,gluegen.cpptasks.detect.os.hpux,gluegen.cpptasks.detect.os.linux,gluegen.cpptasks.detect.os.osx,gluegen.cpptasks.detect.os.solaris,gluegen.cpptasks.detect.os.unix,gluegen.cpptasks.detect.os.windows" unless="gluegen.cpptasks.detected.os.2">
diff --git a/make/make.gluegen.cdcfp.macosx.sh b/make/make.gluegen.all.macosx.sh
index 016cb8d..3086733 100644
--- a/make/make.gluegen.cdcfp.macosx.sh
+++ b/make/make.gluegen.all.macosx.sh
@@ -7,6 +7,5 @@ fi
# -Dc.compiler.debug=true
ant -v \
- -DisCDCFP=true \
- -Drootrel.build=build-cdcfp-macosx \
- $* 2>&1 | tee make.gluegen.cdcfp.macosx-x86.log
+ -Drootrel.build=build-macosx \
+ $* 2>&1 | tee make.gluegen.all.macosx-x86.log
diff --git a/make/make.gluegen.cdcfp.linux-x86.sh b/make/make.gluegen.cdcfp.linux-x86.sh
deleted file mode 100644
index cc02d0f..0000000
--- a/make/make.gluegen.cdcfp.linux-x86.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh
-
-. ../../setenv-build-jogl-x86.sh
-
-# -Dc.compiler.debug=true
-
-ant -v \
- -DisCDCFP=true \
- -Drootrel.build=build-cdcfp-x86 \
- -Dgluegen.cpptasks.detected.os=true \
- -DisUnix=true \
- -DisLinux=true \
- -DisLinuxX86=true \
- -DisX11=true \
- $* 2>&1 | tee make.gluegen.cdcfp.linux-x86.log