NGRAPH_ICONS = data/icons/32x32/actions/ngraph_align_b.png		\
	data/icons/32x32/actions/ngraph_align_hc.png			\
	data/icons/32x32/actions/ngraph_align_l.png			\
	data/icons/32x32/actions/ngraph_align_r.png			\
	data/icons/32x32/actions/ngraph_align_t.png			\
	data/icons/32x32/actions/ngraph_align_vc.png			\
	data/icons/48x48/apps/ngraph_icon.png				\
	data/icons/64x64/apps/ngraph_icon.png				\
	data/icons/128x128/apps/ngraph_icon.png				\
	data/icons/20x20/actions/ngraph_math.png			\
	data/icons/scalable/actions/none_begin-symbolic.svg		\
	data/icons/scalable/actions/none_end-symbolic.svg		\
	data/icons/scalable/actions/arrow_begin-symbolic.svg		\
	data/icons/scalable/actions/arrow_end-symbolic.svg		\
	data/icons/scalable/actions/wave_begin-symbolic.svg		\
	data/icons/scalable/actions/wave_end-symbolic.svg		\
	data/icons/scalable/actions/mark_begin-symbolic.svg		\
	data/icons/scalable/actions/mark_end-symbolic.svg		\
	data/icons/scalable/actions/bar_begin-symbolic.svg		\
	data/icons/scalable/actions/bar_end-symbolic.svg		\
	data/icons/scalable/actions/stroke_fill_0-symbolic.svg		\
	data/icons/scalable/actions/stroke_fill_1-symbolic.svg		\
	data/icons/scalable/actions/stroke_fill_2-symbolic.svg		\
	data/icons/scalable/actions/stroke_fill_3-symbolic.svg		\
	data/icons/scalable/actions/stroke_fill_4-symbolic.svg		\
	data/icons/scalable/actions/stroke_fill_5-symbolic.svg		\
	data/icons/scalable/actions/stroke_fill_6-symbolic.svg		\
	data/icons/scalable/actions/stroke_fill_7-symbolic.svg		\
	data/icons/scalable/actions/join_bevel-symbolic.svg		\
	data/icons/scalable/actions/join_miter-symbolic.svg		\
	data/icons/scalable/actions/join_round-symbolic.svg		\
	data/icons/scalable/apps/ngraph.svg				\
	data/icons/scalable/actions/ngraph_draw-symbolic.svg		\
	data/icons/scalable/actions/ngraph_draw-attention-symbolic.svg	\
	data/icons/scalable/actions/ngraph_eval-symbolic.svg		\
	data/icons/scalable/actions/ngraph_line-symbolic.svg		\
	data/icons/scalable/actions/ngraph_single-symbolic.svg		\
	data/icons/scalable/actions/ngraph_arc-symbolic.svg		\
	data/icons/scalable/actions/ngraph_filewin-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark-symbolic.svg		\
	data/icons/scalable/actions/ngraph_text-symbolic.svg		\
	data/icons/scalable/actions/ngraph_axispoint-symbolic.svg	\
	data/icons/scalable/actions/ngraph_frame-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mergewin-symbolic.svg	\
	data/icons/scalable/actions/ngraph_trimming-symbolic.svg	\
	data/icons/scalable/actions/ngraph_axiswin-symbolic.svg		\
	data/icons/scalable/actions/ngraph_gauss-symbolic.svg		\
	data/icons/scalable/actions/ngraph_point-symbolic.svg		\
	data/icons/scalable/actions/ngraph_zoom-symbolic.svg		\
	data/icons/scalable/actions/ngraph_rect-symbolic.svg		\
	data/icons/scalable/actions/ngraph_cross-symbolic.svg		\
	data/icons/scalable/actions/ngraph_legendpoint-symbolic.svg	\
	data/icons/scalable/actions/ngraph_scale-symbolic.svg		\
	data/icons/scalable/actions/ngraph_datapoint-symbolic.svg	\
	data/icons/scalable/actions/ngraph_section-symbolic.svg		\
	data/icons/scalable/actions/ngraph_exchange-symbolic.svg	\
	data/icons/scalable/actions/ngraph_link-symbolic.svg		\
	data/icons/scalable/actions/linewidth_002-symbolic.svg		\
	data/icons/scalable/actions/linewidth_004-symbolic.svg		\
	data/icons/scalable/actions/linewidth_008-symbolic.svg		\
	data/icons/scalable/actions/linewidth_016-symbolic.svg		\
	data/icons/scalable/actions/linewidth_032-symbolic.svg		\
	data/icons/scalable/actions/linewidth_064-symbolic.svg		\
	data/icons/scalable/actions/linewidth_128-symbolic.svg		\
	data/icons/scalable/actions/ngraph_parameter-symbolic.svg	\
	data/icons/scalable/actions/ngraph_mark00-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark01-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark02-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark03-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark04-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark05-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark06-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark07-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark08-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark09-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark10-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark11-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark12-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark13-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark14-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark15-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark16-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark17-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark18-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark19-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark20-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark21-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark22-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark23-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark24-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark25-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark26-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark27-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark28-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark29-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark30-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark31-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark32-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark33-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark34-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark35-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark36-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark37-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark38-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark39-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark40-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark41-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark42-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark43-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark44-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark45-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark46-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark47-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark48-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark49-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark50-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark51-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark52-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark53-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark54-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark55-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark56-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark57-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark58-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark59-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark60-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark61-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark62-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark63-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark64-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark65-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark66-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark67-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark68-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark69-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark70-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark71-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark72-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark73-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark74-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark75-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark76-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark77-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark78-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark79-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark80-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark81-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark82-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark83-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark84-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark85-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark86-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark87-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark88-symbolic.svg		\
	data/icons/scalable/actions/ngraph_mark89-symbolic.svg

EXTRA_DIST = dir_defs.h.in data/css/ngraph.css				\
	data/gtk/menus-common.ui.in data/gtk/menus-common-win.ui.in	\
	data/gtk/menus-appmenu.ui data/gtk/help-overlay.ui		\
	data/gtk/menus-tool.ui create_completion_info.rb		\
	completion_info_functions.txt completion_info_constants.txt	\
	data/ngraphui.resources.xml.in $(NGRAPH_ICONS)

AM_CPPFLAGS = -DLOCALEDIR=\""@localedir@"\"

noinst_LTLIBRARIES = libngraphui.la

nodist_libngraphui_la_SOURCES = dir_defs.h ngraphui.resources.c

libngraphui_la_SOURCES = gtk_common.h gtk_combo.c gtk_combo.h		\
	gtk_entry_completion.c gtk_entry_completion.h gtk_subwin.c	\
	gtk_subwin.h ogra2x11.c ogra2cairo.c ogra2emf.c ogra2cairo.h	\
	ogra2cairofile.c ogra2gtkprint.c ogra2cairofile.h ogra2x11.h	\
	ogra2gdk.c ogra2gdk.h ox11dlg.c ox11menu.c ox11menu.h		\
	x11axis.c x11axis.h x11bitmp.h x11commn.c x11commn.h		\
	x11cood.c x11cood.h x11dialg.c x11dialg.h x11file.c x11file.h	\
	x11graph.c x11graph.h x11gui.c x11gui.h x11info.c x11info.h	\
	x11lgnd.c x11lgnd.h x11lgndx.c x11menu.c x11menu.h x11merge.c	\
	x11merge.h x11opt.c x11opt.h x11opt_proto.h x11print.c		\
	x11print.h x11view.c x11view.h gtk_widget.c gtk_widget.h	\
	gtk_ruler.c gtk_ruler.h init.c init.h gtk_action.c		\
	gtk_action.h sourcecompletionwords.c sourcecompletionwords.h	\
	completion_info.c completion_info.h completion_info_data.c	\
	gtk_presettings.c gtk_presettings.h x11parameter.c		\
	x11parameter.h gtk_columnview.c gtk_columnview.h		\
	gtk_listview.c gtk_listview.h ogra2emfplus.c emfplus.cpp	\
	emfplus.h

libngraph_cflags =

if OS_WIN32
UI_RESOURCES_SOURCE = $(srcdir)/data/ngraphui.resources.xml.in
MENU_UI_SOURCE = $(srcdir)/data/gtk/menus-common-win.ui.in
else
UI_RESOURCES_SOURCE = $(srcdir)/data/ngraphui.resources.xml.in
MENU_UI_SOURCE = $(srcdir)/data/gtk/menus-common.ui.in
endif

uidir = data/gtk
data/ngraphui.resources.xml: $(UI_RESOURCES_SOURCE)
	$(MKDIR_P) $(uidir)
	cp $< $@

$(uidir)/menus.ui: $(MENU_UI_SOURCE)
	$(MKDIR_P) $(uidir)
	cp $< $@

ngraphui.resources.c: data/ngraphui.resources.xml $(uidir)/menus.ui $(srcdir)/data/gtk/menus-tool.ui $(srcdir)/data/css/ngraph.css $(srcdir)/data/gtk/help-overlay.ui $(uidir)/menus-appmenu.ui $(NGRAPH_ICONS)
	$(GLIB_COMPILE_RESOURCES) --target=$@ --generate-source --sourcedir $(srcdir)/data --sourcedir $(builddir)/data $<

BUILT_SOURCES = ${nodist_libngraphui_la_SOURCES}

ngraphconfdir = $(sysconfdir)/$(PACKAGE)
pixmapdir = $(datadir)/pixmaps/$(PACKAGE)

dir_defs.h: dir_defs.h.in $(top_srcdir)/pathconv.sh
	$(SHELL) $(top_srcdir)/pathconv.sh $(srcdir)/dir_defs.h.in

completion_info_data.c: $(srcdir)/completion_info_functions.txt $(srcdir)/completion_info_constants.txt $(srcdir)/create_completion_info.rb
	ruby $(srcdir)/create_completion_info.rb $(srcdir)/completion_info_functions.txt $(srcdir)/completion_info_constants.txt completion_info_data.c

libngraphui_la_CXXFLAGS = $(GTK_CFLAGS) $(GSL_CFLAGS) $(libngraph_cflags) -I$(top_builddir) -I$(builddir) -I$(srcdir)/..
libngraphui_la_CFLAGS = $(GTK_CFLAGS) $(GSL_CFLAGS) $(libngraph_cflags) -I$(top_builddir) -I$(builddir) -I$(srcdir)/.. -I$(srcdir)/../math $(GTKSOURCEVIEW_CFLAGS)
libngraphui_la_LDFLAGS = $(GTKSOURCEVIEW_LIBS)

CLEANFILES = dir_defs.h $(builddir)/data/gtk/menus.ui $(builddir)/data/ngraphui.resources.xml $(BUILT_SOURCES)
