[ovs-discuss] Enabling user defined preprocessing definitions during compilation of OVS 1.2.2

Ramana Reddy gtvrreddy at gmail.com
Sat Nov 12 06:31:04 UTC 2011

Thank you very much Ben for your reply. I have one more doubt regarding how
to add our own
files( Assume that it is in the ovs/lib directory and the files are
dpif-mine.c and dpif-mine.h) to
automake.mk file in ovs/lib directory without adding immediately after the
existing ovs/lib files.

I mean, is it possible to write some thing like below in automake.mk file,
after adding AC_DEFINE([Ramana], [1], [Enable Ramana's extensions.]) to
configure.ac, so that it controls both modified code in the existing files,
as well
as the newly added files to OVS.

if Ramana
lib_libopenvswitch_a_SOURCES += \
                   lib/dpif-mine.c \

Ramana Reddy.

On Fri, Nov 11, 2011 at 10:29 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Fri, Nov 11, 2011 at 03:35:00PM +0530, Ramana Reddy wrote:
> > I modified some code in OVS-1.2.2 both in user space and kernel
> > space with my own preprocessing directives some thing like:
> > #ifdef Ramana
> > /* my code is here */
> > #endif.
> >
> > Now I want to enable my code during the compilation of OVS-1.2.2.
> > This can be done by defining #define ramana in the header file and
> > adding this header file in the respective places can solve the problem.
> > But some how I do not like to add this header file in all the places.
> > How can we enable this preprocessor directive with out adding a header
> file.
> > Can we pass this one as a parameter to gcc like gcc -Dramana during
> > compilation.
> > if yes, where I should modify in the configuration file or some other
> file.
> Add AC_DEFINE([Ramana], [1], [Enable Ramana's extensions.])
> to configure.ac.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20111112/fe698414/attachment.html>

More information about the discuss mailing list