From: martin-s Date: Thu, 5 Jul 2007 08:50:07 +0000 (+0000) Subject: Improved build system X-Git-Tag: navit-0.5.0.5194svn~4890 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf1f0d109eacd639beaa9d049b9f0868bf90a282;p=profile%2Fivi%2Fnavit.git Improved build system git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@256 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/configure.in b/navit/configure.in index abd30fe..8377459 100644 --- a/navit/configure.in +++ b/navit/configure.in @@ -32,7 +32,7 @@ AC_ARG_ENABLE(libgps, [ --disable-libgps don't use libgps], USE_LIBGPS=$enableval, USE_LIBGPS=yes) -PKG_CHECK_MODULES(NAVIT, [glib-2.0]) +PKG_CHECK_MODULES(NAVIT, [glib-2.0 gmodule-2.0]) AC_SUBST(NAVIT_CFLAGS) AC_SUBST(NAVIT_LIBS) diff --git a/navit/src/Makefile.am b/navit/src/Makefile.am index f198c09..f5098c9 100644 --- a/navit/src/Makefile.am +++ b/navit/src/Makefile.am @@ -4,13 +4,13 @@ fib-1.0 fib-1.0/Makefile.in: fib-1.0/Makefile.am cd fib-1.0 ./configure -AM_CPPFLAGS = @NAVIT_CFLAGS@ @SPEECHD_CFLAGS@ @GTK2_CFLAGS@ -DMODULE=\"navit\" +AM_CPPFLAGS = @NAVIT_CFLAGS@ @SPEECHD_CFLAGS@ -DMODULE=\"navit\" bin_PROGRAMS = navit -#pkglib_DATA = navit.xml -#EXTRA_DIST = navit.xml +pkglib_DATA = navit.xml +EXTRA_DIST = navit.xml navit_SOURCES = attr.c callback.c compass.c coord.c country.c cursor.c data_window.c debug.c \ file.c graphics.c gui.c item.c layout.c log.c main.c map.c \ @@ -18,10 +18,10 @@ navit_SOURCES = attr.c callback.c compass.c coord.c country.c cursor.c data_wind profile.c python.c route.c search.c speech.c transform.c track.c \ util.c vehicle.c xmlconfig.c attr.h attr_def.h callback.h color.h compass.h coord.h country.h \ cursor.h data.h data_window.h data_window_int.h debug.h destination.h draw_info.h \ - file.h graphics.h gtkext.h gui.h item.h item_def.h log.h layout.h main.h map-share.h map.h\ + file.h graphics.h gtkext.h gui.h item.h item_def.h log.h layer.h layout.h main.h map-share.h map.h\ map_data.h mapset.h maptype.h menu.h navigation.h navit.h \ - param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h search.h speech.h statusbar.h \ + param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h search.h speech.h statusbar.h \ toolbar.h transform.h track.h util.h vehicle.h xmlconfig.h -navit_LDADD = @NAVIT_LIBS@ @SPEECHD_LIBS@ @GTK2_LIBS@ -Lfib-1.0 -lfib +navit_LDADD = @NAVIT_LIBS@ @SPEECHD_LIBS@ -Lfib-1.0 -lfib diff --git a/navit/src/data/garmin_img/Makefile.am b/navit/src/data/garmin_img/Makefile.am index 7fb8432..dccc1bd 100644 --- a/navit/src/data/garmin_img/Makefile.am +++ b/navit/src/data/garmin_img/Makefile.am @@ -1,4 +1,4 @@ include $(top_srcdir)/Makefile.inc -AM_CPPFLAGS = @NAVIT_CFLAGS@ -I../.. +AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(top_srcdir)/src plugin_LTLIBRARIES = libdata_garmin_img.la libdata_garmin_img_la_SOURCES = garmin_img.c diff --git a/navit/src/data/mg/Makefile.am b/navit/src/data/mg/Makefile.am index 65f0157..ba35660 100644 --- a/navit/src/data/mg/Makefile.am +++ b/navit/src/data/mg/Makefile.am @@ -1,4 +1,4 @@ include $(top_srcdir)/Makefile.inc -AM_CPPFLAGS = @NAVIT_CFLAGS@ -I../.. -DMODULE=\"data_mg\" +AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(top_srcdir)/src -DMODULE=\"data_mg\" plugin_LTLIBRARIES = libdata_mg.la libdata_mg_la_SOURCES = map.c block.c town.c tree.c poly.c street.c mg.h diff --git a/navit/src/data/textfile/Makefile.am b/navit/src/data/textfile/Makefile.am index 9285072..d32dea6 100644 --- a/navit/src/data/textfile/Makefile.am +++ b/navit/src/data/textfile/Makefile.am @@ -1,4 +1,4 @@ include $(top_srcdir)/Makefile.inc -AM_CPPFLAGS = @NAVIT_CFLAGS@ -I../.. +AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(top_srcdir)/src plugin_LTLIBRARIES = libdata_textfile.la libdata_textfile_la_SOURCES = textfile.c textfile.h diff --git a/navit/src/data_window.c b/navit/src/data_window.c index 9988948..0002e44 100644 --- a/navit/src/data_window.c +++ b/navit/src/data_window.c @@ -1,14 +1,19 @@ #include #include #include +#if 0 #include +#endif #include "param.h" #include "data_window.h" +#if 0 #include "data_window_int.h" +#endif struct data_window * data_window(char *name, struct window *parent, void(*callback)(struct data_window *, char **cols)) { +#if 0 struct data_window *win; win=malloc(sizeof(*win)); @@ -27,16 +32,21 @@ data_window(char *name, struct window *parent, void(*callback)(struct data_windo gtk_window_set_transient_for(GTK_WINDOW((GtkWidget *)(win->window)), GTK_WINDOW(parent)); gtk_widget_show_all(win->window); return win; +#endif + return NULL; } void data_window_begin(struct data_window *win) { +#if 0 if (win && win->treeview) { gtk_tree_view_set_model (GTK_TREE_VIEW (win->treeview), NULL); } +#endif } +#if 0 static void click_column(GtkCList *clist, int column) { @@ -76,10 +86,12 @@ select_row(GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *column, stru win->callback(win, cols); } } +#endif void data_window_add(struct data_window *win, struct param_list *param, int count) { +#if 0 int i; GtkCellRenderer *cell; GtkTreeIter iter; @@ -120,6 +132,7 @@ data_window_add(struct data_window *win, struct param_list *param, int count) utf8=g_locale_to_utf8(param[i].value,-1,NULL,NULL,NULL); gtk_list_store_set(liststore,&iter,i,utf8,-1); } +#endif } diff --git a/navit/src/graphics/gtk_drawing_area/Makefile.am b/navit/src/graphics/gtk_drawing_area/Makefile.am index 5b8b944..1a0a210 100644 --- a/navit/src/graphics/gtk_drawing_area/Makefile.am +++ b/navit/src/graphics/gtk_drawing_area/Makefile.am @@ -1,4 +1,4 @@ include $(top_srcdir)/Makefile.inc -AM_CPPFLAGS = @GTK2_CFLAGS@ -I../.. +AM_CPPFLAGS = @GTK2_CFLAGS@ -I$(top_srcdir)/src plugin_LTLIBRARIES = libgraphics_gtk_drawing_area.la libgraphics_gtk_drawing_area_la_SOURCES = graphics_gtk_drawing_area.c diff --git a/navit/src/graphics/null/Makefile.am b/navit/src/graphics/null/Makefile.am index 8b22bdb..ffb869f 100644 --- a/navit/src/graphics/null/Makefile.am +++ b/navit/src/graphics/null/Makefile.am @@ -1,4 +1,4 @@ include $(top_srcdir)/Makefile.inc -AM_CPPFLAGS = @NAVIT_CFLAGS@ -I../.. +AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(top_srcdir)/src plugin_LTLIBRARIES = libgraphics_null.la libgraphics_null_la_SOURCES = graphics_null.c diff --git a/navit/src/graphics/opengl/Makefile.am b/navit/src/graphics/opengl/Makefile.am index 99023e3..50080a5 100644 --- a/navit/src/graphics/opengl/Makefile.am +++ b/navit/src/graphics/opengl/Makefile.am @@ -1,4 +1,4 @@ include $(top_srcdir)/Makefile.inc -AM_CPPFLAGS = @NAVIT_CFLAGS@ @OPENGL_CFLAGS@ -I../.. +AM_CPPFLAGS = @NAVIT_CFLAGS@ @OPENGL_CFLAGS@ -I$(top_srcdir)/src plugin_LTLIBRARIES = libgraphics_opengl.la libgraphics_opengl_la_SOURCES = graphics_opengl.c diff --git a/navit/src/gui/gtk/Makefile.am b/navit/src/gui/gtk/Makefile.am index 9b8d907..2cb3c28 100644 --- a/navit/src/gui/gtk/Makefile.am +++ b/navit/src/gui/gtk/Makefile.am @@ -1,4 +1,5 @@ include $(top_srcdir)/Makefile.inc -AM_CPPFLAGS = @NAVIT_CFLAGS@ @GTK2_CFLAGS@ -I../.. -DMODULE=\"gui_gtk\" +AM_CPPFLAGS = @NAVIT_CFLAGS@ @GTK2_CFLAGS@ -I$(top_srcdir)/src -DMODULE=\"gui_gtk\" plugin_LTLIBRARIES = libgui_gtk.la libgui_gtk_la_SOURCES = destination.c gui_gtk_statusbar.c gui_gtk_action.c gui_gtk_window.c gui_gtk.h +libgui_gtk_la_LIBADD = @GTK2_LIBS@ diff --git a/navit/src/gui/gtk/gui_gtk_window.c b/navit/src/gui/gtk/gui_gtk_window.c index 663cbcc..34f2a98 100644 --- a/navit/src/gui/gtk/gui_gtk_window.c +++ b/navit/src/gui/gtk/gui_gtk_window.c @@ -112,8 +112,16 @@ gui_gtk_new(struct navit *nav, struct gui_methods *meth, int w, int h) return this; } +static int gtk_argc; +static char *gtk_argv[]={NULL}; + void plugin_init(void) { + gtk_init(>k_argc, >k_argv); + gdk_rgb_init(); + gtk_set_locale(); + + plugin_register_gui_type("gtk", gui_gtk_new); } diff --git a/navit/src/gui/sdl/Makefile.am b/navit/src/gui/sdl/Makefile.am index d8be2a3..030721e 100644 --- a/navit/src/gui/sdl/Makefile.am +++ b/navit/src/gui/sdl/Makefile.am @@ -1,5 +1,5 @@ include $(top_srcdir)/Makefile.inc -AM_CPPFLAGS = @NAVIT_CFLAGS@ @CEGUI_CFLAGS@ -I../.. +AM_CPPFLAGS = @NAVIT_CFLAGS@ @CEGUI_CFLAGS@ -I$(top_srcdir)/src plugin_LTLIBRARIES = libgui_sdl.la -libgui_sdl_la_SOURCES = gui_sdl_window.cpp sdl_events.cpp +libgui_sdl_la_SOURCES = gui_sdl_window.cpp sdl_events.cpp gui_sdl.h sdl_events.h libgui_sdl_la_LIBADD = @SDL_LIBS@ @CEGUI_LIBS@ @OPENGL_LIBS@ diff --git a/navit/src/main.c b/navit/src/main.c index db91ef8..b0cadce 100644 --- a/navit/src/main.c +++ b/navit/src/main.c @@ -3,7 +3,9 @@ #include #include #include +#ifdef USE_GTK_MAIN_LOOP #include +#endif #include "file.h" #include "debug.h" #include "navit.h" @@ -49,7 +51,7 @@ int main(int argc, char **argv) { GError *error = NULL; char *config_file = NULL; -#if 0 +#ifndef USE_GTK_MAIN_LOOP GMainLoop *loop; #endif @@ -58,11 +60,14 @@ int main(int argc, char **argv) setenv("LC_NUMERIC","C",1); setlocale(LC_ALL,""); setlocale(LC_NUMERIC,"C"); - gtk_set_locale(); setlocale(LC_NUMERIC,"C"); debug_init(); +#if 0 + /* handled in gui/gtk */ + gtk_set_locale(); gtk_init(&argc, &argv); gdk_rgb_init(); +#endif #ifdef HAVE_PYTHON python_init(); @@ -86,7 +91,7 @@ int main(int argc, char **argv) if (main_loop_gui) { gui_run_main_loop(main_loop_gui); } else { -#if 1 +#ifdef USE_GTK_MAIN_LOOP gtk_main(); #else loop = g_main_loop_new (NULL, TRUE); diff --git a/navit/src/plugins/poi_geodownload/Makefile.am b/navit/src/plugins/poi_geodownload/Makefile.am index 0f4d0bc..ee3cc41 100644 --- a/navit/src/plugins/poi_geodownload/Makefile.am +++ b/navit/src/plugins/poi_geodownload/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS=libmdb AUTOMAKE_OPTIONS = no-exeext -AM_CPPFLAGS = @PACKAGE_CFLAGS@ -I../.. -Ilibmdb/include -shared +AM_CPPFLAGS = @PACKAGE_CFLAGS@ -I$(top_srcdir)/src -Ilibmdb/include -shared objdir=$(prefix) obj_PROGRAMS=plugin_poi_geodownload.so diff --git a/navit/src/xpm/Makefile.am b/navit/src/xpm/Makefile.am index 786803d..2545d04 100644 --- a/navit/src/xpm/Makefile.am +++ b/navit/src/xpm/Makefile.am @@ -1,3 +1,3 @@ include $(top_srcdir)/Makefile.inc -xpm_DATA = *.xpm -EXTRA_DIST = *.xpm +xpm_DATA = camping.xpm car_dealer.xpm fuel.xpm hospital.xpm hotel.xpm parking.xpm restaurant.xpm unknown.xpm +EXTRA_DIST = $(xpm_DATA)