Difference between revisions of "VPP/Macswapplugin"
From fd.io
< VPP
(Created page with "emacs C-x C-f, /vpp/build-root/emacs-list/all-skel.el M-x eval-buffer M-x shell; mkdir /vpp/devboot M-x make-plugin macswap C-x s OR shell cd ~ ; git clone https://github.com...") |
m (header formatting) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | = Introduction= | |
+ | |||
+ | These instructions will setup the plugin source in '''/vpp/devboot/macswap'''. This location is chosen only for example; there is no direct correlation between the plugin source tree and the VPP source tree. | ||
+ | |||
+ | |||
+ | = Setup the Macswap source code = | ||
+ | |||
+ | == Emacs == | ||
+ | |||
+ | There are a set of templates that Emacs users can make use of to build skeleton plugins, including the macswap plugin. | ||
+ | |||
+ | <pre> | ||
C-x C-f, /vpp/build-root/emacs-list/all-skel.el | C-x C-f, /vpp/build-root/emacs-list/all-skel.el | ||
M-x eval-buffer | M-x eval-buffer | ||
Line 6: | Line 17: | ||
macswap | macswap | ||
C-x s | C-x s | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | == Non-Emacs == | ||
+ | |||
+ | People who do not use Emacs can use a pre-generated copy of the macswap plugin by entering these commands at a shell prompt: | ||
+ | |||
+ | <pre> | ||
+ | cd ~ | ||
+ | git clone https://github.com/alagalah/macswap-plugin | ||
+ | cd macswap-plugin | ||
+ | mkdir /vpp/devboot | ||
+ | tar -zxvf macswap-plugin.tar.gz -C /vpp/devboot | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | = Building the plugin = | ||
+ | |||
+ | At a shell prompt: | ||
+ | |||
+ | <pre> | ||
+ | cd /vpp/devboot/macswap-plugin | ||
+ | autoreconf -i -f | ||
+ | mkdir build | ||
+ | cd build | ||
+ | ../configure --with-plugin-toolkit | ||
+ | make | ||
+ | sudo make install | ||
+ | ls /usr/lib/vpp_plugins/ | ||
+ | </pre> | ||
− | + | NB: This builds against the libraries/headers installed in the system; not those in the local build environment. Both release and debug builds of VPP will search in '''/usr/lib/vpp_plugins''' for plugins to load when they start. | |
− | + | ||
− | + |
Latest revision as of 19:03, 5 April 2016
Contents
Introduction
These instructions will setup the plugin source in /vpp/devboot/macswap. This location is chosen only for example; there is no direct correlation between the plugin source tree and the VPP source tree.
Setup the Macswap source code
Emacs
There are a set of templates that Emacs users can make use of to build skeleton plugins, including the macswap plugin.
C-x C-f, /vpp/build-root/emacs-list/all-skel.el M-x eval-buffer M-x shell; mkdir /vpp/devboot M-x make-plugin macswap C-x s
Non-Emacs
People who do not use Emacs can use a pre-generated copy of the macswap plugin by entering these commands at a shell prompt:
cd ~ git clone https://github.com/alagalah/macswap-plugin cd macswap-plugin mkdir /vpp/devboot tar -zxvf macswap-plugin.tar.gz -C /vpp/devboot
Building the plugin
At a shell prompt:
cd /vpp/devboot/macswap-plugin autoreconf -i -f mkdir build cd build ../configure --with-plugin-toolkit make sudo make install ls /usr/lib/vpp_plugins/
NB: This builds against the libraries/headers installed in the system; not those in the local build environment. Both release and debug builds of VPP will search in /usr/lib/vpp_plugins for plugins to load when they start.