diff options
-rw-r--r-- | make/build.xml | 27 | ||||
-rw-r--r-- | src/native/jogl/JAWT_DrawingSurfaceInfo.c | 2 | ||||
-rw-r--r-- | src/net/java/games/gluegen/StructLayout.java | 5 |
3 files changed, 31 insertions, 3 deletions
diff --git a/make/build.xml b/make/build.xml index 29649d06d..7ce104390 100644 --- a/make/build.xml +++ b/make/build.xml @@ -198,6 +198,7 @@ <property name="java.includes.dir.linux" value="${java.includes.dir}/linux" /> <property name="java.includes.dir.solaris" value="${java.includes.dir}/solaris" /> <property name="java.includes.dir.macosx" value="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers" /> + <property name="java.includes.dir.freebsd" value="${java.includes.dir}/freebsd" /> <property name="java.lib.dir.win32" value="${java.home.dir}/lib" /> <property name="java.lib.dir.linux" value="${java.home.dir}/jre/lib/i386" /> <property name="java.lib.dir.linux.amd64" value="${java.home.dir}/jre/lib/amd64" /> @@ -320,6 +321,14 @@ <property name="linker.cfg.id" value="linker.cfg.linux.amd64" /> </target> + <target name="declare.freebsd" depends="declare.x11"> + <property name="java.includes.dir.platform" value="${java.includes.dir.freebsd}" /> + <property name="java.lib.dir.platform" value="${java.lib.dir.linux}" /> + + <property name="compiler.cfg.id" value="compiler.cfg.freebsd" /> + <property name="linker.cfg.id" value="linker.cfg.linux" /> + </target> + <target name="declare.solaris" depends="declare.x11"> <property name="java.includes.dir.platform" value="${java.includes.dir.solaris}" /> <property name="java.lib.dir.platform" value="${java.lib.dir.solaris}" /> @@ -710,6 +719,10 @@ </defineset> </compiler> + <compiler id="compiler.cfg.freebsd" name="gcc"> + <includepath path="/usr/X11R6/include" /> + </compiler> + <!-- linker configuration --> <linker id="linker.cfg.linux" name="gcc"> @@ -870,6 +883,9 @@ <target name="c.compile.jogl.macosx" depends="declare.macosx, c.build.jogl, c.build.cg"> </target> + <target name="c.compile.jogl.freebsd" depends="declare.freebsd, c.build.jogl, c.build.cg" > + </target> + <!-- ================================================================== --> <!-- - Build the jogl.jar file. @@ -1100,4 +1116,15 @@ Use a platform specific target: linux, linux.amd64, macosx, solaris, win32.vc6, <!-- Compile the native C sources and build the jogl lib. --> <antcall target="c.compile.jogl.macosx" /> </target> + + <!-- + - FreeBSD (assuming GCC) + --> + <target name="freebsd" depends="declare.freebsd"> + <!-- Generate, compile, and build the jar for the Java sources. --> + <antcall target="jar" inheritRefs="true" /> + + <!-- Compile the native C sources and build the jogl lib. --> + <antcall target="c.compile.jogl.freebsd" /> + </target> </project> diff --git a/src/native/jogl/JAWT_DrawingSurfaceInfo.c b/src/native/jogl/JAWT_DrawingSurfaceInfo.c index 523bfba3e..59c575f0c 100644 --- a/src/native/jogl/JAWT_DrawingSurfaceInfo.c +++ b/src/native/jogl/JAWT_DrawingSurfaceInfo.c @@ -42,7 +42,7 @@ #ifdef WIN32 #define PLATFORM_DSI_SIZE sizeof(JAWT_Win32DrawingSurfaceInfo) static const char* platformDSIClassName = "net/java/games/jogl/impl/windows/JAWT_Win32DrawingSurfaceInfo"; -#elif defined(linux) || defined(__sun) +#elif defined(linux) || defined(__sun) || defined(__FreeBSD__) #define PLATFORM_DSI_SIZE sizeof(JAWT_X11DrawingSurfaceInfo) static const char* platformDSIClassName = "net/java/games/jogl/impl/x11/JAWT_X11DrawingSurfaceInfo"; #elif defined(macosx) diff --git a/src/net/java/games/gluegen/StructLayout.java b/src/net/java/games/gluegen/StructLayout.java index 7e32df683..ebbace6b5 100644 --- a/src/net/java/games/gluegen/StructLayout.java +++ b/src/net/java/games/gluegen/StructLayout.java @@ -125,8 +125,9 @@ public class StructLayout { (os.startsWith("linux") && cpu.equals("i386")) || (os.startsWith("linux") && cpu.equals("amd64")) || (os.startsWith("sunos") && cpu.equals("sparc")) || - (os.startsWith("sunos") && cpu.equals("x86"))|| - (os.startsWith("mac os") && cpu.equals("ppc")) + (os.startsWith("sunos") && cpu.equals("x86")) || + (os.startsWith("mac os") && cpu.equals("ppc")) || + (os.startsWith("freebsd") && cpu.equals("i386")) ) { // FIXME: make struct alignment configurable? May need to change // packing rules on a per-type basis? |