thanks to xenos1984 i finaly became an comand-line-output from my own plugin called "my_plugin.c"
first of all you have to edit the file "navit/CMakeList.txt" (Attention: not "navit/navit/CMakeList.txt"):
In line 374 under the comment "#Modules without test yet" i added:
Code:
"add_module(plugin/my_plugin "Default" TRUE)"
Now you need to edit "navit/navit/navit_shipped.xml":
in line 16, somewhere between "<plugin> ...</plugin>" add the line:
Code:
<plugin path="$NAVIT_LIBDIR/*/${NAVIT_LIBPREFIX}libplugin_my_plugin.so" active="yes"/>
Now you're able to create your plugin file.
You should store it in the folder "navit/navit/plugin/my_plugin"
here i copied the code from the wikis plugin page
Code:
void plugin_register_something_type(){
printf("\n\nMy Plugin is now plugged!!!\n\n");
}
void
plugin_init(void)
{
plugin_register_something_type();
}
you should also create a "Makefile.am" in the same folder, which should look like (derived from "/navit/navit/plugin/pedestrian/Makefile.am):
Code:
include $(top_srcdir)/Makefile.inc
AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/navit -DMODULE=plugin_my_plugin
moduleplugin_LTLIBRARIES = libplugin_my_plugin.la
libplugin_my_plugin_la_LDFLAGS=-module -avoid-version @NAVIT_MODULE_LDFLAGS@ #-Wl,--no-undefined
libplugin_my_plugin_la_SOURCES = my_plugin.c
android: libplugin_my_plugin.la
cp .libs/libplugin_my_plugin.so ../../android/libs/armeabi
xslt:
cp *.xslt ../../xslt
And also a file called "CMakeLists.txt" with following content:
Code:
module_add_library(plugin_my_plugin my_plugin.c)
Now we go one folder backwards and adapt there the "navit/navit/plugin/Makefile.am", too:
Code:
SUBDIRS=
if PLUGIN_PEDESTRIAN
SUBDIRS += pedestrian
endif
if PLUGIN_MY_PLUGIN
SUBDIRS += my_plugin
endif
DIST_SUBDIRS=pedestrian my_plugin
If you build Navit now from the source (with cmake and make) you should get a comand-line output when starting ./navit
Now I'll look for a way how to access my plugin at a certain while navit is running.
... if i new something new, i'll edit this post.
help welcome. thx.