> >>> +.. code-block:: makefile
> >>> +
> >>> +        PKGCONF = pkg-config
> >>> +
> >>> +        CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
> >>> +        LDFLAGS += $(shell $(PKGCONF) --libs libdpdk)
> >>> +
> >>> +        $(APP): $(SRCS-y) Makefile
> >>> +                $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
> >>
> >> What about a meson-based example?
> >>
> > I didn't think such a thing would be work including, since the number of
> > end-user apps using meson is likely fairly small. We'd also then need to
> > include an example using cmake or other build systems too, for
> > completeness.
> 
> That's a bit of a false equivalence though, because DPDK doesn't support
> CMake, while it does support meson - so it makes sense to provide
> instructions for meson as well. If you only provide instructions for
> make, people will end up using make just because it's less effort to
> "use what you know" than switching to build DPDK using meson *and*
> figuring out how to use meson for your app development as well.
> 
> For example, whenever i need to build a quick-n-dirty DPDK app outside
> of DPDK tree, i use meson because it's the thing i now know that is
> better than make (syntax-wise at least), but it took me a while to
> figure out how to build a DPDK app using meson outside of DPDK build
> tree. The process would've been much easier if there was a ready-made
> example of how to do that.
> 
Ok, it's only a few lines of example, so I'll add in V2.

Reply via email to