Skip to content

Commit

Permalink
Add support for UPX compression of Windows/Linux libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Apr 28, 2015
1 parent 23b27af commit 63e3875
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 6 additions & 3 deletions config/linux/build.xml
Expand Up @@ -114,7 +114,7 @@ License terms: http://lwjgl.org/license.php
<local name="version.script"/>
<property name="version.script" location="config/linux/version.script"/>

<apply dir="${bin.native}" executable="gcc" failonerror="true" parallel="true" taskname="Linker">
<apply dir="${lib}" executable="gcc" failonerror="true" parallel="true" taskname="Linker">
<srcfile/>
<arg line="-shared ${compiler.arch} -fPIC -pthread -o ${LWJGL_LIBRARY} ${libs} -Xlinker --version-script -Xlinker ${version.script}"/>

Expand All @@ -123,10 +123,13 @@ License terms: http://lwjgl.org/license.php
<fileset refid="link-ovr" if:true="${build.ovr}"/>
</apply>

<apply dir="${bin.native}" executable="strip" failonerror="true" taskname="Symbol strip">
<apply dir="${lib}" executable="strip" failonerror="true" taskname="Symbol strip">
<fileset file="${LWJGL_LIBRARY}"/>
</apply>

<move file="${bin.native}/${LWJGL_LIBRARY}" todir="${lib}"/>
<apply executable="${org.lwjgl.upx}/upx" failonerror="true" taskname="UPX" if:set="org.lwjgl.upx">
<arg value="-9"/>
<filelist dir="${lib}" files="${LWJGL_LIBRARY}"/>
</apply>
</target>
</project>
4 changes: 1 addition & 3 deletions config/macosx/build.xml
Expand Up @@ -110,7 +110,7 @@ License terms: http://lwjgl.org/license.php
</target>

<target name="-link" depends="-update-dependencies">
<apply dir="${bin.native}" executable="${compiler}" failonerror="true" parallel="true" taskname="Linker">
<apply dir="${lib}" executable="${compiler}" failonerror="true" parallel="true" taskname="Linker">
<srcfile/>
<arg line='-dynamiclib -Wl,-no_compact_unwind -mmacosx-version-min=${macosx-version-min} -o ${LWJGL_LIBRARY}'/>
<arg line="-framework AppKit"/>
Expand All @@ -124,7 +124,5 @@ License terms: http://lwjgl.org/license.php
<fileset refid="link-objects"/>
<fileset refid="link-libraries"/>
</apply>

<move file="${bin.native}/${LWJGL_LIBRARY}" todir="${lib}"/>
</target>
</project>
7 changes: 5 additions & 2 deletions config/windows/build.xml
Expand Up @@ -100,7 +100,7 @@ License terms: http://lwjgl.org/license.php
</target>

<target name="-link" depends="-update-dependencies">
<apply dir="${bin.native}" executable="cl" failonerror="true" parallel="true" taskname="Linker">
<apply dir="${lib}" executable="cl" failonerror="true" parallel="true" taskname="Linker">
<arg line='/LD /WX /nologo /Fe:"${LWJGL_LIBRARY}"'/>
<srcfile/>
<arg line='/link /OPT:REF,ICF /DLL ${libs}'/>
Expand All @@ -110,6 +110,9 @@ License terms: http://lwjgl.org/license.php
<fileset refid="link-ovr" if:true="${build.ovr}"/>
</apply>

<move file="${bin.native}/${LWJGL_LIBRARY}" todir="${lib}"/>
<apply executable="${org.lwjgl.upx}/upx" failonerror="true" taskname="UPX" if:set="org.lwjgl.upx">
<arg value="-9"/>
<filelist dir="${lib}" files="${LWJGL_LIBRARY}"/>
</apply>
</target>
</project>

0 comments on commit 63e3875

Please sign in to comment.