summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2007-07-05 08:50:07 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2007-07-05 08:50:07 +0000
commitc097d6da94cadc4eb204caef89fe1abc5b060f1b (patch)
tree493e5abd572ad48c96c5cd0074fac168140b6a04
parentd71e49df9261a6968e7ffab33c6306914ac1d1c0 (diff)
downloadnavit-svn-c097d6da94cadc4eb204caef89fe1abc5b060f1b.tar.gz
Improved build system
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@256 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--Makefile.am12
-rw-r--r--data/garmin_img/Makefile.am2
-rw-r--r--data/mg/Makefile.am2
-rw-r--r--data/textfile/Makefile.am2
-rw-r--r--data_window.c13
-rw-r--r--graphics/gtk_drawing_area/Makefile.am2
-rw-r--r--graphics/null/Makefile.am2
-rw-r--r--graphics/opengl/Makefile.am2
-rw-r--r--gui/gtk/Makefile.am3
-rw-r--r--gui/gtk/gui_gtk_window.c8
-rw-r--r--gui/sdl/Makefile.am4
-rw-r--r--main.c11
-rw-r--r--plugins/poi_geodownload/Makefile.am2
-rw-r--r--xpm/Makefile.am4
14 files changed, 48 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am
index f198c092..f5098c9e 100644
--- a/Makefile.am
+++ b/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/data/garmin_img/Makefile.am b/data/garmin_img/Makefile.am
index 7fb84323..dccc1bd2 100644
--- a/data/garmin_img/Makefile.am
+++ b/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/data/mg/Makefile.am b/data/mg/Makefile.am
index 65f0157e..ba356607 100644
--- a/data/mg/Makefile.am
+++ b/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/data/textfile/Makefile.am b/data/textfile/Makefile.am
index 92850723..d32dea60 100644
--- a/data/textfile/Makefile.am
+++ b/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/data_window.c b/data_window.c
index 99889488..0002e44e 100644
--- a/data_window.c
+++ b/data_window.c
@@ -1,14 +1,19 @@
#include <malloc.h>
#include <stdio.h>
#include <string.h>
+#if 0
#include <gtk/gtk.h>
+#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/graphics/gtk_drawing_area/Makefile.am b/graphics/gtk_drawing_area/Makefile.am
index 5b8b9448..1a0a210a 100644
--- a/graphics/gtk_drawing_area/Makefile.am
+++ b/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/graphics/null/Makefile.am b/graphics/null/Makefile.am
index 8b22bdbc..ffb869f0 100644
--- a/graphics/null/Makefile.am
+++ b/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/graphics/opengl/Makefile.am b/graphics/opengl/Makefile.am
index 99023e34..50080a5d 100644
--- a/graphics/opengl/Makefile.am
+++ b/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/gui/gtk/Makefile.am b/gui/gtk/Makefile.am
index 9b8d907f..2cb3c284 100644
--- a/gui/gtk/Makefile.am
+++ b/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/gui/gtk/gui_gtk_window.c b/gui/gtk/gui_gtk_window.c
index 663cbcca..34f2a98e 100644
--- a/gui/gtk/gui_gtk_window.c
+++ b/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(&gtk_argc, &gtk_argv);
+ gdk_rgb_init();
+ gtk_set_locale();
+
+
plugin_register_gui_type("gtk", gui_gtk_new);
}
diff --git a/gui/sdl/Makefile.am b/gui/sdl/Makefile.am
index d8be2a30..030721ed 100644
--- a/gui/sdl/Makefile.am
+++ b/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/main.c b/main.c
index db91ef88..b0cadcea 100644
--- a/main.c
+++ b/main.c
@@ -3,7 +3,9 @@
#include <glib.h>
#include <sys/types.h>
#include <sys/wait.h>
+#ifdef USE_GTK_MAIN_LOOP
#include <gtk/gtk.h>
+#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/plugins/poi_geodownload/Makefile.am b/plugins/poi_geodownload/Makefile.am
index 0f4d0bc4..ee3cc415 100644
--- a/plugins/poi_geodownload/Makefile.am
+++ b/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/xpm/Makefile.am b/xpm/Makefile.am
index 786803d2..2545d046 100644
--- a/xpm/Makefile.am
+++ b/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)