File: build.xml

package info (click to toggle)
a7xpg 0.11.dfsg1-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,864 kB
  • sloc: xml: 56; makefile: 28
file content (71 lines) | stat: -rw-r--r-- 2,387 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
<!-- Ant build.xml for the D program language -->
<project name="d_build" default="all" basedir=".">
	<!-- Build target program name -->
	<property name="name" value="a7xpg"/>
	<!-- Libraries -->
	<property name="libsdir" value="lib\"/>
	<property name="libs" value="${libsdir}SDL.lib ${libsdir}SDL_mixer.lib ${libsdir}opengl32.lib"/>

	<property name="prog" value="${name}.exe"/>
	<!-- Imported .d files directory -->
	<property name="import" location="import"/>
	<!-- 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="false" failonerror="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"/>
			<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="${prog}"/>
			<arg value="${libs}"/>
			<srcfile/>
		</apply>
	</target>

	<!-- Clean an exe file and obj files -->
	<target name="clean">
		<delete file="${prog}"/>
		<delete>
			<fileset dir="${src}" includes="**/*.obj"/>
		</delete>
	</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="**/*.d"/>
			<arg value="-c"/>
			<arg value="-I${import}"/>
			<arg value="-op"/>
			<srcfile/>
		</apply>	
	</target>
</project>