Worlds smallest JUCE build file (or, bollocks to make)


#1

I had to set this up for our own purposes (ant/c++/java/sql batch testing system). May be of interest to others.

You’ll need Ant (you’ll likely have it already?) from…

http://ant.apache.org/

and the cpptasks from…

http://downloads.sourceforge.net/ant-contrib/cpptasks-1.0b4.tar.gz?modtime=1148053176&big_mirror=0

you’ll need to put “cpptasks.jar” in /usr/share/ant/lib (or whereever your ant lib folder is)

put the following in juce/build/linux as “build.xml”

<?xml version="1.0" ?>
<project default="release"> 
 
	<taskdef resource="cpptasks.tasks"/>
    <typedef resource="cpptasks.types"/>

	<property name="juce.outdir" 	value="../../bin" /> 
	<property name="juce.objdir" 	value="${juce.outdir}/intermediate_linux" />
	<property name="juce.srcdir" 	value="../../src" />
	<property name="juce.libs" 		value="pthread,freetype,X11" />
	<property name="juce.c_args" 	value="-Wall" />
	<fileset id="juce.srcfiles" dir="${juce.srcdir}" includes="**/*.h,**/*.cpp" />

	<target name="release" depends="make-juce-dirs">
		<cc name="g++"
			debug="false" 
			objdir="${juce.objdir}/Release"
			outtype="static"
			outfile="${juce.outdir}/juce"
			multithreaded="true"
			runtime="dynamic">

			<compilerarg value="${juce.c_args}" />
			<defineset define="LINUX=1,NDEBUG=1" />
			<fileset refid="juce.srcfiles" />
			<libset libs="${juce.libs}" />
		</cc>
	</target>

	<target name="debug" depends="make-juce-dirs">
		<cc name="g++"
			debug="true" 
			objdir="${juce.objdir}/Debug"
			outtype="static"
			outfile="${juce.outdir}/juce_debug"
			multithreaded="true"
			runtime="dynamic">

			<compilerarg value="${juce.c_args}" />
			<defineset define="LINUX=1,_DEBUG=1,DEBUG=1" />
			<fileset refid="juce.srcfiles" />
			<libset libs="${juce.libs}" />
		</cc>
	</target>

	<target name="make-juce-dirs">
		<mkdir dir="${juce.objdir}/Release" />
		<mkdir dir="${juce.objdir}/Debug" />
	</target>

</project>

to build do…

for release, or

no more makefiles! yay!!

off to do win32 version…


#2