Menu

[r2005]: / trunk / LWJGL / build.xml  Maximize  Restore  History

Download this file

707 lines (634 with data), 30.6 kB

  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
<project name="LWJGL" default="compile" basedir=".">
<!-- ================================================================== -->
<!-- Global properties for build -->
<!-- ================================================================== -->
<property name="lwjgl.src" value="./src" />
<property name="lwjgl.src.native" value="${lwjgl.src}/native" />
<property name="lwjgl.src.headers" value="${lwjgl.src.native}/common" />
<property name="lwjgl.src.templates" value="${lwjgl.src}/templates" />
<property name="lwjgl.bin" value="./bin" />
<property name="lwjgl.lib" value="./libs" />
<property name="lwjgl.dist" value="./dist" />
<property name="lwjgl.docs" value="./doc" />
<property name="lwjgl.temp" value="./temp" />
<property name="lwjgl.res" value="./res" />
<property name="lwjgl.version" value="0.96" />
<!-- ================================================================== -->
<!-- Filesets used for targets -->
<!-- ================================================================== -->
<!-- Files to include in the lwjgl.jar file -->
<fileset id="lwjgl.fileset" dir="${lwjgl.bin}">
<include name="**" />
<exclude name="**.*" />
<exclude name="org/lwjgl/fmod3/**" />
<exclude name="org/lwjgl/test/**" />
<exclude name="org/lwjgl/util/**" />
<exclude name="org/lwjgl/devil/**" />
<exclude name="org/lwjgl/examples/**" />
</fileset>
<!-- Files to include in the lwjgl_test.jar file -->
<fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}">
<exclude name="**.*" />
<include name="org/lwjgl/test/**" />
<include name="org/lwjgl/examples/**" />
</fileset>
<!-- Files to include in the lwjgl_util.jar file -->
<fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}">
<exclude name="**.*" />
<include name="org/lwjgl/util/**" />
</fileset>
<!-- Files to include in the lwjgl_fmod3.jar file -->
<fileset id="lwjgl_fmod3.fileset" dir="${lwjgl.bin}">
<exclude name="**.*" />
<include name="org/lwjgl/fmod3/**" />
</fileset>
<!-- Files to include in the lwjgl_devil.jar file -->
<fileset id="lwjgl_devil.fileset" dir="${lwjgl.bin}">
<exclude name="**.*"/>
<include name="org/lwjgl/devil/**"/>
</fileset>
<!-- Files to make Javadoc from -->
<fileset id="lwjgl.javadoc.fileset" dir="${lwjgl.src}/java">
<include name="**/*.java" />
<exclude name="org/lwjgl/test/**" />
<exclude name="org/lwjgl/examples/**" />
<exclude name="org/lwjgl/util/generator/**" />
</fileset>
<!-- Files to include in common package -->
<patternset id="lwjgl-common.fileset">
<include name="*.jar" />
<include name="CREDITS" />
<include name="LICENSE" />
<include name="README" />
<include name="lwjgl_hidden_switches.text" />
</patternset>
<!-- Files to include in win32 package -->
<patternset id="lwjgl-win32.fileset">
<patternset refid="lwjgl-common.fileset" />
<include name="lwjgl.dll" />
<include name="lwjgl-fmod3.dll" />
<include name="lwjgl-devil.dll" />
<include name="lwjglaudio.dll" />
</patternset>
<!-- Files to include in linux, glibc2.3 package -->
<patternset id="lwjgl-linux.fileset">
<patternset refid="lwjgl-common.fileset" />
<include name="liblwjgl.so" />
<include name="liblwjgl-fmod3.so" />
<include name="liblwjgl-devil.so" />
<include name="libopenal.so" />
</patternset>
<!-- Files to include in mac os x package -->
<patternset id="lwjgl-macosx.fileset">
<patternset refid="lwjgl-common.fileset" />
<include name="liblwjgl.jnilib" />
<include name="liblwjgl-fmod3.jnilib" />
<include name="liblwjgl-devil.jnilib" />
<include name="openal.dylib" />
</patternset>
<!-- Files to include in source distribution -->
<fileset id="lwjgl.source.fileset" dir=".">
<include name="build.xml" />
<include name="src/**" />
<include name="platform_build/**" />
<exclude name="**/*CVS*" />
<exclude name="native/projb/**" />
</fileset>
<!-- Files to include in media distribution -->
<fileset id="lwjgl.media.fileset" dir="${lwjgl.res}">
<include name="**" />
<exclude name="**/*CVS*" />
</fileset>
<!-- ================================================================== -->
<!-- Everything below this line is targets. -->
<!-- Do not modify, unless you know what you're doing -->
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- Initialize build -->
<!-- ================================================================== -->
<target name="-initialize">
<mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" />
<mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" />
<mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" />
<mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" />
<mkdir dir="${lwjgl.res}" taskname="initialiazing res folder" />
<mkdir dir="${lwjgl.temp}" taskname="initialiazing temp folder" />
</target>
<!-- Performs all the tasks needed for a distribution of LWJGL -->
<target name="all" description="Compile. Make jars. Javadoc and distribute">
<!-- Though we perform all targets, we do it in somewhat mixed. -->
<!-- This is because we want the 'distribution_application' target to be -->
<!-- executed as soon as possible, since this target is most likely to fail. -->
<!-- That way we don't spend time doing javadocs, if the 'distribution_application' -->
<!-- target is going to fail anyway. However we cannot call the 'distribution' before -->
<!-- the javadoc target, since the 'distribution' target will try to create the javadoc -->
<!-- archive. -->
<antcall target="clean" />
<antcall target="-initialize" />
<antcall target="compile" />
<antcall target="compile_native" />
<antcall target="jars" />
<antcall target="-distribution_application" />
<antcall target="javadoc" />
<antcall target="-distribution_javadoc" />
<antcall target="-distribution_source" />
<antcall target="-internal_clean" />
</target>
<!-- Performs all the tasks needed for a distribution of LWJGL -->
<target name="non-javadoc-build" description="Compile. Make jars. Javadoc and distribute">
<!-- Though we perform all targets, we do it in somewhat mixed. -->
<!-- This is because we want the 'distribution_application' target to be -->
<!-- executed as soon as possible, since this target is most likely to fail. -->
<!-- That way we don't spend time doing javadocs, if the 'distribution_application' -->
<!-- target is going to fail anyway. However we cannot call the 'distribution' before -->
<!-- the javadoc target, since the 'distribution' target will try to create the javadoc -->
<!-- archive. -->
<antcall target="-initialize"/>
<antcall target="compile"/>
<antcall target="compile_native"/>
<antcall target="jars"/>
<antcall target="-distribution_application"/>
</target>
<!-- Performs all the tasks needed for a distribution of LWJGL -->
<target name="non-javadoc-rebuild" description="Compile. Make jars. Javadoc and distribute">
<!-- Though we perform all targets, we do it in somewhat mixed. -->
<!-- This is because we want the 'distribution_application' target to be -->
<!-- executed as soon as possible, since this target is most likely to fail. -->
<!-- That way we don't spend time doing javadocs, if the 'distribution_application' -->
<!-- target is going to fail anyway. However we cannot call the 'distribution' before -->
<!-- the javadoc target, since the 'distribution' target will try to create the javadoc -->
<!-- archive. -->
<antcall target="clean"/>
<antcall target="-initialize"/>
<antcall target="compile"/>
<antcall target="compile_native"/>
<antcall target="jars"/>
<antcall target="-distribution_application"/>
</target>
<!-- Cleans up any files created during the execution of this script -->
<target name="clean" description="Cleans the diectories controlled by this ant script">
<delete dir="${lwjgl.temp}" quiet="true" failonerror="false" taskname="cleaning temp folder" />
<delete dir="${lwjgl.dist}" quiet="true" failonerror="false" taskname="cleaning dist folder" />
<delete dir="${lwjgl.lib}" quiet="true" failonerror="false" taskname="cleaning libs folder" />
<delete dir="${lwjgl.docs}/javadoc" quiet="true" failonerror="false" taskname="cleaning javadoc folder" />
<delete dir="${lwjgl.bin}/org" quiet="true" failonerror="false" taskname="cleaning bin folder" />
<delete taskname="cleaning bin folder" failonerror="false">
<fileset dir="${lwjgl.bin}" includes="*.class" />
</delete>
</target>
<!-- Compiles the Java source code -->
<target name="generators" description="Compiles the native method generators">
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator">
<compilerarg value="-Xlint:all"/>
</javac>
</target>
<target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/>
<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
<!-- Generate OpenAL -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-d"/>
<arg path="${lwjgl.src.headers}"/>
<arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/>
<arg value="-Ageneratechecks"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java"/>
</apply>
</target>
<target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
<!-- there's no apt task in ant yet, so we'll just invoke it manually for now -->
<!-- Generate core GL -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-d"/>
<arg path="${lwjgl.src.headers}"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/GL*.java"/>
</apply>
<!-- Generate ARB -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-d"/>
<arg path="${lwjgl.src.headers}/arb"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/ARB*.java"/>
</apply>
<!-- Generate ATI -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-d"/>
<arg path="${lwjgl.src.headers}/ati"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/ATI*.java"/>
</apply>
<!-- Generate EXT -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-d"/>
<arg path="${lwjgl.src.headers}/ext"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/EXT*.java"/>
</apply>
<!-- Generate NV -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-d"/>
<arg path="${lwjgl.src.headers}/nv"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/NV*.java"/>
</apply>
<!-- Generate HP -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-d"/>
<arg path="${lwjgl.src.headers}/hp"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/HP*.java"/>
</apply>
<!-- Generate IBM -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-d"/>
<arg path="${lwjgl.src.headers}/ibm"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/IBM*.java"/>
</apply>
<!-- Generate SUN -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-d"/>
<arg path="${lwjgl.src.headers}/sun"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/SUN*.java"/>
</apply>
</target>
<target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
<!-- Generate context capabilities -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.ReferencesGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/*.java"/>
</apply>
</target>
<target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
<!-- Generate context capabilities -->
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/java"/>
<arg value="-Acontextspecific"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/*.java"/>
</apply>
</target>
<!-- Compiles the Java source code -->
<target name="compile" description="Compiles the java source code">
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/*.java" source="1.4" target="1.4" taskname="lwjgl" />
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/input/**" source="1.4" target="1.4" taskname="input" />
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/openal/**" source="1.4" target="1.4" taskname="openal" />
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/opengl/**" source="1.4" target="1.4" taskname="opengl" />
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.4" target="1.4" taskname="test" />
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" />
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/**" excludes="org/lwjgl/util/generator/**" source="1.4" target="1.4" taskname="util" />
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/fmod3/**" source="1.4" target="1.4" taskname="fmod" />
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/devil/**" source="1.4" target="1.4" taskname="devil"/>
</target>
<!-- Compiles the native files -->
<target name="compile_native" depends="headers" description="Compiles the native files">
<!-- check each platform, and run their build target -->
<condition property="lwjgl.platform.windows">
<os family="windows" />
</condition>
<antcall target="-compile_native_win32" />
<condition property="lwjgl.platform.linux">
<os name="Linux" />
</condition>
<antcall target="-compile_native_linux" />
<condition property="lwjgl.platform.mac">
<os name="Mac OS X" />
</condition>
<antcall target="-compile_native_mac" />
</target>
<uptodate property="lwjgl.main.built" targetfile="${lwjgl.lib}/lwjgl.dll" >
<srcfiles dir= "${lwjgl.src.native}/common" includes="*.c*"/>
<srcfiles dir= "${lwjgl.src.native}/common/arb" includes="*.c"/>
<srcfiles dir= "${lwjgl.src.native}/common/nv" includes="*.c"/>
<srcfiles dir= "${lwjgl.src.native}/common/ext" includes="*.c"/>
<srcfiles dir= "${lwjgl.src.native}/common/ati" includes="*.c"/>
<srcfiles dir= "${lwjgl.src.native}/win32" includes="*.cpp"/>
</uptodate>
<uptodate property="lwjgl.fmod.built" targetfile="${lwjgl.lib}/lwjgl-fmod3.dll" >
<srcfiles dir= "${lwjgl.src.native}/common" includes="*.c"/>
<srcfiles dir= "${lwjgl.src.native}/common/fmod3" includes="*.c"/>
</uptodate>
<uptodate property="lwjgl.devil.built" targetfile="${lwjgl.lib}/lwjgl-devil.dll" >
<srcfiles dir= "${lwjgl.src.native}/common" includes="*.c"/>
<srcfiles dir= "${lwjgl.src.native}/common/devil" includes="*.c"/>
</uptodate>
<!-- Compiles LWJGL on Win32 platforms -->
<target name="-compile_native_win32" if="lwjgl.platform.windows">
<echo>Compiling Win32 LWJGL version</echo>
<antcall target="-compile_native_win32_main" />
<antcall target="-compile_native_win32_fmod" />
<antcall target="-compile_native_win32_devil" />
<!-- optimize using upx -->
<!-- <exec dir="${lwjgl.lib}" executable="upx">
<arg line="-9 -f win32/*.dll"/>
</exec> -->
<!-- copy to libs -->
</target>
<target name="-compile_native_win32_main" unless="lwjgl.main.built">
<!-- build main -->
<exec dir="platform_build/win32_ms_cmdline" executable="cmd.exe" failonerror="true">
<arg line="/c build.bat" />
</exec>
<move file="platform_build/win32_ms_cmdline/lwjgl.dll" tofile="${lwjgl.lib}/lwjgl.dll"/>
</target>
<target name="-compile_native_win32_fmod" unless="lwjgl.fmod.built">
<!-- build fmod -->
<exec dir="platform_build/win32_ms_cmdline" executable="cmd.exe" failonerror="true">
<arg line="/c build-fmod.bat" />
</exec>
<move file="platform_build/win32_ms_cmdline/lwjgl-fmod3.dll" tofile="${lwjgl.lib}/lwjgl-fmod3.dll"/>
</target>
<target name="-compile_native_win32_devil" unless="lwjgl.devil.built">
<!-- build devil -->
<exec dir="platform_build/win32_ms_cmdline" executable="cmd.exe" failonerror="true">
<arg line="/c build-devil.bat"/>
</exec>
<move file="platform_build/win32_ms_cmdline/lwjgl-devil.dll" tofile="${lwjgl.lib}/lwjgl-devil.dll"/>
</target>
<!-- Compiles LWJGL on Linux platforms -->
<target name="-compile_native_linux" if="lwjgl.platform.linux">
<echo>Compiling Linux LWJGL version</echo>
<apply executable="sh" dir="${lwjgl.src.native}">
<fileset dir="${lwjgl.src.native}">
<include name="build.sh" />
</fileset>
</apply>
<move file="${lwjgl.src.native}/linux/liblwjgl.so" tofile="${lwjgl.lib}/liblwjgl.so" />
</target>
<!-- Compiles LWJGL on Mac OS X platforms -->
<target name="-compile_native_mac" if="lwjgl.platform.mac">
<echo>Checking for valid OpenAL install</echo>
<property name="openal.home" value="/projects/openal"/>
<available file="${openal.home}" type="dir" property="isValidOpenALHome"/>
<fail message="openal.home in build.xml in target compile_native_mac does not point to valid OpenAL install. Please change this to the location of your OpenAL install." unless="isValidOpenALHome"/>
<echo>Valid OpenAL install located</echo>
<echo>Compiling Mac OS X LWJGL version</echo>
<exec dir="${lwjgl.src.native}/macosx" executable="make" failonerror="true">
<env key="AL" path="${openal.home}" />
</exec>
<move file="${lwjgl.src.native}/macosx/liblwjgl.jnilib" tofile="${lwjgl.lib}/liblwjgl.jnilib" />
</target>
<!-- Packages the java files -->
<target name="jars">
<!-- Create lwjgl.jar -->
<jar destfile="${lwjgl.lib}/lwjgl.jar" taskname="lwjgl.jar">
<fileset refid="lwjgl.fileset" />
</jar>
<!-- Create lwjgl.jar -->
<jar destfile="${lwjgl.lib}/lwjgl_devil.jar" taskname="lwjgl_devil.jar">
<fileset refid="lwjgl_devil.fileset"/>
</jar>
<!-- Create lwjgl_test.jar -->
<jar destfile="${lwjgl.lib}/lwjgl_test.jar" taskname="lwjgl_test.jar">
<fileset refid="lwjgl_test.fileset" />
</jar>
<!-- Create lwjgl_util.jar -->
<jar destfile="${lwjgl.lib}/lwjgl_util.jar" taskname="lwjgl_util.jar">
<fileset refid="lwjgl_util.fileset" />
</jar>
<!-- Create lwjgl_fmod.jar -->
<jar destfile="${lwjgl.lib}/lwjgl_fmod3.jar" taskname="lwjgl_fmod3.jar">
<fileset refid="lwjgl_fmod3.fileset" />
</jar>
<!-- Create lwjgl_devil.jar -->
<jar destfile="${lwjgl.lib}/lwjgl_devil.jar" taskname="lwjgl_devil.jar">
<fileset refid="lwjgl_devil.fileset" />
</jar>
<!-- Create lwjgl_media.jar -->
<jar destfile="${lwjgl.lib}/lwjgl_media.jar" taskname="lwjgl_media.jar">
<fileset refid="lwjgl.media.fileset" />
</jar>
</target>
<!-- Creates the Javadoc -->
<target name="javadoc" description="Creates javadoc from java source code">
<javadoc destdir="${lwjgl.docs}/javadoc" author="true" version="true" use="true" source="1.4" windowtitle="LWJGL API">
<fileset refid="lwjgl.javadoc.fileset" />
<doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright &#169; 2002-2005 lwjgl.org. All Rights Reserved.</i>]]></bottom>
</javadoc>
</target>
<!-- Creates a distribution from the compiled files -->
<target name="-distribution" depends="jars">
<antcall target="-distribution_application" />
<antcall target="-distribution_javadoc" />
<antcall target="-distribution_source" />
<antcall target="-distribution_resources" />
<antcall target="-internal_clean" />
</target>
<!-- Creates a build of LWJGL directly from CVS -->
<target name="cvsbuild" description="Builds lwjgl from cvs">
<!-- Check that files do not exist BEFORE doing the CVS build -->
<available file="LWJGL/build.xml" property="lwjgl.preexistingfiles" />
<available file="${lwjgl.src}/java/org/lwjgl/Sys.java" property="lwjgl.preexistingfiles" />
<fail if="lwjgl.preexistingfiles" message="Cannot perform webbuild from nonempty folder" />
<!-- checkout files and build using checked out buildfiles 'all' target -->
<cvs command="export -D 'now'" compressionlevel="3" cvsRoot=":pserver:anonymous@cvs.sf.net:/cvsroot/java-game-lib" package="LWJGL/build.xml" dest="." />
<cvs command="export -D 'now'" compressionlevel="3" cvsRoot=":pserver:anonymous@cvs.sf.net:/cvsroot/java-game-lib" package="LWJGL/src" dest="." />
<cvs command="export -D 'now'" compressionlevel="3" cvsRoot=":pserver:anonymous@cvs.sf.net:/cvsroot/java-game-lib" package="LWJGL/doc" dest="." />
<ant dir="LWJGL" target="all" />
</target>
<!-- Generates the native headers from source files -->
<target name="headers" description="invokes javah on java classes" depends="compile">
<!-- platform specific classes -->
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux" force="yes">
<class name="org.lwjgl.opengl.LinuxDisplay" />
<class name="org.lwjgl.opengl.LinuxPeerInfo" />
<class name="org.lwjgl.opengl.LinuxPbufferPeerInfo" />
<class name="org.lwjgl.opengl.LinuxDisplayPeerInfo" />
<class name="org.lwjgl.opengl.LinuxAWTGLCanvasPeerInfo" />
<class name="org.lwjgl.opengl.LinuxContextImplementation" />
<class name="org.lwjgl.opengl.LinuxCanvasImplementation" />
</javah>
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/win32" force="yes">
<class name="org.lwjgl.opengl.Win32PbufferPeerInfo" />
<class name="org.lwjgl.opengl.Win32Display" />
<class name="org.lwjgl.NativeSysImplementation" />
<class name="org.lwjgl.opengl.Win32AWTGLCanvasPeerInfo" />
<class name="org.lwjgl.opengl.Win32PeerInfo" />
<class name="org.lwjgl.opengl.Win32DisplayPeerInfo" />
<class name="org.lwjgl.opengl.Win32ContextImplementation" />
</javah>
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes">
<class name="org.lwjgl.opengl.MacOSXCanvasPeerInfo" />
<class name="org.lwjgl.opengl.MacOSXPeerInfo" />
<class name="org.lwjgl.opengl.MacOSXPbufferPeerInfo" />
<class name="org.lwjgl.opengl.MacOSXDisplay" />
<class name="org.lwjgl.opengl.MacOSXContextImplementation" />
</javah>
<!-- lwjgl -->
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}" force="yes">
<class name="org.lwjgl.opengl.AWTSurfaceLock" />
<class name="org.lwjgl.DefaultSysImplementation" />
<class name="org.lwjgl.input.Cursor" />
<class name="org.lwjgl.input.Keyboard" />
<class name="org.lwjgl.input.Mouse" />
<class name="org.lwjgl.openal.ALC" />
<class name="org.lwjgl.openal.AL" />
<class name="org.lwjgl.opengl.GLContext" />
<class name="org.lwjgl.opengl.Pbuffer" />
</javah>
<!-- fmod -->
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/fmod3" force="yes">
<class name="org.lwjgl.fmod3.FMOD" />
<class name="org.lwjgl.fmod3.FMusic" />
<class name="org.lwjgl.fmod3.FSound" />
</javah>
<!-- devil -->
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/devil" force="yes">
<class name="org.lwjgl.devil.IL"/>
<class name="org.lwjgl.devil.ILU"/>
<class name="org.lwjgl.devil.ILUT"/>
</javah>
</target>
<!-- Creates a versioned distribution for all supported platforms -->
<target name="-distribution_application">
<!-- check each platform, and run their copy target -->
<antcall target="-distribute_win32" />
<antcall target="-distribute_linux" />
<antcall target="-distribute_macosx" />
</target>
<!-- Distributes win32 files -->
<target name="-distribute_win32">
<!-- copy files from lib/platform to temp -->
<copy todir="${lwjgl.temp}/lwjgl-win32-${lwjgl.version}">
<fileset dir="${lwjgl.lib}">
<patternset refid="lwjgl-win32.fileset" />
<patternset refid="lwjgl-common.fileset" />
</fileset>
<fileset dir="${lwjgl.docs}">
<patternset refid="lwjgl-common.fileset" />
</fileset>
</copy>
<zip destfile="${lwjgl.dist}/lwjgl-win32-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="lwjgl-win32-${lwjgl.version}/**" />
</target>
<!-- Distributes linux files -->
<target name="-distribute_linux">
<!-- copy files from lib/platform to temp -->
<copy todir="${lwjgl.temp}/lwjgl-linux-${lwjgl.version}">
<fileset dir="${lwjgl.lib}">
<patternset refid="lwjgl-linux.fileset" />
<patternset refid="lwjgl-common.fileset" />
</fileset>
<fileset dir="${lwjgl.docs}">
<patternset refid="lwjgl-common.fileset" />
</fileset>
</copy>
<zip destfile="${lwjgl.dist}/lwjgl-linux-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="lwjgl-linux-${lwjgl.version}/**" />
</target>
<!-- Distributes macosx files -->
<target name="-distribute_macosx">
<!-- copy files from lib/platform to temp -->
<copy todir="${lwjgl.temp}/lwjgl-macosx-${lwjgl.version}">
<fileset dir="${lwjgl.lib}">
<patternset refid="lwjgl-macosx.fileset" />
<patternset refid="lwjgl-common.fileset" />
</fileset>
<fileset dir="${lwjgl.docs}">
<patternset refid="lwjgl-common.fileset" />
</fileset>
</copy>
<zip destfile="${lwjgl.dist}/lwjgl-macosx-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="lwjgl-macosx-${lwjgl.version}/**" />
</target>
<!-- Creates a versioned distribution of javadocs -->
<target name="-distribution_javadoc">
<zip destfile="${lwjgl.dist}/lwjgl-docs-${lwjgl.version}.zip" basedir="${lwjgl.docs}" includes="javadoc/**" />
</target>
<!-- Creates a versioned distribution of the source code -->
<target name="-distribution_source">
<zip destfile="${lwjgl.dist}/lwjgl-source-${lwjgl.version}.zip">
<fileset refid="lwjgl.source.fileset" />
</zip>
</target>
<!-- Creates a versioned distribution of the resource files -->
<target name="-distribution_resources">
<zip destfile="${lwjgl.dist}/lwjgl-media-${lwjgl.version}.zip">
<fileset refid="lwjgl.media.fileset" />
</zip>
</target>
<!-- clean internal temporary directories -->
<target name="-internal_clean">
<delete dir="${lwjgl.temp}" taskname="cleanup" />
</target>
</project>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.