ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: Using ANT with 'C' projects - need help
Date Fri, 20 Jun 2003 16:25:08 GMT
you can use the <cc/> task from the
ant-contrib cpptasks project.

It is still a little rough on the edges
but it is quite powerful

  - automatic dependencies
  - recursive source files

    <target name="probe-compile"  depends="init">
        <mkdir dir="${build.lib.dir}"/>
        <mkdir dir="${obj.dir}/probe"/>
        <cc link="static" objdir="${obj.dir}/probe"
            <compiler refid="compiler.options"/>
            <fileset dir="${src.dir}/common" includes="**/*.cpp" />
            <fileset dir="${src.dir}/qos" includes="**/*.cpp"
            <linker name="ar"/>


On Fri, 2003-06-20 at 17:14, Phillip Lord wrote:
> >>>>> "Jeff" == Faist, Jeff <> writes:
>   Jeff> I'm just learning ANT but have used make extensively in the
>   Jeff> past.
>   Jeff> ANT seems to be very Java specific as it does not have default
>   Jeff> build rules for C++ or VB like it does for java compiles.
>   Jeff> So far it does not seem to be very hard to create a build
>   Jeff> target with an EXEC command that calls the VC++ command line
>   Jeff> with he proper params.  I'm still working on the nested
>   Jeff> build/include concept to do the entire system and how to deal
>   Jeff> with my hidden dependencies and circular build issues.
>   Jeff> So ya, it can do C++ builds, if it's better than Make remains
>   Jeff> to be seen.
> My own feeling is that make is nicer for doing C/C++ builds, while ant
> is better for doing Java. 
> The main advantages of using make with C/C++ is not make itself, but
> the layer of stuff on top of make that exists, such as
> autoconf/automake if you are developing for the unix, or similar
> environments. 
> For Java the advantages of ant are don't have to
> continually relaunch javac, you avoid the circular dependency issue
> and so on. But none of these apply to ant with C. 
> It would be nice if there were a universal build system, but there
> isn't. make comes closer than ant, largely because of its maturity,
> but from my perspective I use several build tools, I expect to be
> doing so for the foreseeable future. 
> Ho hum....
> Phil
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message