-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
124 lines (111 loc) · 6.2 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="UTF-8"?>
<project name="jpsx" default="default" basedir=".">
<property file="build.properties"/>
<property name="src" value="${basedir}/src"/>
<property name="bootstrap.src" value="${src}/bootstrap/java"/>
<property name="runtime.src" value="${src}/runtime/java"/>
<property name="api.src" value="${src}/api/java"/>
<property name="lwjgl.src" value="${src}/lwjgl/java" />
<property name="classes" value="${basedir}/classes"/>
<property name="bootstrap.classes" value="${classes}/bootstrap"/>
<property name="runtime.classes" value="${classes}/runtime"/>
<property name="api.classes" value="${classes}/api"/>
<property name="lwjgl.classes" value="${classes}/lwjgl" />
<property name="bcel.sourcepath" value="${basedir}/external/bcel-5.1" />
<property name="bcel.classpath" value="${bcel.sourcepath}/bin/bcel.jar" />
<property name="log4j.classpath" value="${basedir}/external/log4j-1.2.13.jar" />
<property name="lwjgl.classpath" value="${basedir}/external/lwjgl-2.9.1/jar/lwjgl.jar" />
<property name="jar.path" value="${basedir}/ship" />
<property name="dist.path" value="${basedir}/dist" />
<target name="default" depends="api_build,bootstrap_build,runtime_build,lwjgl_build,package"/>
<target name="dist" depends="default">
<zip destfile="${dist.path}/jpsx.zip">
<zipfileset dir="${jar.path}" includes="*.jar" prefix="./ship" />
<zipfileset dir="." includes="LICENSE" prefix="."/>
<zipfileset dir="." includes="README.md" prefix="."/>
<zipfileset dir="." includes="jpsx.xml" prefix="."/>
<zipfileset dir="." includes="osx.sh" prefix="."/>
<zipfileset dir="." includes="log4j.properties" prefix="."/>
<zipfileset dir="external/lwjgl-2.9.1" prefix="external/lwjgl-2.9.1" />
</zip>
</target>
<target name="env">
</target>
<target name="clean" depends="env">
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${classes}"/>
</delete>
</target>
<target name="dirs">
<mkdir dir="${classes}"/>
<mkdir dir="${bootstrap.classes}"/>
<mkdir dir="${runtime.classes}"/>
<mkdir dir="${api.classes}"/>
<mkdir dir="${lwjgl.classes}"/>
</target>
<target name="package">
<jar destfile="${jar.path}/jpsx.jar">
<fileset dir="${bootstrap.classes}"/>
<fileset dir="${runtime.classes}"/>
<fileset dir="${api.classes}"/>
<fileset file="LICENSE"/>
<zipgroupfileset dir="external" includes="bcel-5.1/bin/bcel.jar log4j-1.2.13.jar"/>
<manifest>
<attribute name="Main-Class" value="org.jpsx.bootstrap.JPSXLauncher"/>
</manifest>
</jar>
<jar destfile="${jar.path}/jpsx-lwjgl.jar">
<fileset dir="${lwjgl.classes}" />
<fileset file="LICENSE"/>
</jar>
</target>
<target name="bcel_build">
<ant antfile="build.xml" dir="${bcel.sourcepath}" target="jar" inheritAll="false" />
</target>
<target name="api_build" depends="env,dirs,bcel_build">
<javac source="1.5" target="1.5" srcdir="${api.src}" destdir="${api.classes}" debug="on">
<classpath>
<pathelement path="${bcel.classpath}"/>
<pathelement path="${log4j.classpath}"/>
</classpath>
<!--<include name="org/jpsx/api/**"/>-->
</javac>
</target>
<target name="bootstrap_build" depends="api_build,env,dirs,bcel_build">
<javac source="1.5" target="1.5" srcdir="${bootstrap.src}" destdir="${bootstrap.classes}" debug="on">
<classpath>
<pathelement path="${bcel.classpath}"/>
<pathelement path="${log4j.classpath}"/>
<pathelement path="${api.classes}"/>
</classpath>
<!--<include name="org/jpsx/bootstrap/**"/>-->
</javac>
</target>
<target name="runtime_build" depends="api_build,bootstrap_build,env,dirs,bcel_build">
<javac source="1.5" target="1.5" srcdir="${runtime.src}" destdir="${runtime.classes}" debug="on">
<classpath>
<pathelement path="${bcel.classpath}"/>
<pathelement path="${log4j.classpath}"/>
<pathelement path="${api.classes}"/>
<pathelement path="${bootstrap.classes}"/>
</classpath>
<!--<include name="org/jpsx/runtime/**"/>-->
</javac>
<delete>
<fileset dir="${runtime.classes}">
<include name="org/jpsx/runtime/components/hardware/gpu/GPUGenerated*.class"/>
</fileset>
</delete>
</target>
<target name="lwjgl_build" depends="api_build,bootstrap_build,runtime_build,env,dirs,bcel_build">
<javac source="1.5" target="1.5" srcdir="${lwjgl.src}" destdir="${lwjgl.classes}" debug="on">
<classpath>
<pathelement path="${log4j.classpath}"/>
<pathelement path="${api.classes}"/>
<pathelement path="${bootstrap.classes}"/>
<pathelement path="${runtime.classes}"/>
<pathelement path="${lwjgl.classpath}"/>
</classpath>
</javac>
</target>
</project>