File: build.xml

package info (click to toggle)
mu-cade 0.11.dfsg1-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,596 kB
  • sloc: xml: 403; makefile: 28
file content (91 lines) | stat: -rw-r--r-- 3,012 bytes parent folder | download | duplicates (6)
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
<!-- Ant build.xml for the D Programming Language           -->
<!-- Apache Ant             : http://ant.apache.org/        -->
<!-- D Programming Language : http://www.digitalmars.com/d/ -->

<project name="d_build" default="all" basedir=".">
	<!-- Target program name -->
	<property name="name" value="mcd"/>
	<!-- Libraries -->
	<property name="libsdir" value="lib\"/>
	<property name="libs" value="${libsdir}SDL.lib ${libsdir}SDL_mixer.lib ${libsdir}opengl32.lib ${libsdir}glu32.lib ${libsdir}ode.lib ${libsdir}bulletml.lib"/>
	<!-- Program file name -->
	<property name="prog" value="${name}.exe"/>
	<!-- Imported .d files directory -->
	<property name="import" location="import"/>
	<property name="builtimport" value="SDL_mixer.d ode/*.d"/>
	<!-- Source files directory -->
	<property name="src" location="src"/>
	<!-- Resource(icon) files directory -->
	<property name="resource" location="resource"/>

	<!-- Build all -->
	<target name="all" depends="compile, link"/>
	<target name="rebuild" depends="clean, compile, link"/>
	<target name="compile">
		<apply executable="dmd" dir="${src}" dest="${src}" parallel="true" failonerror="true" skipemptyfilesets="true">
			<mapper type="glob" from="*.d" to="*.obj"/>
			<fileset dir="${src}" includes="**/*.d"/>
			<arg value="-c"/>
			<arg value="-I${import}"/>
			<arg value="-op"/>
			<arg value="-O"/>
			<arg value="-release"/>
			<arg value="-version=Win32_release"/>
<!--
			<arg value="-debug"/>
			<arg value="-g"/>
-->
			<srcfile/>
		</apply>
	</target>
	<target name="link">
		<apply executable="dmd" dir="." parallel="true" failonerror="true">
			<fileset dir="${src}" includes="**/*.obj"/>
			<fileset dir="${import}" includes="**/*.obj"/>
			<fileset dir="${resource}" includes="*.RES"/>
			<fileset dir="${resource}" includes="*.def"/>
<!--
			<arg value="-g"/>
			<arg value="-L/MAP"/>
-->
			<arg value="${prog}"/>
			<arg value="${libs}"/>
			<srcfile/>
		</apply>
	</target>

	<!-- Clean a program file and obj files -->
	<target name="clean">
		<delete file="${prog}"/>
		<delete file="${name}.map"/>
		<delete>
			<fileset dir="${src}" includes="**/*.obj"/>
		</delete>
	</target>

	<!-- Run the target -->
	<target name="run">
		<exec executable="${name}" dir=".">
		</exec>
	</target>

	<!-- Create a resource file(for an icon)(BCC55 required) -->
	<target name="resource">
		<apply executable="brcc32" dir="${resource}" parallel="false" failonerror="true">
			<fileset dir="${resource}" includes="${name}.rc"/>
			<srcfile/>
		</apply>
	</target>

	<!-- Build libraries in the import directory -->
	<target name="buildlib">
		<apply executable="dmd" dir="${import}" dest="${import}" parallel="false" failonerror="false">
			<mapper type="glob" from="*.d" to="*.obj"/>
			<fileset dir="${import}" includes="${builtimport}"/>
			<arg value="-c"/>
			<arg value="-I${import}"/>
			<arg value="-op"/>
			<srcfile/>
		</apply>
	</target>
</project>