aboutsummaryrefslogtreecommitdiffstats
path: root/make/build.xml
blob: 92e4188a8b182fa827c3d22b0b337dd5eec86587 (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
<?xml version="1.0" encoding="UTF-8"?>
<!--
   - Ant build for JOGL.  This build has been tested with ANT 1.7.0.  The
   - optional.jar that contains the optional ANT tasks must be in the ANT
   - classpath (typically the ant/lib directory).
   -
   - A clean download of JOGL is required for this build.
   -
   - This build has no dependence on environment variables; the needed
   - ones (e.g. java.home, ANT_HOME) are all set by the Ant wrapper shell
   - script, by the virtual machine, or elsewhere. However, on all platforms,
   - the C compiler and linker should be in the path. All other paths that
   - need to be set are in host.properties.
   -
   - NOTE:  because the GlueGen config files have their own relative paths
   -        which cannot be overridden by GlueGen, GlueGen MUST be run from
   -        the "make" directory. This also means that this build.xml MUST
   -        be run from the "make" directory.
   -
   - Public targets:
   -   all: (default; autodetects OS and chooses C compiler from jogl.properties)
   -   clean:        clean all built
   -   javadoc:      create the standard developer Javadoc (recommended)
   -                 (Note: should build all first - may be dependence in the future)
   -   javadoc.spec:   create the standard developer Javadoc but exclude com.sun.* classes
   -   javadoc.dev.all: create the internal developer Javadoc.  This includes the
   -                       Java and C file generators. Note that it is only supported
   -                       to create the Javadoc for the platform on which you are
   -                       currently running.
   - 
   - Note: on Windows the "win32.c.compiler" property in jogl.properties
   - is required to select the appropriate C compiler. See the example
   - jogl.properties in this directory for valid values. On Mac OS X
   - universal binaries may also be built by setting the "macosxfat"
   - property in jogl.properties; again see the example file in this
   - directory.
   -   
   - Optional properties:
   -   -Djogl.cg=1 when combined with the build or javadoc targets will cause
   -   the experimental binding to NVidia's Cg language to be built.
   -
   - Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
   - ANT build, including the GlueGen and StaticGLInfo tasks, the building of
   - the Java generated sources, the first and second phase Java compiles, and
   - the building of the jar file. Thanks to Alex Radeski for the bulk of the
   - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for
   - the original OS detection code.
   -
   - Some environment defs affecting compilation

       jogl.cdcfp     - Using the CDC Java runtime library
                            - no DoubleBuffer 
                            - no LongBuffer

                        This will set
                            -> jogl.noAWT
                            -> jogl.nogl2

   - Internal settings, may not be necessary to set them manually,
     since all JAR archives are orthogonal.
       jogl.noes1
       jogl.noes2
       jogl.nogl2
       jogl.noAWT
       jogl.noutil    - no com.sun.opengl.util.*
       jogl.nonewt 
       jogl.noX11WindowsMacOsX, which implies:
           jogl.noX11
           jogl.noWindows
           jogl.noMacOsX
   -->
<project name="JOGL" basedir="." default="all">

  <!-- This is the version of JOGL you are building -->
  <property name="base_version" value="1.1.1-rc8"/>
    
  <!-- Uncomment this property definition to cause a full release build to be done -->
  <!-- without needing to specify the RI target on the command line  -->
  <property name="RImanifestfile" value="joglRIversion" />

  <!-- Pull in GlueGen cpptasks build file -->
  <property name="gluegen.root" value="../../gluegen" />
  <import file="${gluegen.root}/make/gluegen-cpptasks.xml" />

  <available file="${user.home}/jogl.compiler.xml" property="jogl.compiler.present"/>
  <import file="${user.home}/jogl.compiler.xml" optional="true" />

    <!-- ================================================================== -->
    <!-- 
       - Base initialization and detection of operating system.
      -->
    <target name="base.init">

        <condition property="jogl.noes">
           <and>
               <isset property="jogl.noes1"/> 
               <isset property="jogl.noes2"/> 
           </and>
        </condition>

        <condition property="jogl.nogl2">
           <isset property="jogl.cdcfp"/> 
        </condition>
        <condition property="jogl.noAWT">
           <isset property="jogl.cdcfp"/> 
        </condition>
        <condition property="isCDCFP">
           <isset property="jogl.cdcfp"/>
        </condition>
        <condition property="javac.bootclasspath.jar"
                   value="../../gluegen/make/lib/cdc_fp.jar">
           <isset property="jogl.cdcfp"/> 
        </condition>
        <echo message="jogl.cdcfp: ${jogl.cdcfp}" />
        <echo message="jogl.noAWT: ${jogl.noAWT}" />
        <echo message="javac.bootclasspath.jar: ${javac.bootclasspath.jar}" />
        <echo message="jogl.noes : ${jogl.noes}" />
        <echo message="jogl.noes1: ${jogl.noes1}" />
        <echo message="jogl.noes2: ${jogl.noes2}" />
        <echo message="jogl.nogl2: ${jogl.nogl2}" />

        <condition property="jogl.noX11WindowsMacOsX">
          <and>
           <isset property="jogl.noX11"/> 
           <isset property="jogl.noWindows"/> 
           <isset property="jogl.noMacOsX"/> 
          </and>
        </condition>

        <condition property="jogl.noX11">
            <isset property="jogl.noX11WindowsMacOsX"/>
        </condition>

        <condition property="jogl.noWindows">
            <isset property="jogl.noX11WindowsMacOsX" />
        </condition>

        <condition property="jogl.noMacOsX">
            <isset property="jogl.noX11WindowsMacOsX" />
        </condition>

        <echo message="jogl.noX11WindowsMacOsX: ${jogl.noX11WindowsMacOsX}" />
        <echo message="jogl.noX11: ${jogl.noX11}" />
        <echo message="jogl.noWindows: ${jogl.noWindows}" />
        <echo message="jogl.noMacOsX: ${jogl.noMacOsX}" />

        <!-- partitioning -->

        <property name="java.part.egl"
                  value="com/sun/opengl/impl/egl/*"/>

        <property name="java.part.glutess"
                  value="com/sun/opengl/impl/glu/tessellator/**"/>

        <property name="java.part.glumipmap"
                  value="com/sun/opengl/impl/glu/mipmap/**"/>

        <property name="java.part.glugl2"
                  value="com/sun/opengl/impl/glu/gl2/**, com/sun/opengl/impl/glu/nurbs/**, com/sun/opengl/impl/glu/registry/**, javax/media/opengl/glu/gl2/**"/>

        <property name="java.part.glsl"
                  value="javax/media/opengl/glsl/**, com/sun/opengl/impl/glsl/**"/>

        <property name="java.part.sdk"
                  value="javax/media/opengl/sdk/**"/>

        <property name="java.part.glsl.fixed"
                  value="com/sun/opengl/impl/glsl/fixed/**"/>

        <property name="java.part.gl2es12.x11"
                  value="com/sun/opengl/impl/gl2es12/**, com/sun/opengl/impl/x11/glx/*, com/sun/opengl/impl/x11/*"/>

        <property name="java.part.gl2es12.win"
                  value="com/sun/opengl/impl/gl2es12/**, com/sun/opengl/impl/windows/wgl/*"/>

        <property name="java.part.gl2es12.osx"
                  value="com/sun/opengl/impl/gl2es12/**, com/sun/opengl/impl/macosx/cgl/*"/>

        <property name="java.part.gl2es12.dbg"
                  value="javax/media/opengl/TraceGL2ES12.*, javax/media/opengl/DebugGL2ES12.*"/>

        <property name="java.part.gl2.x11"
                  value="com/sun/opengl/impl/**/gl2/**, com/sun/opengl/impl/x11/glx/*, com/sun/opengl/impl/x11/*"/>

        <property name="java.part.gl2.win"
                  value="com/sun/opengl/impl/**/gl2/**, com/sun/opengl/impl/windows/wgl/*"/>

        <property name="java.part.gl2.osx"
                  value="com/sun/opengl/impl/**/gl2/**, com/sun/opengl/impl/macosx/cgl/*"/>

        <property name="java.part.gl2.dbg"
                  value="javax/media/opengl/TraceGL2.*, javax/media/opengl/DebugGL2.*"/>

        <property name="java.part.es1"
                  value="javax/media/opengl/**/es1/**, com/sun/opengl/**/es1/**"/>

        <property name="java.part.es1.dbg"
                  value="javax/media/opengl/TraceGLES1.*, javax/media/opengl/DebugGLES1.*"/>

        <property name="java.part.es2"
                  value="javax/media/opengl/**/es2/**, com/sun/opengl/**/es2/**, ${java.part.glsl}"/>

        <property name="java.part.es2.dbg"
                  value="javax/media/opengl/TraceGLES2.*, javax/media/opengl/DebugGLES2.*"/>

        <property name="java.part.awt"
                  value="com/sun/opengl/impl/jawt/**, javax/media/opengl/awt/**, com/sun/opengl/impl/**/awt/**, com/sun/opengl/impl/packrect/*"/>

        <property name="java.part.util"
                  value="com/sun/opengl/util/io/**, com/sun/opengl/util/texture/**"/>

        <property name="java.part.util.awt"
                  value="javax/media/opengl/util/awt/**, com/sun/opengl/util/**/awt/**"/>

        <property name="java.part.util.gl2"
                  value="com/sun/opengl/util/glut/**, com/sun/opengl/util/**/gl2/**"/>

        <property name="java.part.newt"
                  value="com/sun/javafx/newt/*, com/sun/javafx/newt/x11/*, com/sun/javafx/newt/windows/*"/>

        <property name="java.part.newt.awt"
                  value="com/sun/javafx/newt/awt/*"/>

        <!-- condition excludes -->

        <condition property="java.excludes.egl"
                   value="${java.part.egl}">
          <and>
           <isset property="jogl.noes1"/> 
           <isset property="jogl.noes2"/> 
          </and>
        </condition>

        <condition property="java.excludes.gl2"
                   value="${java.part.gl2es12.x11}, ${java.part.gl2es12.win}, ${java.part.gl2es12.osx},  ${java.part.gl2es12.dbg}, ${java.part.gl2.x11}, ${java.part.gl2.win}, ${java.part.gl2.osx}, ${java.part.gl2.dbg}, ${java.part.util.gl2}, ${java.part.glugl2}">
           <isset property="jogl.nogl2"/> 
        </condition>

        <condition property="java.excludes.es1"
                   value="${java.part.es1}, ${java.part.es1.dbg}">
          <isset property="jogl.noes1"/> 
        </condition>

        <condition property="java.excludes.es2"
                   value="${java.part.es2}, ${java.part.es2.dbg}">
          <isset property="jogl.noes2"/> 
        </condition>

        <condition property="java.excludes.awt"
                   value="${java.part.awt}, ${java.part.util.awt}, ${java.part.newt.awt}">
           <isset property="jogl.noAWT"/> 
        </condition>

        <condition property="java.excludes.util"
                   value="${java.part.util} ${java.part.util.awt} ${java.part.util.gl2}">
           <isset property="jogl.noutil"/> 
        </condition>

        <condition property="java.excludes.x11"
                   value="${java.part.x11}">
           <isset property="jogl.noX11"/> 
        </condition>

        <condition property="java.excludes.win"
                   value="${java.part.win}">
           <isset property="jogl.noWindows"/> 
        </condition>

        <condition property="java.excludes.macosx"
                   value="${java.part.macosx}">
           <isset property="jogl.noMacOsX"/> 
        </condition>

        <condition property="java.excludes.newt"
                   value="${java.part.newt}, ${java.part.newt.awt}">
           <isset property="jogl.nonewt"/> 
        </condition>

        <condition property="java.excludes.cdcfp"
                   value="com/sun/opengl/util/io/TGAWriter*, com/sun/opengl/util/texture/spi/awt/**">
           <isset property="jogl.cdcfp"/> 
        </condition>

        <property name="java.excludes.javadoc.packagenames"
                  value="com.sun.opengl.impl.gl2.fixme.*,com.sun.javafx.audio.windows.waveout.TestSpatialization"/>

        <property name="java.excludes.fixme" 
                  value="com/sun/opengl/impl/gl2/fixme/** com/sun/javafx/audio/windows/waveout/TestSpatialization.java" />

        <property name="java.excludes.all" value="${java.excludes.fixme} ${java.excludes.egl}, ${java.excludes.gl2}, ${java.excludes.es1}, ${java.excludes.es2}, ${java.excludes.awt}, ${java.excludes.glugl2}, ${java.excludes.util}, ${java.excludes.x11}, ${java.excludes.win}, ${java.excludes.macosx}, ${java.excludes.newt}, ${java.excludes.cdcfp}" />
        <echo message="java.excludes.all: ${java.excludes.all}" />


        <!-- Set the project root directory to be up one directory. -->
        <property name="project.root" value=".." />
    
        <!-- Set the configuration and build files to this directory. -->
        <property name="make" value="." />
    </target>

    <target name="base.init.sourcelevel.1">
        <property name="jogl.sourcelevel" value="1.4" />
    </target>

    <!--target name="base.init.sourcelevel.2" if="gluegen.nsig">
        <property name="jogl.sourcelevel" value="1.5" />
    </target-->

    <!-- ================================================================== -->
    <!-- 
       - Load user properties which override build defaults.
      -->
    <target name="load.user.properties" depends="base.init,base.init.sourcelevel.1" unless="user.properties.file">
        <!-- Load the user specified properties file that defines various host
           - specific paths.  The user will be notified if this is does not
           - exist. -->
        <property name="user.properties.file" value="${user.home}/jogl.properties" />
        <property file="${user.properties.file}" />
        <echo message="Loaded ${user.properties.file}." />
        <property file="${user.home}/gluegen.properties" />
        <echo message="Loaded ${user.home}/gluegen.properties." />
        <fail message="antlr.jar was not specified in jogl.properties or gluegen.properties. Please see README.txt for instructions" unless="antlr.jar"/>
        <echo message="antlr.jar=${antlr.jar}" />
    </target>

    <!-- ================================================================== -->
    <!-- 
       - Declare all paths and user defined variables.
      -->
    <target name="declare.common" description="Declare properties" depends="load.user.properties">
        <!-- The location and name of the configuration ANT file that will 
           - validate to ensure that all user-define variables are set. -->
        <property name="validate.user.properties" value="${make}/validate-properties.xml" />
           
        <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
        <property name="javacdebug"       value="true" /> 
        <property name="javacdebuglevel"  value="source,lines" /> 

        <!-- GlueGen properties. -->
        <!-- NOTE that these require a checked-out GlueGen workspace as a -->
        <!-- sibling of the JOGL workspace. -->
        <property name="gluegen.make.dir" value="../../gluegen/make" />
        <property name="gluegen.build.xml" value="${gluegen.make.dir}/build.xml" />
        <property name="gluegen.jar" value="../../gluegen/build/gluegen.jar" />
        <property name="gluegen-rt.jar" value="../../gluegen/build/gluegen-rt.jar" />
                                                
        <!-- Names of directories relative to the project root.
             Some of these are used in FileMappers later for dependence information
             and need exact string matching, which is why they use file.separator
             instead of "/". -->
        <property name="rootrel.src.java" value="src/classes" />
        <property name="rootrel.src.c.jogl" value="src/native/jogl" />
        <property name="rootrel.src.c.newt" value="src/native/newt" />
        <property name="rootrel.build" value="build" />
        <property name="rootrel.src.generated" value="${rootrel.build}/gensrc" />
        <property name="rootrel.generated.c.jogl" value="${rootrel.src.generated}/native/jogl" />
        <property name="rootrel.generated.c.cg" value="${rootrel.src.generated}/native/jogl_cg" />
        <property name="rootrel.obj" value="${rootrel.build}/obj" />
        <property name="rootrel.obj.jogl" value="${rootrel.obj}/jogl" />
        <property name="rootrel.obj.cg" value="${rootrel.obj}/jogl_cg" />

        <!-- The source directories. -->
        <property name="src.java" value="${project.root}/${rootrel.src.java}" />
        <property name="src.c"    value="${project.root}/${rootrel.src.c}" />
        <property name="build"    value="${project.root}/${rootrel.build}" />
        
        <!-- The generated source directories. -->
        <property name="src.generated" value="${build}/gensrc" />
        <property name="src.generated.java" value="${src.generated}/classes" />
        <property name="src.generated.java.cg" value="${src.generated}/classes/com/sun/opengl/cg" />
        <property name="src.generated.c" value="${src.generated}/native/jogl" />
        <property name="src.generated.c.newt" value="${src.generated}/native/newt" />
        <property name="src.generated.c.cg" value="${src.generated}/native/jogl_cg" />
        
        <!-- The compiler output directories. -->
        <property name="classes" value="${build}/classes" />
        <property name="obj"      value="${project.root}/${rootrel.obj}" />
        <property name="obj.jogl" value="${project.root}/${rootrel.obj.jogl}" />
        <property name="obj.cg"   value="${project.root}/${rootrel.obj.cg}" />

        <!-- The GL headers from which Java files are generated -->
        <property name="config" value="${project.root}/make" />
        <property name="stub.includes" value="${config}/stub_includes" />
        <property name="stub.includes.dir" value="stub_includes" /> <!-- NOTE:  this MUST be relative for FileSet -->
        <property name="stub.includes.opengl" value="${stub.includes}/opengl" />
        <property name="stub.includes.common" value="${stub.includes}/common" />
        <dirset id="stub.includes.fileset.all.gl2" dir=".">
            <include name="${stub.includes.dir}/opengl/**" />
            <include name="${stub.includes.dir}/macosx/**" />
            <include name="${stub.includes.dir}/win32/**" />
            <include name="${stub.includes.dir}/x11/**" />
            <include name="${stub.includes.dir}/common/**" />
            <include name="${stub.includes.dir}/jni/**" />
        </dirset>
        <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes.dir}">
            <include name="opengl/**" />
            <include name="macosx/**" />
            <include name="win32/**" />
            <include name="x11/**" />
            <include name="common/**" />
            <include name="jni/**" />
        </fileset>
        <fileset id="stub.includes.dependencies.fileset.2" file="${gluegen.jar}" />
        <fileset id="stub.includes.dependencies.fileset.3" dir=".">
            <include name="*.cfg" />
            <include name="gl*.java" />
            <include name="*.c" />
            <exclude name="cg-common.cfg" />
        </fileset>
        <dirset id="stub.includes.cg.fileset.all" dir=".">
            <include name="${stub.includes.dir}/opengl/**" />
            <include name="${stub.includes.dir}/cg/**" />
            <include name="${stub.includes.dir}/macosx/**" />
            <include name="${stub.includes.dir}/win32/**" />
            <include name="${stub.includes.dir}/x11/**" />
            <include name="${stub.includes.dir}/common/**" />
        </dirset>
        <fileset id="stub.includes.cg.dependencies.fileset" dir=".">
            <include name="${stub.includes.dir}/cg/**" />
            <include name="cg-common.cfg" />
            <include name="cg-common-CustomJavaCode.java" />
        </fileset>

        <!-- Create the classpath that includes GlueGen and
           - ANTLR. This requires the user-defined "antlr.jar"
           - property. -->
        <path id="gluegen.classpath">
          <pathelement location="${gluegen.jar}" />
          <pathelement location="${antlr.jar}" />
        </path>

        <!-- Create the classpath that includes GlueGen and
           - the current classes for building the composable pipelines.
           -->
        <path id="pipeline.classpath">
          <pathelement location="${gluegen.jar}" />
          <pathelement location="${classes}" />
        </path>

        <!-- The resulting jogl.jar. -->
        <property name="jogl.core.jar" value="${build}/jogl.core.jar" />
        <property name="jogl.gles1.jar" value="${build}/jogl.gles1.jar" />
        <property name="jogl.gles1.dbg.jar" value="${build}/jogl.gles1.dbg.jar" />
        <property name="jogl.gles2.jar" value="${build}/jogl.gles2.jar" />
        <property name="jogl.gles2.dbg.jar" value="${build}/jogl.gles2.dbg.jar" />
        <property name="jogl.egl.jar" value="${build}/jogl.egl.jar" />
        <property name="jogl.glutess.jar" value="${build}/jogl.glu.tess.jar" />
        <property name="jogl.glumipmap.jar" value="${build}/jogl.glu.mipmap.jar" />
        <property name="jogl.glugl2.jar"    value="${build}/jogl.glu.gl2.jar" />
        <property name="jogl.gl2es12.x11.jar" value="${build}/jogl.gl2es12.x11.jar" />
        <property name="jogl.gl2es12.win.jar" value="${build}/jogl.gl2es12.win.jar" />
        <property name="jogl.gl2es12.osx.jar" value="${build}/jogl.gl2es12.osx.jar" />
        <property name="jogl.gl2es12.dbg.jar" value="${build}/jogl.gl2es12.dbg.jar" />
        <property name="jogl.gl2.x11.jar" value="${build}/jogl.gl2.x11.jar" />
        <property name="jogl.gl2.win.jar" value="${build}/jogl.gl2.win.jar" />
        <property name="jogl.gl2.osx.jar" value="${build}/jogl.gl2.osx.jar" />
        <property name="jogl.gl2.dbg.jar" value="${build}/jogl.gl2.dbg.jar" />
        <property name="jogl.fixed.jar" value="${build}/jogl.fixed.jar" />
        <property name="jogl.awt.jar" value="${build}/jogl.awt.jar" />
        <property name="newt.jar" value="${build}/newt.jar" />
        <property name="newt.awt.jar" value="${build}/newt.awt.jar" />
        <property name="jogl.util.jar" value="${build}/jogl.util.jar" />
        <property name="jogl.util.gl2.jar" value="${build}/jogl.util.gl2.jar" />
        <property name="jogl.util.awt.jar" value="${build}/jogl.util.awt.jar" />
        <property name="jogl.sdk.jar" value="${build}/jogl.sdk.jar" />
        <property name="jogl.all.jar" value="${build}/jogl.all.jar" />

        <!-- The javadoc dirs. -->
        <property name="javadoc" value="${project.root}/javadoc_public" />
        <property name="javadoc.spec" value="${project.root}/javadoc_spec" />
        <property name="javadoc.dev" value="${project.root}/javadoc_jogl_dev" />
        <property name="javadoc.link" value="http://java.sun.com/j2se/1.4.2/docs/api/" />
        <property name="javadoc.windowtitle" value="JOGL API -- JSR-231 ${base_version} Specification" />
        <property name="javadoc.overview" value="spec-overview.html" />
        <property name="javadoc.spec.packagenames" value="javax.media.opengl.*,com.sun.javafx.newt" />

        <property name="javadoc.packagenames" value="${javadoc.spec.packagenames},com.sun.opengl.util.*" />

        <property name="javadoc.dev.packagenames" value="javax.media.opengl.*,com.sun.opengl.impl.*,com.sun.opengl.util.*,com.sun.gluegen,com.sun.gluegen.runtime" />
    <property name="javadoc.bottom" value="Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to &lt;a href=&quot;http://jcp.org/en/jsr/detail?id=231&quot;&gt;license terms&lt;/a&gt;." />
    </target>
    
    <target name="declare.gl.gles1" unless="jogl.noes1">
        <property name="gles1.headers" value="${stub.includes.dir}/opengl/GLES/*.h" /> <!-- NOTE:  this MUST be relative for FileSet --> <!-- CHECK:  this may need to be pruned for each platform -->
    </target>

    <target name="declare.gl.gles2" unless="jogl.noes2">
        <property name="gles2.headers" value="${stub.includes.dir}/opengl/GLES2/*.h" /> <!-- NOTE:  this MUST be relative for FileSet --> <!-- CHECK:  this may need to be pruned for each platform -->
    </target>

    <target name="declare.gl.gles" unless="jogl.noes" depends="declare.gl.gles1, declare.gl.gles2">
        <!-- Prepare to build the EGL interface -->
        <property name="window.es.cfg"                             value="${config}/egl.cfg" />
        <property name="window.es.system"                          value="gluegen_egl"/>
    </target>

    <target name="declare.gl.gl2" unless="jogl.nogl2">
        <property name="gl2.headers" value="${stub.includes.dir}/opengl/GL/*.h" /> <!-- NOTE:  this MUST be relative for FileSet --> <!-- CHECK:  this may need to be pruned for each platform -->
    </target>

    <!-- Declarations that have to come after both the common setup and the GLES tests -->
    <target name="declare.common.2">
    </target>

    <!-- ================================================================== -->
    <!-- 
       - Initialize all parameters required for the build and create any
       - required directories.
      -->
    <target name="init" depends="declare.common, declare.gl.gles, declare.gl.gl2, declare.common.2">
        <!-- Call the external config validator script to make sure the config is ok and consistent -->
        <ant antfile="${validate.user.properties}" inheritall="true"/>
        
        <!-- Create the required output directories. -->
        <mkdir dir="${src.generated.java}" />
        <mkdir dir="${src.generated.c}" />
        <mkdir dir="${src.generated.c}/OSX" />
        <mkdir dir="${src.generated.c}/Windows" />
        <mkdir dir="${src.generated.c}/X11" />
        <mkdir dir="${src.generated.c.newt}" />
        <mkdir dir="${src.generated.c.newt}/OSX" />
        <mkdir dir="${src.generated.c.newt}/Windows" />
        <mkdir dir="${src.generated.c.newt}/X11" />
        <mkdir dir="${classes}" />
        <mkdir dir="${obj}" />
        <mkdir dir="${obj.jogl}" />
        <mkdir dir="${obj.cg}" />
    </target>

    <!-- ================================================================== -->
    <!-- GlueGen and BuildStaticGLInfo creation, task setup and Java file generation -->
    <!--
       - Build GlueGen
      -->
    <target name="build.gluegen" depends="init">
        <!-- Run the GlueGen build to ensure that the GlueGen ANT task
           - has been built. -->
        <!-- FIXME: remove passing down of antlr.jar when gluegen.properties is on all
             nightly build machines -->
        <ant antfile="${gluegen.build.xml}" dir="${gluegen.make.dir}" target="all" inheritAll="false">
          <propertyset>
            <propertyref name="antlr.jar" />
            <!--propertyref name="gluegen.nsig" /-->
            <propertyref name="isCDCFP" />
          </propertyset>
        </ant>
    </target>

    <!--
       - Check to see whether we need to rebuild the generated sources.
      -->
    <target name="java.generate.check">
        <!-- Blow away all target files if any dependencies are violated
             (the uptodate task doesn't allow arbitrary source and target filesets but should) -->
             <!--
        <dependset>
            <srcfileset refid="stub.includes.dependencies.fileset.1" />
            <srcfileset refid="stub.includes.dependencies.fileset.2" />
            <srcfileset refid="stub.includes.dependencies.fileset.3" />
            <targetfileset dir="${src.generated}">
                <include name="**/*.java" />
                <include name="**/*.c" />
            </targetfileset>
        </dependset>
        -->

        <!-- Now check for the presence of one well-known file -->
        <uptodate property="java.generate.skip.es1"
                  targetfile="${src.generated.java}/javax/media/opengl/GLES1.java">
            <srcfiles refid="stub.includes.dependencies.fileset.1" />
            <srcfiles refid="stub.includes.dependencies.fileset.2" />
            <srcfiles refid="stub.includes.dependencies.fileset.3" />
        </uptodate>
        <uptodate property="java.generate.skip.es2"
                  targetfile="${src.generated.java}/javax/media/opengl/GLES2.java">
            <srcfiles refid="stub.includes.dependencies.fileset.1" />
            <srcfiles refid="stub.includes.dependencies.fileset.2" />
            <srcfiles refid="stub.includes.dependencies.fileset.3" />
        </uptodate>
        <uptodate property="java.generate.skip.gl2"
                  targetfile="${src.generated.java}/javax/media/opengl/GL2.java">
            <srcfiles refid="stub.includes.dependencies.fileset.1" />
            <srcfiles refid="stub.includes.dependencies.fileset.2" />
            <srcfiles refid="stub.includes.dependencies.fileset.3" />
        </uptodate>
        <uptodate property="java.generate.skip.glu"
                  targetfile="${src.generated.java}/javax/media/opengl/glu/GLU.java">
            <srcfiles refid="stub.includes.dependencies.fileset.1" />
            <srcfiles refid="stub.includes.dependencies.fileset.2" />
            <srcfiles refid="stub.includes.dependencies.fileset.3" />
        </uptodate>

        <condition property="java.generate.skip">
          <and>
              <isset property="java.generate.skip.es1"/>
              <isset property="java.generate.skip.es2"/>
              <!--isset property="java.generate.skip.gl2"/-->
              <isset property="java.generate.skip.glu"/>
          </and>
        </condition>

        <!--property name="java.generate.skip" value="true"/-->
    </target>

    <target name="java.generate.gl_if">
        <echo message="Generating GL interface" />
        <gluegen src="${stub.includes.common}/gles2.c"
                 config="${config}/gl-if-gl.cfg"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.gl2_es1_if">
        <echo message="Generating GL2_ES1 interface" />
        <gluegen src="${stub.includes.common}/gles1.c"
                 config="${config}/gl-if-gl2_es1.cfg" 
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.gl2_es2_if">
        <echo message="Generating GL2_ES2 interface" />
        <gluegen src="${stub.includes.common}/gles2.c"
                 config="${config}/gl-if-gl2_es2.cfg" 
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.gl2">
        <echo message="Generating GL2 interface and implementation" />
        <gluegen src="${stub.includes.common}/gl.c" 
                 config="${config}/gl-gl2.cfg"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.gl2es12">
        <echo message="Generating GL2ES12 interface and implementation" />
        <gluegen src="${stub.includes.common}/gl.c" 
                 config="${config}/gl-gl2es12.cfg"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.gles1">
        <echo message="Generating GLES1 interface and implementation" />
        <gluegen src="${stub.includes.common}/gles1.c" 
                 config="${config}/gl-es1.cfg"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.gles2">
        <echo message="Generating GLES2 interface and implementation" />
        <gluegen src="${stub.includes.common}/gles2.c" 
                 config="${config}/gl-es2.cfg"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.gl.all" depends="java.generate.gl_if, java.generate.gl2_es1_if, java.generate.gl2_es2_if, java.generate.gl2, java.generate.gl2es12, java.generate.gles1, java.generate.gles2"/>

    <!-- target name="java.generate.gl.nsig" if="gluegen.nsig">
        <echo message="Generating GL interface and implementation" />
        <gluegen src="${gl.c}" 
                 config="${gl.cfg.nsig}"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.nativesig.NativeSignatureEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target> -->

    <target name="java.generate.glu.base">
        <echo message="Generating GLU class" />
        <gluegen src="${stub.includes.common}/glu.c" 
                 config="${config}/glu-base.cfg"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.glu.GL2ES1">
        <echo message="Generating GLU class" />
        <gluegen src="${stub.includes.common}/glu.c" 
                 config="${config}/glu-gl2es1.cfg"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.glu.GL2" unless="jogl.nogl2">
        <echo message="Generating GLU class" />
        <gluegen src="${stub.includes.common}/glu.c" 
                 config="${config}/glu-gl2.cfg"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.platform.glext" unless="jogl.nogl2">
        <echo message="Generating platform-specific OpenGL extension class" />
        <gluegen src="${glext.platform.header}" 
                 config="${glext.platform.cfg}"
                 includeRefid="stub.includes.fileset.all.gl2"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.window.lib" if="windowlib.os.cfg">
        <echo message="Generating Windowing Lib implementation class" />
        <gluegen src="${stub.includes.dir}/${window.os.system}/window-lib.c"
                 config="${windowlib.os.cfg}"
                 includeRefid="stub.includes.fileset.platform"
                 emitter="com.sun.gluegen.JavaEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.window.system.es" if="window.es.cfg" unless="jogl.noes">
        <echo message="Generating EGL implementation class" />
        <dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes.dir}/${window.es.system}/**" />
        <gluegen src="${stub.includes.dir}/${window.es.system}/window-system.c"
                 config="${window.es.cfg}"
                 includeRefid="stub.includes.fileset.platform"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.window.system.os" if="window.os.cfg" unless="jogl.nogl2">
        <echo message="Generating WGL/GLX/CGL/EGL implementation class" />
        <gluegen src="${stub.includes.dir}/${window.os.system}/window-system.c"
                 config="${window.os.cfg}"
                 includeRefid="stub.includes.fileset.platform"
                 emitter="com.sun.gluegen.opengl.GLEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.jawt" unless="jogl.noAWT">
        <!-- NOTE:  the "literalInclude" in this GlueGen call is simply to
           -        get around the fact that neither FileSet nor DirSet can
           -        handle different drives in an effective manner. -->
        <echo message="Generating JAWT interface class" />
        <echo message="java.home.dir=${java.home.dir}" />
        <gluegen src="${jawt.platform.header}"
                 config="${jawt.cfg}"
                 literalInclude="${stub.includes.dir}/jni"
                 includeRefid="stub.includes.fileset.platform"
                 emitter="com.sun.gluegen.JavaEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <target name="java.generate.BufferUtil.javame_cdc_fp" if="jogl.cdcfp">
        <copy file="../src/classes/javax/media/opengl/util/BufferUtil.java.javame_cdc_fp" tofile="../build/gensrc/classes/javax/media/opengl/util/BufferUtil.java" />
    </target>

    <target name="java.generate.BufferUtil.javase" unless="jogl.cdcfp">
        <copy file="../src/classes/javax/media/opengl/util/BufferUtil.java.javase" tofile="../build/gensrc/classes/javax/media/opengl/util/BufferUtil.java" />
    </target>

    <!-- Generate the BufferUtil class for this particular profile -->
    <target name="java.generate.BufferUtil" depends="java.generate.BufferUtil.javase, java.generate.BufferUtil.javame_cdc_fp" />

    <target name="java.generate.TextureIO.javame_cdc_fp" if="jogl.cdcfp">
        <copy file="../src/classes/com/sun/opengl/util/texture/TextureIO.java.javame_cdc_fp" tofile="../build/gensrc/classes/com/sun/opengl/util/texture/TextureIO.java" />
        <copy file="../src/classes/com/sun/opengl/util/texture/spi/DDSImage.java.javame_cdc_fp" tofile="../build/gensrc/classes/com/sun/opengl/util/texture/spi/DDSImage.java" />
        <copy file="../src/classes/com/sun/opengl/util/texture/spi/TGAImage.java.javame_cdc_fp" tofile="../build/gensrc/classes/com/sun/opengl/util/texture/spi/TGAImage.java" />
    </target>

    <target name="java.generate.TextureIO.javase" unless="jogl.cdcfp">
        <copy file="../src/classes/com/sun/opengl/util/texture/TextureIO.java.javase" tofile="../build/gensrc/classes/com/sun/opengl/util/texture/TextureIO.java" />
        <copy file="../src/classes/com/sun/opengl/util/texture/spi/DDSImage.java.javase" tofile="../build/gensrc/classes/com/sun/opengl/util/texture/spi/DDSImage.java" />
        <copy file="../src/classes/com/sun/opengl/util/texture/spi/TGAImage.java.javase" tofile="../build/gensrc/classes/com/sun/opengl/util/texture/spi/TGAImage.java" />
    </target>

    <!-- Generate the TextureIO classes for this particular profile -->
    <target name="java.generate.TextureIO" depends="java.generate.TextureIO.javase, java.generate.TextureIO.javame_cdc_fp" />

    <target name="java.generate.gl.platforms" >
        <dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes.dir}/${window.os.system}/** ${stub.includes.dir}/${window.es.system}/** ${stub.includes.dir}/common/** ${stub.includes.dir}/opengl/**" />

        <antcall target="java.generate.platform.glext" inheritRefs="true" />
        <antcall target="java.generate.window.lib" inheritRefs="true" />
        <antcall target="java.generate.window.system.os" inheritRefs="true" />
        <antcall target="java.generate.jawt" inheritRefs="true" />
    </target>

    <!--
       - Setup the generating ANT tasks and use it to generate the Java files 
       - from the C GL headers.  This involves setting the taskdef and creating
       - the classpath reference id then running the task on each header.
      -->
    <target name="java.generate" depends="build.gluegen, java.generate.BufferUtil, java.generate.TextureIO, java.generate.check" unless="java.generate.skip">

        <!-- Add the GlueGen and BuildStaticGLInfo tasks to ANT -->
        <taskdef name="gluegen" classname="com.sun.gluegen.ant.GlueGenTask"
                 classpathref="gluegen.classpath" />
        <taskdef name="staticglgen" classname="com.sun.gluegen.ant.StaticGLGenTask"
                 classpathref="gluegen.classpath" />
                 
        <!-- Use the GlueGen and BuildStaticGLInfo tasks to generate the 
           - Java files -->

        <echo message="Generating GL interface and implementation" />
        <antcall target="java.generate.gl.all"      inheritRefs="true" />
        <!--antcall target="java.generate.gl.nsig" inheritRefs="true" /-->

        <antcall target="java.generate.window.system.es" inheritRefs="true" />

        <echo message="Generating platform-specifics: X11" />
        <antcall target="java.generate.gl.platforms" inheritRefs="true">
            <param name="window.os.system"                       value="x11"/>
            <param name="window.os.cfg"                          value="${config}/glx-x11.cfg" />
            <param name="windowlib.os.cfg"                       value="${config}/x11-lib.cfg" />
            <param name="glext.platform.cfg"                     value="${config}/glxext.cfg" />
            <param name="glext.platform.header"                  value="${stub.includes.dir}/x11/glxext.c" />
            <param name="jawt.cfg"                               value="${config}/jawt-x11.cfg" />
            <param name="jawt.platform.header"                   value="${stub.includes.dir}/jni/x11/jawt_md.h" />
        </antcall>

        <echo message="Generating platform-specifics: Win32" />
        <antcall target="java.generate.gl.platforms" inheritRefs="true">
            <param name="window.os.system"                       value="win32"/>
            <param name="window.os.cfg"                          value="${config}/wgl-win32.cfg" />
            <param name="glext.platform.cfg"                     value="${config}/wglext.cfg" />
            <param name="glext.platform.header"                  value="${stub.includes.dir}/win32/wglext.c" />
            <param name="jawt.cfg"                               value="${config}/jawt-win32.cfg" />
            <param name="jawt.platform.header"                   value="${stub.includes.dir}/jni/win32/jawt_md.h" />
        </antcall>          

        <echo message="Generating platform-specifics: MaxOsX" />
        <antcall target="java.generate.gl.platforms" inheritRefs="true">
          <param name="window.os.system"                     value="macosx"/>
          <param name="window.os.cfg"                        value="${config}/cgl-macosx.cfg" />
          <param name="glext.platform.cfg"                   value="${config}/cglext.cfg" />
          <param name="glext.platform.header"                value="${stub.includes.dir}/macosx/cglext.c" />
          <param name="jawt.cfg"                             value="${config}/jawt-macosx.cfg" />
          <param name="jawt.platform.header"                 value="${stub.includes.dir}/jni/macosx/jawt_md.h" />
        </antcall>
    
        <echo message="Generating StaticGLInfo class" />
        <staticglgen package="com.sun.opengl.impl"
                     headers="${gl2.headers} ${gles1.headers} ${gles2.headers}"
                     outputdir="${src.generated.java}/com/sun/opengl/impl">
            <classpath refid="gluegen.classpath" />
        </staticglgen>

        <!-- Generate GLU class -->
        <antcall target="java.generate.glu.base"   inheritrefs="true" />
        <antcall target="java.generate.glu.GL2ES1" inheritrefs="true" />
        <antcall target="java.generate.glu.GL2"    inheritrefs="true" />

        <!-- Inform the user that the generators have successfully created 
           - the necessary Java files -->
        <echo message="" />
        <echo message="GlueGen and BuildStaticGLInfo have successfully generated files." />
    
    </target>      

    <target name="java.generate.cg.check">
        <!-- Blow away all target files if any dependencies are violated
             (the uptodate task doesn't allow arbitrary source and target filesets but should) -->
        <dependset>
            <srcfileset refid="stub.includes.cg.dependencies.fileset" />
            <targetfileset dir=".">
                <include name="${src.generated.java.cg}/**/*.java" />
                <include name="${src.generated.c.cg}/**/*.c" />
            </targetfileset>
        </dependset>

        <!-- Now check for the presence of one well-known file -->
        <uptodate property="java.generate.cg.skip">
            <srcfiles refid="stub.includes.cg.dependencies.fileset" />
            <mapper type="merge" to="${src.generated.java}/com/sun/opengl/cg/CgGL.java" />
        </uptodate>
    </target>

    <!--
       - Setup the generating ANT tasks and use it to generate the Java files 
       - from the C GL headers.  This involves setting the taskdef and creating
       - the classpath reference id then running the task on each header.
      -->
    <target name="java.generate.cg" depends="java.generate.cg.check" if="jogl.cg" unless="java.generate.cg.skip">
        <!-- Add the GlueGen and BuildStaticGLInfo tasks to ANT -->
        <taskdef name="gluegen" classname="com.sun.gluegen.ant.GlueGenTask"
                 classpathref="gluegen.classpath" />
        <taskdef name="staticglgen" classname="com.sun.gluegen.ant.StaticGLGenTask"
                 classpathref="gluegen.classpath" />

        <!-- Generate CgGL interface class -->
        <gluegen src="${stub.includes.common}/cg.c" 
                 config="cg-common.cfg"
                 includeRefid="stub.includes.cg.fileset.all"
                 emitter="com.sun.gluegen.JavaEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
    </target>

    <!-- ================================================================== -->
    <!-- 
       - Build and dependency rules for the composable pipeline
      -->
    <target name="java.generate.composable.pipeline.check.es1" unless="jogl.noes1">
        <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
             (the uptodate element doesn't support arbitrary source and destination files) -->
        <dependset>
            <srcfilelist dir="${classes}/javax/media/opengl" files="GLES1.class" />
            <targetfileset dir="${src.generated.java}/javax/media/opengl"
                           includes="DebugGLES1.java,TraceGLES1.java" />
        </dependset>
                           
        <!-- Now choose one of the two to test to see if we have to regenerate -->
        <uptodate property="java.generate.composable.pipeline.skip.es1"
                  srcfile="${classes}/javax/media/opengl/GLES1.class"
                  targetfile="${src.generated.java}/javax/media/opengl/DebugGLES1.java" />

    </target>        

    <target name="java.generate.composable.pipeline.check.es2" unless="jogl.noes2">
        <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
             (the uptodate element doesn't support arbitrary source and destination files) -->
        <dependset>
            <srcfilelist dir="${classes}/javax/media/opengl" files="GLES2.class" />
            <targetfileset dir="${src.generated.java}/javax/media/opengl"
                           includes="DebugGLES2.java,TraceGLES2.java" />
        </dependset>
                           
        <!-- Now choose one of the two to test to see if we have to regenerate -->
        <uptodate property="java.generate.composable.pipeline.skip.es2"
                  srcfile="${classes}/javax/media/opengl/GLES2.class"
                  targetfile="${src.generated.java}/javax/media/opengl/DebugGLES2.java" />

    </target>        

    <target name="java.generate.composable.pipeline.check.gl2es12" unless="jogl.nogl2">
        <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
             (the uptodate element doesn't support arbitrary source and destination files) -->
        <dependset>
            <srcfilelist dir="${classes}/javax/media/opengl" files="GL2ES12.class" />
            <targetfileset dir="${src.generated.java}/javax/media/opengl"
                           includes="DebugGL2ES12.java,TraceGL2ES12.java" />
        </dependset>
                           
        <!-- Now choose one of the two to test to see if we have to regenerate -->
        <uptodate property="java.generate.composable.pipeline.skip.gl2es12"
                  srcfile="${classes}/javax/media/opengl/GL2ES12.class"
                  targetfile="${src.generated.java}/javax/media/opengl/DebugGL2ES12.java" />
    </target>        

    <target name="java.generate.composable.pipeline.check.gl2" unless="jogl.nogl2">
        <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
             (the uptodate element doesn't support arbitrary source and destination files) -->
        <dependset>
            <srcfilelist dir="${classes}/javax/media/opengl" files="GL2.class" />
            <targetfileset dir="${src.generated.java}/javax/media/opengl"
                           includes="DebugGL2.java,TraceGL2.java" />
        </dependset>
                           
        <!-- Now choose one of the two to test to see if we have to regenerate -->
        <uptodate property="java.generate.composable.pipeline.skip.gl2"
                  srcfile="${classes}/javax/media/opengl/GL2.class"
                  targetfile="${src.generated.java}/javax/media/opengl/DebugGL2.java" />
    </target>        

    <target name="java.generate.composable.pipeline.es1" depends="java.generate.composable.pipeline.check.es1" unless="java.generate.composable.pipeline.skip.es1">
        <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
            <arg value="javax.media.opengl.GLES1" />
            <arg value="${src.generated.java}/javax/media/opengl" />
            <classpath refid="pipeline.classpath" />
        </java>
    </target>          

    <target name="java.generate.composable.pipeline.es2" depends="java.generate.composable.pipeline.check.es2" unless="java.generate.composable.pipeline.skip.es2">
        <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
            <arg value="javax.media.opengl.GLES2" />
            <arg value="${src.generated.java}/javax/media/opengl" />
            <classpath refid="pipeline.classpath" />
        </java>
    </target>          

    <target name="java.generate.composable.pipeline.gl2es12" depends="java.generate.composable.pipeline.check.gl2es12" unless="java.generate.composable.pipeline.skip.gl2es12">
        <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
            <arg value="javax.media.opengl.GL2ES12" />
            <arg value="${src.generated.java}/javax/media/opengl" />
            <classpath refid="pipeline.classpath" />
        </java>
    </target>          

    <target name="java.generate.composable.pipeline.gl2" depends="java.generate.composable.pipeline.check.gl2" unless="java.generate.composable.pipeline.skip.gl2">
        <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
            <arg value="javax.media.opengl.GL2" />
            <arg value="${src.generated.java}/javax/media/opengl" />
            <classpath refid="pipeline.classpath" />
        </java>
    </target>          

    <target name="java.generate.composable.pipeline.check">
        <condition property="java.generate.composable.pipeline.skip.es1">
          <isset property="jogl.noes1"/>
        </condition>
        <condition property="java.generate.composable.pipeline.skip.es2">
          <isset property="jogl.noes2"/>
        </condition>
        <condition property="java.generate.composable.pipeline.skip.gl2">
          <isset property="jogl.nogl2"/>
        </condition>
    </target>
    <target name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.check, java.generate.composable.pipeline.es1, java.generate.composable.pipeline.es2, java.generate.composable.pipeline.gl2">
    </target>

    <!-- ================================================================== -->
    <!-- 
       - Compile the original and generated source.  The composable pipelines
       - will be generated.
      -->
    <target name="java.compile.firstpass" depends="java.generate,java.generate.cg">

        <!-- Perform the first pass Java compile. -->
        <javac destdir="${classes}"
               classpath="${gluegen-rt.jar}"
               includes="javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GL2.java javax/media/opengl/GLES1.java javax/media/opengl/GLES2.java"
               fork="yes"
               memoryMaximumSize="128m"
               source="1.4" debug="${javacdebug}" debuglevel="${javacdebuglevel}">
            <src path="${src.java}" />
            <src path="${src.generated.java}" />
        </javac>
    </target>

    <target name="java.compile.secondpass.1" if="javac.bootclasspath.jar">
        <!-- Perform the second pass Java compile; everything. -->
        <javac destdir="${classes}"
               excludes="${java.excludes.all}"
               source="${jogl.sourcelevel}"
               classpath="${gluegen-rt.jar}"
               bootclasspath="${javac.bootclasspath.jar}"
               fork="yes"
               memoryMaximumSize="128m"
               debug="${javacdebug}" debuglevel="${javacdebuglevel}">
            <src path="${src.java}" />
            <src path="${src.generated.java}" />
        </javac>
    </target>

    <target name="java.compile.secondpass.2" unless="javac.bootclasspath.jar">
        <!-- Perform the second pass Java compile; everything. -->
        <javac destdir="${classes}"
               excludes="${java.excludes.all}"
               source="${jogl.sourcelevel}"
               classpath="${gluegen-rt.jar}"
               fork="yes"
               memoryMaximumSize="128m"
               debug="${javacdebug}" debuglevel="${javacdebuglevel}">
            <src path="${src.java}" />
            <src path="${src.generated.java}" />
        </javac>
    </target>

    <target name="java.compile.secondpass" depends="java.generate.composable.pipeline,java.compile.secondpass.1,java.compile.secondpass.2" />

    <target name="java.compile" depends="java.compile.firstpass,java.compile.secondpass" />

    <!-- ================================================================== -->
    <!-- 
       - Compile the native C code for JOGL (and optionally the Cg binding).
      -->

    <target name="c.configure.1" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler" unless="jogl.compiler.present">
      <!-- compiler configuration -->
      <!-- Note that we can use the base setups in the gluegen-cpptasks for most of these -->

      <compiler id="compiler.cfg.freebsd.jogl" extends="compiler.cfg.freebsd">
        <!-- Need to force X11R6 headers on to include path after stub_includes -->
        <includepath path="stub_includes/opengl"/>
        <includepath path="/usr/X11R6/include" />
      </compiler>

      <!-- linker configuration -->
 
      <linker id="linker.cfg.linux.jogl.x11" extends="linker.cfg.linux">
        <syslibset dir="/usr/X11R6/lib" libs="X11"/>
        <syslibset dir="/usr/X11R6/lib" libs="Xxf86vm" />
      </linker>

      <linker id="linker.cfg.linux.jogl.gl2" extends="linker.cfg.linux.jogl.x11">
        <syslibset dir="/usr/X11R6/lib" libs="GL"/>
        <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL" if="c.compiler.use-cglib"/>
      </linker>

      <linker id="linker.cfg.linux.amd64.jogl.x11" extends="linker.cfg.linux.amd64">
        <syslibset dir="/usr/X11R6/lib64" libs="X11"/>
        <syslibset dir="/usr/X11R6/lib64" libs="Xxf86vm" />
      </linker>

      <linker id="linker.cfg.linux.amd64.jogl.gl2" extends="linker.cfg.linux.amd64.jogl.x11">
        <syslibset dir="/usr/X11R6/lib64" libs="GL"/>
        <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL" if="c.compiler.use-cglib"/>
      </linker>

      <linker id="linker.cfg.solaris.jogl.x11" extends="linker.cfg.solaris">
        <syslibset libs="X11"/>
      </linker>

      <linker id="linker.cfg.solaris.jogl.gl2" extends="linker.cfg.solaris">
        <syslibset libs="GL"/>
        <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL" if="c.compiler.use-cglib"/>
      </linker>

      <linker id="linker.cfg.solaris.sparcv9.jogl.gl2" extends="linker.cfg.solaris.sparcv9">
        <linkerarg value="-xarch=v9a" />
        <syslibset dir="/usr/openwin/lib/sparcv9" libs="GL"/>
        <syslibset dir="/usr/lib/sparcv9" libs="X11"/>
      </linker>

      <linker id="linker.cfg.solaris.amd64.jogl.gl2" extends="linker.cfg.solaris.amd64">
        <linkerarg value="-xarch=amd64" />
        <syslibset dir="/usr/lib/amd64" libs="GL"/>
        <syslibset dir="/usr/lib/amd64" libs="X11"/>
      </linker>

      <linker id="linker.cfg.win32.mingw.jogl" extends="linker.cfg.win32.mingw">
        <linkerarg value="-Wl,--kill-at" />        <!-- remove @ from function names -->
        <syslibset libs="opengl32, glu32, gdi32, kernel32"/>
        <syslibset dir="${windows.cg.lib}" libs="cg, cgGL" if="c.compiler.use-cglib"/>
      </linker>

      <linker id="linker.cfg.win32.msvc.jogl" extends="linker.cfg.win32.msvc">
        <syslibset libs="opengl32, gdi32, user32, kernel32" />
        <syslibset dir="${windows.cg.lib}" libs="cg, cgGL" if="c.compiler.use-cglib"/>
    <!-- This is temporary -->
        <syslibset libs="winmm" />
      </linker>

      <linker id="linker.cfg.macosx.jogl" extends="linker.cfg.macosx">
        <linkerarg value="-framework" />
        <linkerarg value="Cocoa" />
        <linkerarg value="-framework" />
        <linkerarg value="OpenGL" />
        <linkerarg value="-framework" if="c.compiler.use-cglib" />
        <linkerarg value="Cg" if="c.compiler.use-cglib" />
      </linker>

      <linker id="linker.cfg.hpux.jogl" extends="linker.cfg.hpux">
        <syslibset dir="/opt/graphics/OpenGL/lib" libs="GL, GLU"/>
        <syslibset dir="/usr/lib" libs="X11"/>
      </linker>
    </target>

    <target name="c.configure.win32.vc" if="isVCFamily">
      <echo message="Win32.VC" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.win32.msvc" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.win32.msvc" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.win32.msvc.jogl" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.win32.msvc.jogl" />
    </target>
    
    <target name="c.configure.win32.mingw" if="isMingW">
      <echo message="Win32.MingW" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.win32.mingw" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.win32.mingw" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.win32.mingw.jogl" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.win32.mingw.jogl" />
    </target>

    <target name="c.configure.linux.x86" if="isLinuxX86">
      <echo message="Linux.x86" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.linux" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.jogl.x11" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.linux.jogl.gl2" />
    </target>
    
    <target name="c.configure.linux.amd64" if="isLinuxAMD64">
      <echo message="Linux.AMD64" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.linux.amd64" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.linux.amd64" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.amd64.jogl.x11" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.linux.amd64.jogl.gl2" />
    </target>
    
    <target name="c.configure.linux.ia64" if="isLinuxIA64">
      <echo message="Linux.IA64" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.linux" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.jogl.x11" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.linux.jogl.gl2" />
    </target>

    <target name="c.configure.linux" depends="c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.ia64,c.configure.x11" if="isLinux" />

    <target name="c.configure.solaris32" depends="c.configure.x11" if="isSolaris32Bit">
      <echo message="Solaris" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.solaris" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.solaris" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.solaris.jogl.x11" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.solaris.jogl.gl2" />
    </target>
  
 
    <target name="c.configure.solaris.sparcv9" depends="c.configure.x11" if="isSolarisSparcv9">
      <echo message="SolarisSparcv9" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.solaris.sparcv9" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.solaris.sparcv9" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.solaris.sparcv9.jogl.x11" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.solaris.sparcv9.jogl.gl2" />
    </target>
   

    <target name="c.configure.solaris.amd64" depends="c.configure.x11" if="isSolarisAMD64">
      <echo message="SolarisAMD64" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.solaris.amd64" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.solaris.amd64" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.solaris.amd64.jogl.x11" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.solaris.amd64.jogl.gl2" />
    </target>
   
    <target name="c.configure.freebsd" depends="c.configure.x11" if="isFreeBSD">
      <echo message="FreeBSD" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.freebsd.jogl" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.linux" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.jogl.x11" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.linux.jogl.gl2" />
    </target>

    <target name="c.configure.hpux" depends="c.configure.x11" if="isHPUX">
      <echo message="HP-UX" />
      <property name="compiler.cfg.id"                      value="compiler.cfg.hpux" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.hpux" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.hpux.jogl.x11" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.hpux.jogl.gl2" />
    </target>

    <target name="c.configure.win32" depends="c.configure.win32.vc,c.configure.win32.mingw" if="isWindows" />

    <target name="c.configure.x11" if="isX11" />

    <target name="c.configure.macosx" if="isOSX">
      <property name="compiler.cfg.id"                      value="compiler.cfg.macosx" />
      <property name="linker.cfg.id.core"                   value="linker.cfg.macosx" />
      <property name="linker.cfg.id.oswin"                  value="linker.cfg.macosx.jogl" />
      <property name="linker.cfg.id.gl2"                    value="linker.cfg.macosx.jogl" />
    </target>
    
    <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />

    <target name="c.configure" depends="c.configure.1,c.configure.2" />

    <target name="rename.mingw.dll" if="isMingW">
        <move file="${src}" tofile="${dest}" />
    </target>

    <target name="rename.dylib" if="isOSX">
        <move file="${src}" tofile="${dest}" />
    </target>

    <macrodef name="c.build">
      <attribute name="c.compiler.src.files" />
      <attribute name="compiler.cfg.id" />
      <attribute name="linker.cfg.id" />
      <attribute name="output.lib.name" />
      <attribute name="c.compiler.use-jawt" default="false"/>
      <sequential>
        <echo message="Output lib name = @{output.lib.name}" />

        <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
        <property name="c.compiler.debug"     value="false" /> 
        <!-- Optimise flags one of { none, size, speed, minimal, full, aggressive, extreme, unsafe } --> 
        <property name="c.compiler.optimise"  value="none" /> 

        <condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>

        <!-- since properties are immutable, we need one for each target -->
        <condition property="@{output.lib.name}.useLibJAWT">
            <istrue value="@{c.compiler.use-jawt}" />
        </condition>
        <echo message="c.compiler.use-jawt @{c.compiler.use-jawt}"/>
        <echo message="@{output.lib.name}.useLibJAWT ${@{output.lib.name}.useLibJAWT}"/>

        <condition property="@{output.lib.name}.useLibJVM">
          <and>
            <isset property="isHPUX"/>
            <isset property="@{output.lib.name}.useLibJAWT"/>
          </and>
        </condition> 

        <patternset id="c.src.files.jogl.awt">
          <include name="${rootrel.src.c.jogl}/JAWT*.c"/>
          <include name="${rootrel.generated.c.jogl}/X11/JAWT*.c" if="isX11"/>
          <include name="${rootrel.generated.c.jogl}/OSX/JAWT*.c" if="isOSX"/>
          <include name="${rootrel.generated.c.jogl}/Windows/JAWT*.c" if="isWindows"/>
        </patternset>

        <patternset id="c.src.files.newt">
          <!-- FIXME: NEWT should be moved to another library -->
          <include name="${rootrel.src.c.newt}/WindowsWindow.c" if="isWindows"/>
          <include name="${rootrel.src.c.newt}/X11Window.c" if="isX11"/>
          <include name="${rootrel.src.c.newt}/OSXWindow.c" if="isOSX"/>
        </patternset>

        <patternset id="c.src.files.jogl.gl2">
          <include name="${rootrel.src.c.jogl}/XineramaHelper.c" if="isX11"/>
          <!-- Xinerama supporting functions for Linux only (for now) -->
          <!-- Also supported on Solaris, but works differently -->
          <include name="${rootrel.src.c.jogl}/Xinerama.c" if="isLinux"/>
          <include name="${rootrel.src.c.jogl}/MacOSXWindowSystemInterface.m" if="isOSX"/>
          <include name="${rootrel.generated.c.jogl}/X11/X11Lib_JNI.c" if="isX11"/>
          <include name="${rootrel.src.c.jogl}/InternalBufferUtils.c"/>
          <include name="${rootrel.src.c.jogl}/ContextUpdater.m" if="isOSX"/>
          <include name="${rootrel.generated.c.jogl}/gl2/GL2Impl_JNI.c"/>
          <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
          <include name="${rootrel.generated.c.jogl}/gl2/GLUgl2_JNI.c"/>
          <include name="${rootrel.generated.c.jogl}/X11/GLX*.c" if="isX11"/>
          <include name="${rootrel.generated.c.jogl}/OSX/CGL*.c" if="isOSX"/>
          <include name="${rootrel.generated.c.jogl}/Windows/WGL*.c" if="isWindows"/>
          <!-- FIXME: the Mixer should be moved to another library -->
          <!--include name="${rootrel.src.c.jogl}/Mixer.cpp" if="isWindows"/-->
        </patternset>

        <patternset id="c.src.files.jogl.gl2es12">
          <include name="${rootrel.src.c.jogl}/XineramaHelper.c" if="isX11"/>
          <!-- Xinerama supporting functions for Linux only (for now) -->
          <!-- Also supported on Solaris, but works differently -->
          <include name="${rootrel.src.c.jogl}/Xinerama.c" if="isLinux"/>
          <include name="${rootrel.src.c.jogl}/MacOSXWindowSystemInterface.m" if="isOSX"/>
          <include name="${rootrel.generated.c.jogl}/X11/X11Lib_JNI.c" if="isX11"/>
          <include name="${rootrel.src.c.jogl}/InternalBufferUtils.c"/>
          <include name="${rootrel.src.c.jogl}/ContextUpdater.m" if="isOSX"/>
          <include name="${rootrel.generated.c.jogl}/gl2es12/GL2ES12Impl_JNI.c"/>
          <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
          <!--include name="${rootrel.generated.c.jogl}/gl2es12/GLUgl2es12_JNI.c"/ SKIPPED -->
          <include name="${rootrel.generated.c.jogl}/X11/GLX*.c" if="isX11"/>
          <include name="${rootrel.generated.c.jogl}/OSX/CGL*.c" if="isOSX"/>
          <include name="${rootrel.generated.c.jogl}/Windows/WGL*.c" if="isWindows"/>
          <!-- FIXME: the Mixer should be moved to another library -->
          <!--include name="${rootrel.src.c.jogl}/Mixer.cpp" if="isWindows"/-->
        </patternset>

        <patternset id="c.src.files.jogl.es2">
          <include name="${rootrel.src.c.jogl}/XineramaHelper.c" if="isX11"/>
          <!-- Xinerama supporting functions for Linux only (for now) -->
          <!-- Also supported on Solaris, but works differently -->
          <include name="${rootrel.src.c.jogl}/Xinerama.c" if="isLinux"/>
          <include name="${rootrel.generated.c.jogl}/X11/X11Lib_JNI.c" if="isX11"/>
          <include name="${rootrel.generated.c.jogl}/es2/GLES2Impl_JNI.c"/>
          <include name="${rootrel.generated.c.jogl}/egl/EGL_JNI.c"/>
          <include name="${rootrel.src.c.jogl}/InternalBufferUtils.c"/>
        </patternset>

        <patternset id="c.src.files.jogl.es1">
          <include name="${rootrel.src.c.jogl}/XineramaHelper.c" if="isX11"/>
          <!-- Xinerama supporting functions for Linux only (for now) -->
          <!-- Also supported on Solaris, but works differently -->
          <include name="${rootrel.src.c.jogl}/Xinerama.c" if="isLinux"/>
          <include name="${rootrel.generated.c.jogl}/X11/X11Lib_JNI.c" if="isX11"/>
          <include name="${rootrel.generated.c.jogl}/egl/EGL_JNI.c"/>
          <include name="${rootrel.src.c.jogl}/InternalBufferUtils.c"/>
          <include name="${rootrel.generated.c.jogl}/es1/GLES1Impl_JNI.c"/>
          <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
          <!--include name="${rootrel.generated.c.jogl}/es1/GLUes1_JNI.c" EMPTY /-->
        </patternset>

        <patternset id="c.src.files.cg">
          <include name="${rootrel.generated.c.cg}/*.c"/>
        </patternset>

        <echo message="Compiling @{output.lib.name}" />

        <cc outtype="shared" 
            objdir="${obj.jogl}" 
            outfile="${obj}/@{output.lib.name}"
            optimize="${c.compiler.optimise}" 
            debug="${c.compiler.debug}"
            multithreaded="true" 
            exceptions="false" 
            rtti="false">   
  
          <!-- TODO: versioninfo  companyname="java.net"
                        legalcopyright="Copyright"
                        productname="JOGL" 
                        productversion="x.y.z"
                        description="Description"
                        fileversion="x.y.z" 
                        filecomments="File Comment" /-->      
  
          <fileset dir="${project.root}"><patternset refid="@{c.compiler.src.files}"/></fileset>
  
          <compiler extends="@{compiler.cfg.id}" >
            <sysincludepath path="${java.includes.dir}"/>
            <sysincludepath path="${java.includes.dir.platform}"/>
            <includepath path="stub_includes/opengl"/>
            <includepath path="stub_includes/egl"/>
            <includepath path="stub_includes/cg" if="c.compiler.use-cglib"/>        
  
            <!-- This is for the generated headers for handwritten C code -->
            <includepath path="${src.generated.c}" />
            <includepath path="${src.generated.c}/X11" if="isX11"/>
            <includepath path="${src.generated.c}/OSX" if="isOSX"/>
            <includepath path="${src.generated.c}/Windows" if="isWindows"/>
            <includepath path="${src.generated.c.newt}" />
            <includepath path="${src.generated.c.newt}/X11" if="isX11"/>
            <includepath path="${src.generated.c.newt}/OSX" if="isOSX"/>
            <includepath path="${src.generated.c.newt}/Windows" if="isWindows"/>
  
            <!-- This must come last to not override real include paths -->
            <!-- includepath path="stub_includes/macosx" if="isOSX" / -->
          </compiler>
  
          <linker extends="@{linker.cfg.id}">
            <syslibset dir="${java.lib.dir.platform}" libs="jawt" if="@{output.lib.name}.useLibJAWT"/>
            <syslibset dir="${java.lib.dir.platform}/server" libs="jvm" if="@{output.lib.name}.useLibJVM"/>
          </linker>
        </cc>

        <!-- 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 -->
        <antcall target="rename.dylib" inheritRefs="true">
            <param name="src"  value="${build}/obj/lib@{output.lib.name}.dylib" />
            <param name="dest" value="${build}/obj/lib@{output.lib.name}.jnilib" />
        </antcall>

        <!-- 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 -->
        <antcall target="rename.mingw.dll" inheritRefs="true">
            <param name="src"  value="${build}/obj/lib@{output.lib.name}.so" />
            <param name="dest" value="${build}/obj/@{output.lib.name}.dll" />
        </antcall>
      </sequential>
    </macrodef>  

    <target name="c.fixup.jawt.version.macosx" if="isOSX">
      <!-- Edit the link to the JAWT version in the resulting jnilib
           file; this isn't strictly needed but seems to allow the
           universal binaries to work on 10.3 machines as well, which
           is desirable for some end users -->
      <apply executable="install_name_tool">
        <arg value="-change" />
        <arg value="/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries/libjawt.dylib" />
        <arg value="/System/Library/Frameworks/JavaVM.framework/Libraries/libjawt.dylib" />
        <srcfile />
        <fileset dir="${obj}" includes="libjogl_awt.jnilib, libjogl_gl2.jnilib, libjogl_gl2es12.jnilib, libjogl_es2.jnilib, libjogl_es1.jnilib, libjogl_cg.jnilib" />
      </apply>
    </target>

    <target name="c.build.newt.prepare">
      <!-- FIXME: this is temporary until we move this to another workspace -->
      <javah destdir="../build/gensrc/native/newt/Windows" classpath="${jogl.all.jar}" class="com.sun.javafx.newt.windows.WindowsWindow" />
      <javah destdir="../build/gensrc/native/newt/X11" classpath="${jogl.all.jar}" class="com.sun.javafx.newt.x11.X11Window" />
    </target>

    <target name="c.build.jogl.prepare" depends="c.build.newt.prepare">
      <!-- Generate the EGLDrawableFactory header -->
      <!-- FIXME: this is temporary until we fully autogenerate the EGL interface -->
      <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.all.jar}" class="com.sun.opengl.impl.egl.EGLDrawableFactory" />
      <!-- Generate the waveout Mixer header -->
      <!-- FIXME: this is temporary until we move this to another workspace -->
      <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.all.jar}" class="com.sun.javafx.audio.windows.waveout.Mixer" />
    </target>

    <target name="c.build.jogl.awt">
      <c.build c.compiler.src.files="c.src.files.jogl.awt"
               c.compiler.use-jawt="true"
               output.lib.name="jogl_awt"
               compiler.cfg.id="${compiler.cfg.id}"
               linker.cfg.id="${linker.cfg.id.oswin}"/>
    </target>

    <!-- There is no native newt library on OS X -->
    <target name="c.build.newt" unless="isOSX">
      <c.build c.compiler.src.files="c.src.files.newt"
               output.lib.name="newt"
               compiler.cfg.id="${compiler.cfg.id}"
               linker.cfg.id="${linker.cfg.id.oswin}"/>
    </target>

    <target name="c.build.jogl.gl2" unless="jogl.nogl2">
      <c.build c.compiler.src.files="c.src.files.jogl.gl2"
               output.lib.name="jogl_gl2"
               compiler.cfg.id="${compiler.cfg.id}"
               linker.cfg.id="${linker.cfg.id.gl2}"/>
    </target>

    <target name="c.build.jogl.gl2es12" unless="jogl.nogl2">
      <c.build c.compiler.src.files="c.src.files.jogl.gl2es12"
               output.lib.name="jogl_gl2es12"
               compiler.cfg.id="${compiler.cfg.id}"
               linker.cfg.id="${linker.cfg.id.gl2}"/>
    </target>

    <target name="c.build.jogl.es2" unless="jogl.noes1">
      <c.build c.compiler.src.files="c.src.files.jogl.es2"
               output.lib.name="jogl_es2"
               compiler.cfg.id="${compiler.cfg.id}"
               linker.cfg.id="${linker.cfg.id.base}"/>
    </target>

    <target name="c.build.jogl.es1" unless="jogl.noes2">
      <c.build c.compiler.src.files="c.src.files.jogl.es1"
               output.lib.name="jogl_es1"
               compiler.cfg.id="${compiler.cfg.id}"
               linker.cfg.id="${linker.cfg.id.base}"/>
    </target>

    <target name="c.build.jogl.cg" if="jogl.cg">
      <c.build c.compiler.src.files="c.src.files.cg"
               output.lib.name="jogl_cg"
               compiler.cfg.id="${compiler.cfg.id}"
               linker.cfg.id="${linker.cfg.id.gl2}"/>
    </target>
    
    <target name="c.manifest.cg" if="jogl.cg">
      <exec executable="mt">
        <arg value="-manifest"/>
        <arg value="${obj}/jogl_cg.dll.manifest"/>
        <arg value="-outputresource:${obj}/jogl_cg.dll;#2"/>
      </exec>
    </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 -->
      <exec executable="mt">
        <arg value="-manifest"/>
        <arg value="${obj}/jogl_gl2.dll.manifest"/>
        <arg value="-outputresource:${obj}/jogl_gl2.dll;#2"/>
      </exec>
      <exec executable="mt">
        <arg value="-manifest"/>
        <arg value="${obj}/newt.dll.manifest"/>
        <arg value="-outputresource:${obj}/newt.dll;#2"/>
      </exec>
      <exec executable="mt">
        <arg value="-manifest"/>
        <arg value="${obj}/jogl_awt.dll.manifest"/>
        <arg value="-outputresource:${obj}/jogl_awt.dll;#2"/>
      </exec>
      <antcall target="c.manifest.cg" inheritRefs="true" />
    </target>

    <target name="c.build.jogl" depends="c.configure,c.build.jogl.prepare,c.build.jogl.awt,c.build.newt,c.build.jogl.gl2es12,c.build.jogl.gl2,c.build.jogl.es2,c.build.jogl.es1,c.build.jogl.cg">
      <antcall target="c.fixup.jawt.version.macosx" inheritrefs="true" />
      <antcall target="c.manifest" inheritRefs="true" />
    </target>

    <!-- ================================================================== -->
    <!--
       - Build the jogl.jar files.
      -->
    <target name="jar" depends="java.compile,cond-if-RImanifest,cond-else-RImanifest"/>

    <target name="check-RIcond">
      <condition property="RIcond-is-true">
         <isset property="RImanifestfile"/>
      </condition>
    </target>

    <target name="cond-if-RImanifest" depends="check-RIcond" if="RIcond-is-true">
        <copy file="joglRIversion"
          tofile="tempversion"
          overwrite="true">
          <filterset>
              <filter token="VERSION" value="${base_version}-pre-${timestamp}"/>
              <filter token="BASEVERSION" value="${base_version}"/>
          </filterset>
        </copy>

        <copy todir="${classes}">
            <fileset dir="${src.java}"
                     includes="com/sun/opengl/impl/glsl/fixed/shader/**" />
        </copy>

        <jar manifest="tempversion" destfile="${jogl.core.jar}">
            <fileset dir="${classes}"
                     includes="javax/media/opengl/**, com/sun/gluegen/runtime/**, com/sun/opengl/**"
                     excludes="${java.excludes.fixme} ${java.part.egl}, ${java.part.sdk}, ${java.part.glsl}, ${java.part.glsl.fixed}, ${java.part.gl2es12.x11}, ${java.part.gl2es12.win}, ${java.part.gl2es12.osx}, ${java.part.gl2es12.dbg}, ${java.part.gl2.x11}, ${java.part.gl2.win}, ${java.part.gl2.osx}, ${java.part.gl2.dbg}, ${java.part.es1}, ${java.part.es1.dbg}, ${java.part.es2}, ${java.part.es2.dbg}, ${java.part.awt}, ${java.part.glutess}, ${java.part.glumipmap}, ${java.part.glugl2}, ${java.part.util} ${java.part.util.awt} ${java.part.util.gl2}, ${java.part.newt}, ${java.part.newt.awt}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gles1.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.es1}"
                     excludes="${java.part.es1.dbg}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gles1.dbg.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.es1.dbg}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gles2.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.es2}, ${java.part.glsl}"
                     excludes="${java.part.es2.dbg}, ${java.part.glsl.fixed}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gles2.dbg.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.es2.dbg}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.egl.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.egl}"
                     excludes="${java.part.awt}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gl2es12.x11.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.gl2es12.x11}, ${java.part.glsl}"
                     excludes="${java.part.gl2es12.dbg}, ${java.part.glugl2}, ${java.part.glsl.fixed}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gl2es12.win.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.gl2es12.win}, ${java.part.glsl}"
                     excludes="${java.part.gl2es12.dbg}, ${java.part.glugl2}, ${java.part.glsl.fixed}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gl2es12.osx.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.gl2es12.osx}, ${java.part.glsl}"
                     excludes="${java.part.gl2es12.dbg}, ${java.part.glugl2}, ${java.part.glsl.fixed}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gl2es12.dbg.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.gl2es12.dbg}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gl2.x11.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.gl2.x11}, ${java.part.glsl}"
                     excludes="${java.part.gl2.dbg}, ${java.part.glugl2}, ${java.part.glsl.fixed}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gl2.win.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.gl2.win}, ${java.part.glsl}"
                     excludes="${java.part.gl2.dbg}, ${java.part.glugl2}, ${java.part.glsl.fixed}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gl2.osx.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.gl2.osx}, ${java.part.glsl}"
                     excludes="${java.part.gl2.dbg}, ${java.part.glugl2}, ${java.part.glsl.fixed}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.gl2.dbg.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.gl2.dbg}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.fixed.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.glsl.fixed}"
                     excludes="com/sun/opengl/impl/glsl/fixed/shader/scripts/**"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.sdk.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.sdk}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.glutess.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.glutess}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.glumipmap.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.glumipmap}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.glugl2.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.glugl2}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.awt.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.awt}" />
        </jar>
                     <!-- excludes="com/sun/opengl/impl/x11/**, com/sun/opengl/impl/windows/**, com/sun/opengl/impl/macosx/**" --> 
        <jar manifest="tempversion" destfile="${newt.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.newt}"/>
        </jar>
        <jar manifest="tempversion" destfile="${newt.awt.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.newt.awt}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.util.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.util}"
                     excludes="com/sun/opengl/**/awt/**, com/sun/opengl/**/gl2/**, ${java.part.glsl}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.util.gl2.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.util.gl2}"
                     excludes="com/sun/opengl/**/awt/**"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.util.awt.jar}">
            <fileset dir="${classes}"
                     includes="${java.part.util.awt}"/>
        </jar>
        <jar manifest="tempversion" destfile="${jogl.all.jar}">
            <fileset dir="${classes}">
                <include name="javax/media/opengl/**" />
                <include name="com/sun/gluegen/runtime/**" />
                <include name="com/sun/opengl/**" />
                <!-- FIXME: this is temporary until we move these classes to another workspace -->
                <include name="com/sun/javafx/**" />
            </fileset>
        </jar>
        <delete file="tempversion"/>
    </target>
  
 
    <target name="cond-else-RImanifest" depends="check-RIcond" unless="RIcond-is-true">
        <tstamp>
             <format property="timestamp" pattern="yyyyMMdd-HH:mm:ss"/>
        </tstamp>
        <copy file="joglversion"
          tofile="tempversion"
          overwrite="true">
          <filterset>
              <filter token="VERSION" value="${base_version}-pre-${timestamp}"/>
              <filter token="BASEVERSION" value="${base_version}"/>
          </filterset>
        </copy>
        <jar manifest="tempversion" destfile="${jogl.jar}">
            <fileset dir="${classes}">
                <include name="javax/media/opengl/**" />
                <include name="com/sun/gluegen/runtime/**" />
                <include name="com/sun/opengl/**" />
                <include name="com/sun/javafx/**" />
            </fileset>
        </jar>
        <delete file="tempversion"/>
    </target>

    <!-- ================================================================== -->
    <!--
       - Build the Javadocs for the sources.
       - NOTE:  these are not entirely correct as the javadocs targets depend 
       -        on the platform specific build targets.  To circumvent any 
       -        errors, ensure that the source is built first.
      -->
    <target name="javadoc.nocg" depends="load.user.properties,init" unless="jogl.cg">
        <!-- Build the general Javadoc -->
        <javadoc packagenames="${javadoc.packagenames}"
                 excludepackagenames="${java.excludes.javadoc.packagenames}"
                 sourcepath="${src.java};${src.generated.java}"        
                 classpath="${gluegen-rt.jar}"
                 destdir="${javadoc}" windowtitle="${javadoc.windowtitle}"
                 overview="${javadoc.overview}" 
                 source="1.4"
                 linkoffline="${javadoc.link} 142-packages"
         bottom="${javadoc.bottom}" >
          <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
        </javadoc>
    </target>

    <!-- Same as above but with Cg directories added -->
    <target name="javadoc.cg" depends="load.user.properties,init" if="jogl.cg">
        <!-- Build the general Javadoc -->
        <javadoc packagenames="${javadoc.packagenames},com.sun.opengl.cg"
                 excludepackagenames="${java.excludes.javadoc.packagenames}"
                 sourcepath="${src.java};${src.generated.java}"        
                 classpath="${gluegen-rt.jar}"
                 destdir="${javadoc}" windowtitle="${javadoc.windowtitle}"
                 overview="${javadoc.overview}" 
                 source="1.4"
                 linkoffline="${javadoc.link} 142-packages"
         bottom="${javadoc.bottom}" >
          <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
        </javadoc>
    </target>

    <target name="javadoc" depends="javadoc.nocg,javadoc.cg" />

    <target name="javadoc.spec.nocg" depends="load.user.properties,init" unless="jogl.cg">
        <!-- Build the general Javadoc -->
        <javadoc packagenames="${javadoc.spec.packagenames}"
                 excludepackagenames="${java.excludes.javadoc.packagenames}"
                 sourcepath="${src.java};${src.generated.java}"
                 classpath="${gluegen-rt.jar}"
                 destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}"
                 overview="${javadoc.overview}"
                 source="1.4"
                 linkoffline="${javadoc.link} 142-packages"
                 bottom="${javadoc.bottom}" >
          <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
        </javadoc>
    </target>
                                                                                                                                   
    <!-- Same as above since Cg directories are not part of spec -->
    <target name="javadoc.spec.cg" depends="load.user.properties,init" if="jogl.cg">
        <!-- Build the general Javadoc -->
        <javadoc packagenames="${javadoc.spec.packagenames}"
                 excludepackagenames="${java.excludes.javadoc.packagenames}"
                 sourcepath="${src.java};${src.generated.java}"
                 classpath="${gluegen-rt.jar}"
                 destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}"
                 overview="${javadoc.overview}"
                 source="1.4"
                 linkoffline="${javadoc.link} 142-packages"
                 bottom="${javadoc.bottom}" >
          <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
        </javadoc>
    </target>

    <target name="javadoc.spec" depends="javadoc.spec.nocg,javadoc.spec.cg" />

    <target name="javadoc.dev.nocg" unless="jogl.cg">
        <!-- Build the internal developer Javadoc -->
        <javadoc packagenames="${javadoc.dev.packagenames}"
                 excludepackagenames="${java.excludes.javadoc.packagenames}"
                 sourcepath="${src.java};${src.generated.java}"        
                 classpath="${gluegen-rt.jar}"
                 destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}"
                 overview="${javadoc.overview}" 
                 source="1.4"
                 linkoffline="${javadoc.link} 142-packages"
         bottom="${javadoc.bottom}" >
          <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
        </javadoc>
    </target>

    <!-- Same as above but with Cg directories added -->
    <target name="javadoc.dev.cg" if="jogl.cg">
        <!-- Build the internal developer Javadoc -->
        <javadoc packagenames="${javadoc.dev.packagenames},com.sun.opengl.cg"
                 excludepackagenames="${java.excludes.javadoc.packagenames}"
                 sourcepath="${src.java};${src.generated.java}"        
                 classpath="${gluegen-rt.jar}"
                 destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}"
                 overview="${javadoc.overview}" 
                 source="1.4"
                 linkoffline="${javadoc.link} 142-packages"
         bottom="${javadoc.bottom}" >
          <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
        </javadoc>
    </target>

    <target name="javadoc.dev.all"  depends="load.user.properties,init,javadoc.dev.nocg,javadoc.dev.cg" />

    <!-- ================================================================== -->
    <!--
       - Build the platform-independent distribution out of jars built for
       - Windows, Linux and Mac OS X; the Java sources for Jogl can't be
       - fully cross-compiled at this time. To run this target, you need to
       - specify the property jogl.dist.dir as a System property (i.e.,
       - "ant -Djogl.dist.dir=../dist dist"); directories named jogl-linux,
       - jogl-win, and jogl-macosx need to be inside that directory and each
       - of those directories needs to contain both the jogl.jar for that
       - platform as well as the native code (libjogl.so, jogl.dll, or
       - libjogl.jnilib). Also builds jars containing the native code for
       - Windows, Linux, Mac OS X, Solaris/SPARC and Solaris/x86.
      -->
    <target name="dist.dir.check" unless="jogl.dist.dir">
        <fail>
  
    ******************************************************************
    ** To build the Jogl distribution out of the platform-specific  **
    ** component jars and native code, the property jogl.dist.dir   **
    ** needs to be specified on the command line. Please read the   **
    ** comments associated with the "dist" target in the build.xml. **
    ******************************************************************
        </fail>
    </target>

    <target name="dist.check.windows" if="jogl.dist.dir">
        <condition property="windows.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-win/jogl.jar" />
        <available file="${jogl.dist.dir}/jogl-win/32/jogl.dll" />
        <available file="${jogl.dist.dir}/jogl-win/32/jogl_awt.dll" />
        <available file="${jogl.dist.dir}/jogl-win/32/jogl_cg.dll" />
        <available file="${jogl.dist.dir}/jogl-win/32/gluegen-rt.dll" />
        <available file="${jogl.dist.dir}/jogl-win/32/gluegen-rt-natives-windows-i586.jar" />
      </and>
    </condition>
    <fail unless="windows.complete">
    ******************************************************************
    ** Files are missing from the Windows build. This will cause    **    
    ** the distribution to be incomplete. Please check the status   **
    ** of the Windows build and try again.                          **
    ******************************************************************
        </fail>
    </target>

    <target name="dist.check.windows-amd64" if="jogl.dist.dir">
        <condition property="windows-amd64.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-win/64/jogl.dll" />
        <available file="${jogl.dist.dir}/jogl-win/64/jogl_awt.dll" />
        <available file="${jogl.dist.dir}/jogl-win/64/jogl_cg.dll" />
        <available file="${jogl.dist.dir}/jogl-win/64/gluegen-rt.dll" />
        <available file="${jogl.dist.dir}/jogl-win/64/gluegen-rt-natives-windows-amd64.jar" />
      </and>
    </condition>
    <fail unless="windows-amd64.complete">
    *********************************************************************
    ** Files are missing from the Windows/AMD64 build. This will cause **    
    ** the distribution to be incomplete. Please check the status      **
    ** of the Windows/AMD64 build and try again.                       **
    *********************************************************************
        </fail>
    </target>

    <target name="dist.check.linux" if="jogl.dist.dir">
        <condition property="linux.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-linux/jogl.jar" />
        <available file="${jogl.dist.dir}/jogl-linux/32/libjogl.so" />
        <available file="${jogl.dist.dir}/jogl-linux/32/libjogl_awt.so" />
        <available file="${jogl.dist.dir}/jogl-linux/32/libjogl_cg.so" />
        <available file="${jogl.dist.dir}/jogl-linux/32/libgluegen-rt.so" />
        <available file="${jogl.dist.dir}/jogl-linux/32/gluegen-rt-natives-linux-i586.jar" />
        <!-- Assume we also copy over these generated files in the Linux build -->
        <!-- in order to satisfy requests from end users that we provide these -->
        <!-- files for easier source browsing in IDEs                          -->
        <available file="${jogl.dist.dir}/jogl-linux/DebugGL2.java" />
        <available file="${jogl.dist.dir}/jogl-linux/TraceGL2.java" />
        <available file="${jogl.dist.dir}/jogl-linux/GL.java" />
        <available file="${jogl.dist.dir}/jogl-linux/GLU.java" />
      </and>
    </condition>
    <fail unless="linux.complete">
    ******************************************************************
    ** Files are missing from the Linux build. This will cause      **    
    ** the distribution to be incomplete. Please check the status   **
    ** of the Linux build and try again.                            **
    ******************************************************************
        </fail>
    </target>

    <target name="dist.check.linux-amd64" if="jogl.dist.dir">
        <condition property="linux-amd64.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-linux/64/libjogl.so" />
        <available file="${jogl.dist.dir}/jogl-linux/64/libjogl_awt.so" />
        <available file="${jogl.dist.dir}/jogl-linux/64/libjogl_cg.so" />
        <available file="${jogl.dist.dir}/jogl-linux/64/libgluegen-rt.so" />
        <available file="${jogl.dist.dir}/jogl-linux/64/gluegen-rt-natives-linux-amd64.jar" />
      </and>
    </condition>
    <fail unless="linux-amd64.complete">
    *******************************************************************
    ** Files are missing from the Linux/AMD64 build. This will cause **    
    ** the distribution to be incomplete. Please check the status    **
    ** of the Linux/AMD64 build and try again.                       **
    *******************************************************************
        </fail>
    </target>

    <target name="dist.check.macosx" if="jogl.dist.dir">
        <condition property="macosx.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-macosx/jogl.jar" />
        <available file="${jogl.dist.dir}/jogl-macosx/ppc/libjogl.jnilib" />
        <available file="${jogl.dist.dir}/jogl-macosx/ppc/libjogl_awt.jnilib" />
        <available file="${jogl.dist.dir}/jogl-macosx/ppc/libjogl_cg.jnilib" />
        <available file="${jogl.dist.dir}/jogl-macosx/ppc/libgluegen-rt.jnilib" />
        <available file="${jogl.dist.dir}/jogl-macosx/ppc/gluegen-rt-natives-macosx-ppc.jar" />
      </and>
    </condition>
    <fail unless="macosx.complete">
    ******************************************************************
    ** Files are missing from the Mac OS X build. This will cause   **    
    ** the distribution to be incomplete. Please check the status   **
    ** of the Mac OS X build and try again.                         **
    ******************************************************************
        </fail>
    </target>


    <target name="dist.check.macosxfat" if="jogl.dist.dir">
        <condition property="macosxfat.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-macosx/jogl.jar" />
        <available file="${jogl.dist.dir}/jogl-macosx/fat/libjogl.jnilib" />
        <available file="${jogl.dist.dir}/jogl-macosx/fat/libjogl_awt.jnilib" />
        <available file="${jogl.dist.dir}/jogl-macosx/fat/libjogl_cg.jnilib" />
        <available file="${jogl.dist.dir}/jogl-macosx/fat/libgluegen-rt.jnilib" />
        <available file="${jogl.dist.dir}/jogl-macosx/fat/gluegen-rt-natives-macosx-universal.jar" />
      </and>
    </condition>
    <fail unless="macosxfat.complete">
    ******************************************************************
    ** Files are missing from the Mac OS X build. This will cause   **    
    ** the distribution to be incomplete. Please check the status   **
    ** of the Mac OS X build and try again.                         **
    ******************************************************************
        </fail>
    </target>



    <target name="dist.check.solsparc" if="jogl.dist.dir">
        <condition property="solsparc.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-solsparc/jogl.jar" />
        <available file="${jogl.dist.dir}/jogl-solsparc/32/libjogl.so" />
        <available file="${jogl.dist.dir}/jogl-solsparc/32/libjogl_awt.so" />
        <available file="${jogl.dist.dir}/jogl-solsparc/32/libgluegen-rt.so" />
        <available file="${jogl.dist.dir}/jogl-solsparc/32/gluegen-rt-natives-solaris-sparc.jar" />
      </and>
    </condition>
    <fail unless="solsparc.complete">
    ******************************************************************
    ** Files are missing from the Solaris/SPARC build. This will    **    
    ** cause the distribution to be incomplete. Please check the    **
    ** status of the Solaris/SPARC build and try again.             **
    ******************************************************************
        </fail>
    </target>

    <target name="dist.check.solsparcv9" if="jogl.dist.dir">
        <condition property="solsparcv9.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-solsparc/jogl.jar" />
        <available file="${jogl.dist.dir}/jogl-solsparc/64/libjogl.so" />
        <available file="${jogl.dist.dir}/jogl-solsparc/64/libjogl_awt.so" />
        <available file="${jogl.dist.dir}/jogl-solsparc/64/libgluegen-rt.so" />
        <available file="${jogl.dist.dir}/jogl-solsparc/64/gluegen-rt-natives-solaris-sparcv9.jar" />
      </and>
    </condition>
    <fail unless="solsparcv9.complete">
    ******************************************************************
    ** Files are missing from the Solaris/SPARCv9 build. This will  **    
    ** cause the distribution to be incomplete. Please check the    **
    ** status of the Solaris/SPARCv9 build and try again.           **
    ******************************************************************
        </fail>
    </target>

    <target name="dist.check.solx86" if="jogl.dist.dir">
        <condition property="solx86.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-solx86/jogl.jar" />
        <available file="${jogl.dist.dir}/jogl-solx86/32/libjogl.so" />
        <available file="${jogl.dist.dir}/jogl-solx86/32/libjogl_awt.so" />
        <available file="${jogl.dist.dir}/jogl-solx86/32/libjogl_cg.so" />
        <available file="${jogl.dist.dir}/jogl-solx86/32/libgluegen-rt.so" />
        <available file="${jogl.dist.dir}/jogl-solx86/32/gluegen-rt-natives-solaris-i586.jar" />
      </and>
    </condition>
    <fail unless="solx86.complete">
    ******************************************************************
    ** Files are missing from the Solaris/x86 build. This will      **    
    ** cause the distribution to be incomplete. Please check the    **
    ** status of the Solaris/x86 build and try again.               **
    ******************************************************************
        </fail>
    </target>

    <target name="dist.check.solamd64" if="jogl.dist.dir">
        <condition property="solamd64.complete">
      <and>
        <available file="${jogl.dist.dir}/jogl-solx86/64/libjogl.so" />
        <available file="${jogl.dist.dir}/jogl-solx86/64/libjogl_awt.so" />
        <available file="${jogl.dist.dir}/jogl-solx86/64/libgluegen-rt.so" />
        <available file="${jogl.dist.dir}/jogl-solx86/64/gluegen-rt-natives-solaris-amd64.jar" />
      </and>
    </condition>
    <fail unless="solamd64.complete">
    ******************************************************************
    ** Files are missing from the Solaris/x86/64 (amd64) build. This * 
    ** will cause the distribution                                  **
    ** to be incomplete. Please check the                           **
    ** status of the Solaris/x86 (amd64) build and try again.       **
    ******************************************************************
        </fail>
    </target>

    <!-- Helper task for dist target below -->
    <!-- Required parameters: -->
    <!--   zip.os.arch    = the os/arch combination for this zip file (i.e., "windows-i586") -->
    <!--   zip.src.so.dir = the directory containing the .so's / .dll's / .jnilib's for this platform-->
    <target name="dist.build.zip">
        <property name="jogl.tmp.version" value="jogl-${tmp.version}-${zip.os.arch}" />
        <!-- Create all needed directories -->
        <delete dir="${jogl.dist.dir}/tmp" failonerror="false" />
        <mkdir dir="${jogl.dist.dir}/tmp/${jogl.tmp.version}/lib" />
        <!-- Copy in files -->
        <copy todir="${jogl.dist.dir}/tmp/${jogl.tmp.version}/lib">
            <fileset dir="${zip.src.so.dir}" includes="*${zip.so.suffix}" />
        </copy>
        <copy file="${jogl.dist.dir}/jogl.jar" todir="${jogl.dist.dir}/tmp/${jogl.tmp.version}/lib" />
        <copy file="${jogl.dist.dir}/gluegen-rt.jar" todir="${jogl.dist.dir}/tmp/${jogl.tmp.version}/lib" />
        <copy file="../CHANGELOG.txt"          todir="${jogl.dist.dir}/tmp/${jogl.tmp.version}" />
        <copy file="../COPYRIGHT.txt"          todir="${jogl.dist.dir}/tmp/${jogl.tmp.version}" />
        <copy file="../LICENSE.txt"            tofile="${jogl.dist.dir}/tmp/${jogl.tmp.version}/LICENSE-JOGL-${tmp.version}.txt" />
        <copy file="README-zip-bundles.txt"
          tofile="${jogl.dist.dir}/tmp/${jogl.tmp.version}/README.txt"
          overwrite="true">
          <filterset>
              <filter token="VERSION" value="${tmp.version}"/>
          </filterset>
        </copy>
        <copy file="../doc/userguide/index.html" tofile="${jogl.dist.dir}/tmp/${jogl.tmp.version}/Userguide.html" />
        <!-- zip it up -->
        <zip destfile="${jogl.dist.dir}/${jogl.tmp.version}.zip"
         basedir="${jogl.dist.dir}/tmp"
         includes="${jogl.tmp.version}/**" />
    </target>

    <target name="setup-version-RI" if="RImanifestfile">
        <property name="tmp.version" value="${base_version}" />
    </target>

    <target name="setup-version-non-RI" unless="RImanifestfile">
        <tstamp>
             <format property="timestamp" pattern="yyyyMMdd"/>
        </tstamp>
        <property name="tmp.version" value="${base_version}-pre-${timestamp}" />
    </target>

    <target name="dist" depends="dist.dir.check,dist.check.windows,dist.check.windows-amd64,dist.check.linux,dist.check.linux-amd64,dist.check.macosx,dist.check.macosxfat,dist.check.solsparc,dist.check.solsparcv9,dist.check.solx86,dist.check.solamd64,setup-version-RI,setup-version-non-RI">
        <delete>
            <fileset dir="${jogl.dist.dir}" includes="*.jar" />
        </delete>
        <delete>
            <fileset dir="${jogl.dist.dir}" includes="*.zip" />
        </delete>
        <delete dir="${jogl.dist.dir}/tmp" failonerror="false" />
        <delete dir="${jogl.dist.dir}/META-INF" failonerror="false" />
        <!-- Extract manifest from one of the jars to re-use it in the dist jar -->
        <unjar src="${jogl.dist.dir}/jogl-win/jogl.jar" dest="${jogl.dist.dir}" >
            <patternset>
                <include name="META-INF/MANIFEST.MF" />
            </patternset>
        </unjar>
        <!-- Build jar files suitable for Java Web Start -->
        <jar manifest="${jogl.dist.dir}/META-INF/MANIFEST.MF" destfile="${jogl.dist.dir}/jogl.jar" duplicate="preserve">
        <zipgroupfileset dir="${jogl.dist.dir}"
                         includes="jogl-win/jogl.jar, jogl-linux/jogl.jar, jogl-macosx/jogl.jar" />
        </jar>
        <!-- Apply Pack200 repacking to allow later compression by that mechanism -->
        <apply executable="pack200" verbose="true" >
            <arg value="--repack" />
            <fileset file="${jogl.dist.dir}/jogl.jar" />
        </apply>
        <jar destfile="${jogl.dist.dir}/jogl-natives-windows-i586.jar"
             basedir="${jogl.dist.dir}/jogl-win/32"
             includes="jogl.dll,jogl_awt.dll,jogl_cg.dll" />
        <jar destfile="${jogl.dist.dir}/jogl-natives-windows-amd64.jar"
             basedir="${jogl.dist.dir}/jogl-win/64"
             includes="jogl.dll,jogl_awt.dll,jogl_cg.dll" />
        <jar destfile="${jogl.dist.dir}/jogl-natives-linux-i586.jar"
             basedir="${jogl.dist.dir}/jogl-linux/32"
             includes="libjogl.so,libjogl_awt.so,libjogl_cg.so" />
        <jar destfile="${jogl.dist.dir}/jogl-natives-linux-amd64.jar"
             basedir="${jogl.dist.dir}/jogl-linux/64"
             includes="libjogl.so,libjogl_awt.so,libjogl_cg.so" />
        <jar destfile="${jogl.dist.dir}/jogl-natives-macosx-ppc.jar"
             basedir="${jogl.dist.dir}/jogl-macosx/ppc"
             includes="libjogl.jnilib,libjogl_awt.jnilib,libjogl_cg.jnilib" />
        <jar destfile="${jogl.dist.dir}/jogl-natives-macosx-universal.jar"
             basedir="${jogl.dist.dir}/jogl-macosx/fat"
             includes="libjogl.jnilib,libjogl_awt.jnilib,libjogl_cg.jnilib" />
        <jar destfile="${jogl.dist.dir}/jogl-natives-solaris-sparc.jar"
             basedir="${jogl.dist.dir}/jogl-solsparc/32"
             includes="libjogl.so,libjogl_awt.so" />
        <jar destfile="${jogl.dist.dir}/jogl-natives-solaris-sparcv9.jar"
             basedir="${jogl.dist.dir}/jogl-solsparc/64"
             includes="libjogl.so,libjogl_awt.so" />
        <jar destfile="${jogl.dist.dir}/jogl-natives-solaris-i586.jar"
             basedir="${jogl.dist.dir}/jogl-solx86/32"
             includes="libjogl.so,libjogl_awt.so,libjogl_cg.so" />
        <jar destfile="${jogl.dist.dir}/jogl-natives-solaris-amd64.jar"
             basedir="${jogl.dist.dir}/jogl-solx86/64"
             includes="libjogl.so,libjogl_awt.so" />
        <!-- Copy gluegen-rt.jar from Linux build (arbitrary; this jar is platform-independent) -->
        <copy file="${jogl.dist.dir}/jogl-linux/gluegen-rt.jar" todir="${jogl.dist.dir}" />
        <!-- Copy gluegen-rt native jars out of platform-specific subdirectories -->
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-win/32" includes="gluegen-natives-*.jar" />
        </copy>
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-win/64" includes="gluegen-natives-*.jar" />
        </copy>
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-linux/32" includes="gluegen-natives-*.jar" />
        </copy>
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-linux/64" includes="gluegen-natives-*.jar" />
        </copy>
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-macosx/ppc" includes="gluegen-natives-*.jar" />
        </copy>
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-macosx/fat" includes="gluegen-natives-*.jar" />
        </copy>
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-solsparc/32" includes="gluegen-natives-*.jar" />
        </copy>
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-solsparc/64" includes="gluegen-natives-*.jar" />
        </copy>
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-solx86/32" includes="gluegen-natives-*.jar" />
        </copy>
        <copy todir="${jogl.dist.dir}">
            <fileset dir="${jogl.dist.dir}/jogl-solx86/64" includes="gluegen-natives-*.jar" />
        </copy>

    <!-- Build a source archive as well -->
    <!-- First copy the generated files out of the Linux build results into the appropriate -->
    <!-- directory of this source tree (so that they'll be blown away properly with an -->
    <!-- "ant clean") -->
    <mkdir dir="../build/gensrc/classes/javax/media/opengl/glu" />
    <copy file="${jogl.dist.dir}/jogl-linux/DebugGL2.java" todir="../build/gensrc/classes/javax/media/opengl" />
    <copy file="${jogl.dist.dir}/jogl-linux/TraceGL2.java" todir="../build/gensrc/classes/javax/media/opengl" />
    <copy file="${jogl.dist.dir}/jogl-linux/GL.java"      todir="../build/gensrc/classes/javax/media/opengl" />
    <copy file="${jogl.dist.dir}/jogl-linux/GLU.java"     todir="../build/gensrc/classes/javax/media/opengl/glu" />
    <copy file="${jogl.dist.dir}/jogl-linux/GLUquadric.java"     todir="../build/gensrc/classes/javax/media/opengl/glu" />
        <zip destfile="${jogl.dist.dir}/jogl-${tmp.version}-src.zip"
         basedir="../.."
         includes="gluegen/LICENSE.txt,gluegen/doc/**,gluegen/make/**,gluegen/src/**,jogl/*.txt,jogl/build/gensrc/classes/javax/media/opengl/**,jogl/doc/**,jogl/make/**,jogl/src/**"
         excludes="**/*.class,**/*~"
         />
        <!-- Create zip archives suitable for developers -->
        <!-- Unfortunately, we have to replicate the os/arch name combinations from
             gluegen-cpptasks.xml. The reason for this is that we can't generate these
             zip archives on the platform where the builds run; we have to run the dist
             target in order to get the platform-independent jogl.jar. -->
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="linux-i586" />
            <param name="zip.so.suffix"  value=".so" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-linux/32" />
        </antcall>
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="linux-amd64" />
            <param name="zip.so.suffix"  value=".so" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-linux/64" />
        </antcall>
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="macosx-ppc" />
            <param name="zip.so.suffix"  value=".jnilib" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-macosx/ppc" />
        </antcall>
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="macosx-universal" />
            <param name="zip.so.suffix"  value=".jnilib" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-macosx/fat" />
        </antcall>
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="solaris-i586" />
            <param name="zip.so.suffix"  value=".so" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-solx86/32" />
        </antcall>
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="solaris-amd64" />
            <param name="zip.so.suffix"  value=".so" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-solx86/64" />
        </antcall>
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="solaris-sparc" />
            <param name="zip.so.suffix"  value=".so" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-solsparc/32" />
        </antcall>
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="solaris-sparcv9" />
            <param name="zip.so.suffix"  value=".so" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-solsparc/64" />
        </antcall>
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="windows-i586" />
            <param name="zip.so.suffix"  value=".dll" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-win/32" />
        </antcall>
        <antcall target="dist.build.zip" inheritAll="true">
            <param name="zip.os.arch"    value="windows-amd64" />
            <param name="zip.so.suffix"  value=".dll" />
            <param name="zip.src.so.dir" value="${jogl.dist.dir}/jogl-win/64" />
        </antcall>
        <!-- Create one last zip archive by hand, this one containing all of the -->
        <!-- Java Web Start jar files (for easier redistribution) -->
        <zip destfile="${jogl.dist.dir}/jogl-${tmp.version}-webstart.zip"
         basedir="${jogl.dist.dir}"
         includes="*.jar" />
        <!-- Create a version.txt file indicating which version we just built -->
        <echo message="${tmp.version}" file="${jogl.dist.dir}/version.txt" />
    </target>

    <!-- ================================================================== -->
    <!--
       - Clean up all that is built.
      -->
    <target name="clean" description="Remove all build products" depends="declare.common">
        <delete includeEmptyDirs="true" quiet="true">
            <fileset dir="${build}" />
            <fileset dir="${javadoc}" />
            <fileset dir="${javadoc.spec}" />
            <fileset dir="${javadoc.dev}" />
        </delete>
    </target>

    <!-- ================================================================== -->
    <!--
       - Build everything.
      -->
    <target name="all" description="Build JOGL JAR file(s) and native libraries." depends="load.user.properties,init,jar,c.build.jogl" />

    <!-- ================================================================== -->
    <!--
       - Build everything and use Sun's Implementation tag in the manifest to
       - indicate this is the Reference Implementation.
      -->
    <target name="RI">
        <!-- Set property for using the RI manifest file so jogl.jar is versioned
           - properly
          -->
          <property name="RImanifestfile" value="joglRIversion" />
          <antcall target="all" inheritRefs="true" />
    </target>
</project>