ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
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.

http://ant-contrib.sourceforge.net/cc.html

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"
            outfile="${build.lib.dir}/probe.a"
            warnings="none"
            multithreaded="true"
            >
            <compiler refid="compiler.options"/>
            <fileset dir="${src.dir}/common" includes="**/*.cpp" />
            <fileset dir="${src.dir}/qos" includes="**/*.cpp"
                     excludes="**/main/**"/>
            <linker name="ar"/>
        </cc>
    </target>

Peter.

On Fri, 2003-06-20 at 17:14, Phillip Lord wrote:
> >>>>> "Jeff" == Faist, Jeff <Jeff.Faist@encodasystems.com> 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 many...you 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message