Previous: , Up: Implementing a block plugin   [Contents]


4.7.3.5 Integration of the plugin with the build system

In order to compile the plugin, the Makefile.am file for the service SERVICE should contain a rule similar to this:

  plugindir = $(libdir)/gnunet

  plugin_LTLIBRARIES = \
          libgnunet_plugin_block_ext.la
  libgnunet_plugin_block_ext_la_SOURCES = \
          plugin_block_ext.c
  libgnunet_plugin_block_ext_la_LIBADD = \
          $(prefix)/lib/libgnunethello.la \
          $(prefix)/lib/libgnunetblock.la \
          $(prefix)/lib/libgnunetutil.la
  libgnunet_plugin_block_ext_la_LDFLAGS = \
          $(GN_PLUGIN_LDFLAGS)
  libgnunet_plugin_block_ext_la_DEPENDENCIES = \
          $(prefix)/lib/libgnunetblock.la

Exercise: Write a block plugin that accepts all queries and all replies but prints information about queries and replies when the respective validation hooks are called.