-
Notifications
You must be signed in to change notification settings - Fork 0
/
cl_link.xml
32 lines (28 loc) · 2.53 KB
/
cl_link.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
<project default="mt">
<description>
Compiles, links, bundles a manifest.
Yep - not pretty, but it works -- without Visual Studio.
</description>
<target name="cl">
<mkdir dir="${project.build.directory}\objs-${arch}"/>
<exec executable="cmd.exe" dir="${basedir}/src/main/c">
<!-- using arg value=... notation leads to "input line too long" -->
<arg line="/E:ON /V:ON /C """${winsdk}\bin\setenv.cmd""" /${machine} /Release /win7 && CL.exe /c /I${project.build.directory}\native\include /I${jniheaders}\win32 /I${jniheaders} /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D VISUALSTUDIO_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"${project.build.directory}\objs-${arch}\" /Fd"${project.build.directory}\objs-${arch}\vcWindows7.0SDK.pdb" /Gd /TP /analyze- MFAudioFileReader.cpp MFFileInputStream.cpp MFUtils.cpp"/>
</exec>
</target>
<target name="link" depends="cl">
<exec executable="cmd.exe" dir="${project.build.directory}\objs-${arch}">
<!-- using arg value=... notation leads to "input line too long" -->
<arg line="/E:ON /V:ON /C """${winsdk}\bin\setenv.cmd""" /${machine} /Release /win7 && link.exe /OUT:..\classes\mfsampledsp-${project.version}-${arch}.dll /INCREMENTAL:NO /NOLOGO mfplat.lib mfreadwrite.lib mfuuid.lib mf.lib propsys.lib ole32.lib /MANIFEST /MANIFESTFILE:mfsampledsp.dll.intermediate.manifest /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /MACHINE:${machine} /DLL MFAudioFileReader.obj MFFileInputStream.obj MFUtils.obj"/>
</exec>
</target>
<target name="mt" depends="link">
<exec executable="cmd.exe" dir="${project.build.directory}">
<!-- using arg value=... notation leads to "input line too long" -->
<arg line="/E:ON /V:ON /C """${winsdk}\bin\setenv.cmd""" /${machine} /Release /win7 && mt.exe /nologo /verbose /outputresource:classes\mfsampledsp-${project.version}-${arch}.dll;#2 /manifest objs-${arch}\mfsampledsp.dll.intermediate.manifest"/>
</exec>
<!-- delete lib and exp files that aren't needed anymore -->
<delete file="${project.build.directory}\classes\mfsampledsp-${project.version}-${arch}.lib"/>
<delete file="${project.build.directory}\classes\mfsampledsp-${project.version}-${arch}.exp"/>
</target>
</project>