aboutsummaryrefslogtreecommitdiffstats
path: root/make/gluegen-properties.xml
blob: 2f061fc892faf5fa0cb1c08840e29fdddea52fc6 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="UTF-8"?>
<!--
   - This Ant project file depends on properties being set
   - via gluegen.properties, see: gluegen.properties !
   - 
   - This Ant project file depends on the following properties being set
   - externally:
   - 
   -   gcc.compat.compiler
   -       either "gcc" (default), "clang" or "xcode.clang" (default for OSX)
   -
   -   win32.c.compiler (required to be set on Windows):
   -       one of "vc6", "vc7", "vc8", "mingw32" (default) or "mingw64".
   -   c.compiler.debug:
   -       set to "true" if debug version of the compiled
   -       C code is desired.
   -  
   -   MacOsX libraries can be universal / fat binaries.
   -   The following switches enables/disables a target platform.
   -   If non of them is enabled, the default
   -   compiler target platform is used for a thin binary.
   -
   -   macosppc:
   -       set to "true" for ppc support,
   -       default is 'false'
   -       Note: Unsupported on Snow Leopard!
   -   macosx32:
   -       set to "false" to disable x86 32-bit support,
   -       default is 'true'
   -   macosx64:
   -       set to "false" to disable x86 64-bit support,
   -       default is 'true'
   - 
  -->
<project name="GlueGen-properties" basedir=".">

  <target name="gluegen.properties.load.user" unless="gluegen.user.properties.file.set">
    <property environment="env" />

    <!-- Load the user specified properties file that defines various host
      - specific paths.  The user will be notified if this is does not
      - exist. -->

    <condition property="gluegen.user.properties.file" value="${env.GLUEGEN_PROPERTIES_FILE}" else="${user.home}/gluegen.properties">
      <not>
       <equals arg1="${env.GLUEGEN_PROPERTIES_FILE}" arg2="$${env.GLUEGEN_PROPERTIES_FILE}" casesensitive="true" />
      </not>
    </condition>
    <property name="gluegen.user.properties.file.set" value="${gluegen.user.properties.file}"/>
    <property file="${gluegen.user.properties.file.set}" />
    <echo message="Loaded ${gluegen.user.properties.file.set}." />
    <echo message="Setting defaults:" />
    <property name="antlr.jar" value="${gluegen.root}/make/lib/antlr.jar" />
    <property name="junit.jar" value="${gluegen.root}/make/lib/junit.jar" />
    <property name="ant.jar"       value="${ant.home}/lib/ant.jar" />
    <property name="ant-junit.jar" value="${ant.home}/lib/ant-junit.jar" />
    <property name="ant-junit4.jar" value="${ant.home}/lib/ant-junit4.jar" />
    <property name="semver.jar" value="${gluegen.root}/make/lib/semantic-versioning/semver.jar" />

    <property name="android.api.level" value="24" /> <!-- default - if not set by jogamp-env.xml:jogamp.env.init -->
    <property name="android-min.jar"   value="${gluegen.root}/make/lib/android-sdk/${android.api.level}/android.jar" />
    <property name="android.jar"       value="${android-min.jar}" />
    <condition property="android-jars.available">
        <and>
            <available file="${android-min.jar}"/>
            <available file="${android.jar}"/>
        </and>
    </condition>
    <fail message="isAndroid set, but android jar files n/a: ${android-min.jar}, ${android.jar}">
      <condition>
        <and>
          <isset property="isAndroid"/>
          <not>
              <isset property="android-jars.available"/>
          </not>
        </and>
      </condition>
    </fail>

    <property name="android.keystore.file" value="/non.existing.user.keystore.file"/> <!-- default - maybe overriden by the gluegen.user.properties.file -->
    <property name="android.keystore.alias" value="debug_alias"/>
    <property name="android.keystore.storepass" value="jogamp"/>
    <property name="android.keystore.keypass" value="jogamp"/>

    <property name="ant-junit-all.apk" value="${gluegen.root}/make/lib/ant-junit-all.apk" />

    <!-- maybe overriden, e.g. with "clang" -->
    <echo message="Setting default gcc.compat.compiler" />
    <condition property="gcc.compat.compiler" value="xcode.clang"> <!-- default for OSX -->
      <or>
          <istrue value="${isOSX}"/> 
          <istrue value="${isIOS}"/> 
          <istrue value="${isIOSAmd64}"/> 
          <istrue value="${isIOSArm64}"/> 
          <and>
            <os family="mac"/>
            <os family="unix"/>
          </and>
      </or>
    </condition>
    <property name="gcc.compat.compiler" value="gcc"/>             <!-- default for all others .. -->
    <echo message="gcc.compat.compiler=${gcc.compat.compiler}" />

    <condition property="win32.c.compiler" value="mingw64">
      <and>
        <os family="windows" />
        <os arch="amd64" />
      </and>
    </condition>
    <condition property="win32.c.compiler" value="mingw32">
      <and>
        <os family="windows" />
        <or>
          <os arch="i386" />
          <os arch="x86" />
        </or>
      </and>
    </condition>
    <echo message="antlr.jar=${antlr.jar}" />
    <echo message="junit.jar=${junit.jar}" />
    <echo message="win32.c.compiler=${win32.c.compiler}" />
  </target>

</project>