-INCLUDES = $(GTK_CFLAGS) $(GNOME_VFS_CFLAGS) $(GCONF_CFLAGS) \
+INCLUDES = $(GTK_CFLAGS) $(GCONF_CFLAGS) \
$(ESD_CFLAGS) $(LIBMB_CFLAGS) -DLOCALEDIR=\"$(localedir)\" -I$(srcdir)/..
lib_LTLIBRARIES = libhildonwidgets.la
libhildonwidgets_la_LDFLAGS = -version-info 5:0:5
-libhildonwidgets_la_LIBADD = $(GTK_LIBS) $(GNOME_VFS_LIBS) $(GCONF_LIBS) \
+libhildonwidgets_la_LIBADD = $(GTK_LIBS) $(GCONF_LIBS) \
$(ESD_LIBS) $(LIBMB_LIBS)
libhildonwidgets_la_SOURCES = \
hildon-date-editor.h \
hildon-time-editor.c \
hildon-time-editor.h \
+ hildon-private.h \
hildon-time-picker.c \
hildon-time-picker.h \
hildon-weekday-picker.c \
hildon-add-home-dialog.h \
hildon-font-selection-dialog.c \
hildon-font-selection-dialog.h \
- hildon-insert-object-dialog.c \
- hildon-insert-object-dialog.h \
hildon-grid.c \
hildon-grid.h \
hildon-grid-item.c \
hildon-find-toolbar.h \
gtk-infoprint.c \
gtk-infoprint.h \
+ hildon-banner.c \
+ hildon-banner.h \
hildon-input-mode-hint.h \
hildon-app-private.h \
hildon-caption.c \
hildon-window.h \
hildon-window-private.h \
hildon-program.c \
- hildon-program.h
+ hildon-program.h \
+ hildon-code-dialog.c \
+ hildon-code-dialog.h \
+ $(hildonlibs_built_headers) \
+ $(hildonlibs_built_cfiles)
hildon-marshalers.h: hildon-marshalers.list
hildon-marshalers.list >hildon-marshalers.h
hildon-marshalers.c: hildon-marshalers.list hildon-marshalers.h
- echo '#include "hildon-marshalers.h"' >hildon-marshalers.c
+ echo '#include <hildon-widgets/hildon-marshalers.h>' >hildon-marshalers.c
glib-genmarshal --prefix _hildon_marshal --body \
hildon-marshalers.list >>hildon-marshalers.c
hildon-sort-dialog.h \
hildon-add-home-dialog.h \
hildon-font-selection-dialog.h \
- hildon-insert-object-dialog.h \
hildon-grid.h \
hildon-grid-item.h \
hildon-file-handling-note.h \
hildon-appview.h \
hildon-find-toolbar.h \
gtk-infoprint.h \
+ hildon-banner.h \
hildon-input-mode-hint.h \
hildon-app-private.h \
hildon-caption.h \
hildon-window.h \
hildon-program.h \
- hildon-window-private.h
+ hildon-window-private.h \
+ hildon-code-dialog.h
+
+headers_to_scan_for_enums = $(hildonwidgetsincludeinst_DATA)
+
+# Generate the enums source code, with glib-mkenums:
+# This is based on the same Makefile.am stuff in pango:
+hildonlibs_built_headers = hildon-libs-enum-types.h
+hildonlibs_built_cfiles = hildon-libs-enum-types.c
+
+# Don't build the library until we have built the header that it needs:
+$(OBJECTS) $(libhildonwidgets_la_OBJECTS): $(hildonlibs_built_headers)
+
+hildon-libs-enum-types.h: @REBUILD@ $(headers_to_scan_for_enums) Makefile
+ (cd $(srcdir) && glib-mkenums \
+ --fhead "#ifndef __HILDON_LIBS_ENUM_TYPES_H__\n#define __HILDON_LIBS_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+ --fprod "/* enumerations from \"@filename@\" */\n" \
+ --vhead "GType @enum_name@_get_type (void);\n#define HILDON_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
+ --ftail "G_END_DECLS\n\n#endif /* __HILDON_LIBS_ENUM_TYPES_H__ */" \
+ $(headers_to_scan_for_enums)) > $@
+
+#FIXME: This would be shorter if there was a hildon-libs.h file:
+hildon-libs-enum-types.c: @REBUILD@ $(headers_to_scan_for_enums) Makefile
+ (cd $(srcdir) && glib-mkenums \
+ --fhead "#include <hildon-widgets/hildon-app.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-input-mode-hint.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-caption.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-date-editor.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-number-editor.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-telephone-editor.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-note.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-grid.h>\n" \
+ --fhead '#include "hildon-libs-enum-types.h"\n' \
+ --fhead "#include <glib-object.h>" \
+ --fprod "\n/* enumerations from \"@filename@\" */" \
+ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ $(headers_to_scan_for_enums)) > $@