summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rwxr-xr-xmake/build.xml38
-rw-r--r--make/gluegen.compiler.xml3
-rwxr-xr-xmake/gluegen.properties2
3 files changed, 26 insertions, 17 deletions
diff --git a/make/build.xml b/make/build.xml
index da090e5..904b16c 100755
--- a/make/build.xml
+++ b/make/build.xml
@@ -29,6 +29,12 @@
<echo message="antlr.jar=${antlr.jar}" />
</target>
+ <condition property="rootrel.build" value="build">
+ <not>
+ <isset property="rootrel.build"/>
+ </not>
+ </condition>
+
<target name="setup-excludes-1" if="gluegen.nsig">
<property name="gluegen.excludes" value="" />
</target>
@@ -42,13 +48,13 @@
</target>
<target name="setup.javase" unless="isCDCFP">
- <copy file="../src/java/com/sun/gluegen/runtime/BufferFactory.java.javase" tofile="../build/gensrc/java/com/sun/gluegen/runtime/BufferFactory.java" />
- <copy file="../src/java/com/sun/gluegen/runtime/StructAccessor.java.javase" tofile="../build/gensrc/java/com/sun/gluegen/runtime/StructAccessor.java" />
+ <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" />
</target>
<target name="setup.javame.cdc.fp" if="isCDCFP">
- <copy file="../src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp" tofile="../build/gensrc/java/com/sun/gluegen/runtime/BufferFactory.java" />
- <copy file="../src/java/com/sun/gluegen/runtime/StructAccessor.java.javame_cdc_fp" tofile="../build/gensrc/java/com/sun/gluegen/runtime/StructAccessor.java" />
+ <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" />
</target>
<target name="init" depends="load.user.properties,setup-excludes-1,setup-excludes-2,init.javame.cdc.fp">
@@ -56,11 +62,11 @@
<!-- The source directories. -->
<property name="src.java" value="../src/java" />
- <property name="build" value="../build" />
+ <property name="build" value="../${rootrel.build}" />
<!-- The generated source directories. -->
- <property name="src.generated" value="../build/gensrc" />
- <property name="src.generated.java" value="../build/gensrc/java" />
+ <property name="src.generated" value="../${rootrel.build}/gensrc" />
+ <property name="src.generated.java" value="../${rootrel.build}/gensrc/java" />
<!-- The compiler output directories. -->
<property name="classes" value="${build}/classes" />
@@ -310,13 +316,13 @@
<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="../build/obj/libgluegen-rt.so" tofile="../build/obj/gluegen-rt.dll" />
+ <move file="../${rootrel.build}/obj/libgluegen-rt.so" tofile="../${rootrel.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="../build/obj/libgluegen-rt.dylib" tofile="../build/obj/libgluegen-rt.jnilib" />
+ <move file="../${rootrel.build}/obj/libgluegen-rt.dylib" tofile="../${rootrel.build}/obj/libgluegen-rt.jnilib" />
</target>
<target name="c.build" depends="c.configure" unless="build.javaonly" >
@@ -334,14 +340,14 @@
<condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>
- <mkdir dir="../build/obj" />
+ <mkdir dir="../${rootrel.build}/obj" />
<echo message="Compiling ${c.compiler.src.files}" />
<echo message="user.dir=${user.dir}" />
<cc outtype="shared"
- objdir="../build/obj"
- outfile="../build/obj/${output.lib.name}"
+ objdir="../${rootrel.build}/obj"
+ outfile="../${rootrel.build}/obj/${output.lib.name}"
optimize="${c.compiler.optimise}"
debug="${c.compiler.debug}"
multithreaded="true"
@@ -373,8 +379,8 @@
<antcall target="c.rename.lib.mingw" inheritRefs="true" />
<antcall target="c.rename.lib.macosx" inheritRefs="true" />
<!-- Create Java Web Start jar file from built file -->
- <jar destfile="../build/gluegen-rt-natives-${os.and.arch}.jar">
- <fileset dir="../build/obj">
+ <jar destfile="../${rootrel.build}/gluegen-rt-natives-${os.and.arch}.jar">
+ <fileset dir="../${rootrel.build}/obj">
<include name="*gluegen-rt.${native.library.suffix}" />
</fileset>
</jar>
@@ -388,7 +394,7 @@
<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="../build/classes/com/sun/gluegen/runtime" />
+ <delete dir="../${rootrel.build}/classes/com/sun/gluegen/runtime" />
<javac destdir="${classes}"
source="1.4"
debug="true"
@@ -506,7 +512,7 @@
<target name="clean">
<delete includeEmptyDirs="true" quiet="true">
- <fileset dir="../build" />
+ <fileset dir="../${rootrel.build}" />
</delete>
</target>
</project>
diff --git a/make/gluegen.compiler.xml b/make/gluegen.compiler.xml
index c911553..ee7ebee 100644
--- a/make/gluegen.compiler.xml
+++ b/make/gluegen.compiler.xml
@@ -8,6 +8,9 @@
<compilerarg value="-I/devtools/i686-unknown-linux-gnu/include" />
<compilerarg value="-I/devtools/share/include" />
<compilerarg value="-I/devtools/i686-unknown-linux-gnu/xfree86-4.3.0-linux-ix86-glibc23/include" />
+ <defineset>
+ <define name="LINUX" />
+ </defineset>
</compiler>
<linker id="linker.cfg.linux" name="gcc">
diff --git a/make/gluegen.properties b/make/gluegen.properties
index 4f70334..29776df 100755
--- a/make/gluegen.properties
+++ b/make/gluegen.properties
@@ -21,7 +21,7 @@ antlr.jar=C:/Users/kbr/ANTLR/antlr-2.7.2/antlr.jar
# you can choose an alternate compiler with which to build the native
# code. Valid strings here are "vc6", "vc7", "vc8", "vc8_x64", and
# "mingw".
-win32.c.compiler=vc6
+# win32.c.compiler=vc6
# If you are building on a Mac OS X system supporting
# cross-compilation and want to generate fat binaries containing