aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wintab/src/native/build.xml
blob: 152ef24e8897afec855bd5adb6f30b002a619142 (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
<?xml version="1.0"?>

<project name="JInput wintab port, Native code" basedir="." default="compile">
	<property environment="env"/>
	<property name="wintabhome" location="${env.WINTAB_DIR}"/>
	<property name="sdkhome" location="c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2"/>

	<target name="compile_dir">
		<echo message="${compiledir}"/>
		<echo message="wintab: ${wintabhome}"/>
		<apply dir="${compiledir}" failonerror="true" executable="cl" dest="${compiledir}" skipemptyfilesets="true">
			<arg line="/Ox /Wp64 /W2 /nologo /c"/>
			<arg value="/I${sdkhome}\include"/>
			<arg value="/I${wintabhome}\include"/>
			<arg value="/I${java.home}\..\include"/>
			<arg value="/I${java.home}\..\include\win32"/>
			<arg value="/I${commonhome}/src/native"/>
			<arg value="/I.."/>
			<srcfile/>
			<fileset dir="${compiledir}" includes="*.c"/>
			<mapper type="glob" from="*.c" to="*.obj"/>
		</apply>
	</target>

	<!--	<target name="link" unless="nolink">-->
	<target name="link">
		<apply dir="." parallel="true" executable="cl" failonerror="true">
			<arg line="/LD /nologo"/>
			<srcfile/>
			<arg line="/Fe${dllname} /link"/>
			<arg value="/LIBPATH:${java.home}\lib"/>
			<arg value="/LIBPATH:${wintabhome}\lib\I386"/>
			<arg value="/LIBPATH:${sdkhome}\lib"/>
			<arg line="/DLL ${libs}"/>
			<fileset dir="${commonhome}/src/native" includes="*.obj"/>
			<fileset dir="." includes="*.obj"/>
			<fileset dir="../../../windows/src/native" includes="*.obj"/>
		</apply>
	</target>

	<target name="clean">
		<delete>
			<fileset dir="." includes="*.obj"/>
			<fileset dir="." includes="*.dll"/>
		</delete>
	</target>

	<target name="compile">
		<property name="wintablibs" value="Kernel32.lib WINTAB32.LIB User32.lib"/>
		<property name="commonhome" location="../../../common"/>
		<property name="dllname" value="jinput-wintab.dll"/>
		<antcall target="compile_dir">
			<param name="compiledir" location="${commonhome}/src/native"/>
		</antcall>
		<antcall target="compile_dir">
			<param name="compiledir" location="."/>
		</antcall>
		<antcall target="compile_dir">
			<param name="compiledir" location="../../../windows/src/native"/>
		</antcall>
		<!--		<uptodate property="nolink" targetfile="${dllname}">
			<srcfiles dir="." includes="*.obj"/>
		</uptodate>-->
		<antcall target="link">
			<param name="dllname" value="${dllname}"/>
			<param name="libs" value="${wintablibs}"/>
		</antcall>
    </target>
</project>