aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/ogl/build-linux-ppc.xml
blob: dce7a6f37c487b42905e0c0a5c3e333388d3718b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0"?>

<!-- Ant file for building native ogl renderer files for Linux PPC -->
<project name="j3d-core native" default="compile">

  <target name="compile">

    <!--
    /*
     * TODO: To compile CG, add the following the the "link" command:
     *    -lCg -lCgGL -lGLU -lpthread
     */
    -->

    <echo message="Executing 32 bit native renderer build [${bldType}]"/>

    <!-- Create the build directories for linux -->
    <mkdir dir="${build}/${platform}/${bldType}/native/ogl/objs"/>
    <mkdir dir="${build}/${platform}/${bldType}/bin"/>
    
    <property name="oglsrc"     location="${src}/native/ogl"/>

    <!-- Compile the c source files-->
    <!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build -->
    <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc">
	<arg line="-w -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I/usr/X11R6/include -I${javahCoreTarget} ${bldFlag} -DLINUX -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c  ${oglsrc}/NativeScreenInfo.c  ${oglsrc}/NativeConfigTemplate3D.c  ${oglsrc}/MasterControl.c  ${oglsrc}/GeometryArrayRetained.c  ${oglsrc}/Attributes.c  ${oglsrc}/CgShaderProgram.c  ${oglsrc}/GLSLShaderProgram.c  ${oglsrc}/Lights.c"/>
    </exec>

    <!-- Create the library file-->
    <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld">
	<arg line="DrawingSurfaceObjectAWT.o  Canvas3D.o  GraphicsContext3D.o  NativeScreenInfo.o  NativeConfigTemplate3D.o  MasterControl.o  GeometryArrayRetained.o  Attributes.o  CgShaderProgram.o  GLSLShaderProgram.o  Lights.o -G -z defs -L/usr/X11R6/lib -ldl -lGL -lX11 -lXext -lm -lnsl -lc  -R/usr/openwin/lib -L${java.home}/bin -ljawt -L${java.home}/bin/classic -ljvm  -o libj3dcore-ogl.so"/>
    </exec>

    <!-- Copy the copyright library file -->
    <copy file="${build}/${platform}/${bldType}/native/ogl/objs/libj3dcore-ogl.so" 
	 todir="${build}/${platform}/${bldType}/bin"/>

  </target>

  <target name="dist">
    <!-- Create the distribution directory -->
    <mkdir dir="${dist}/${platform}/bin"/>

    <!-- Copy the library files -->
    <copy file="${build}/${platform}/opt/bin/libj3dcore-ogl.so"
	 todir="${dist}/${platform}/bin"/>

  </target>

</project>