localedir = $(datadir)/locale

INCLUDES = -I../include -I$(top_srcdir)/include -I$(includedir) \
	   -I$(top_builddir)/pixmaps $(LIRC_INCLUDE)

AM_CFLAGS = $(GNU99) $(XINE_CFLAGS) $(X_CFLAGS) \
	    $(GTK2_CFLAGS) $(GTK3_CFLAGS) $(GTHREAD2_CFLAGS) \
	    $(HAL_CFLAGS) $(UDEV_CFLAGS) $(DBUS_CFLAGS) $(JS_CFLAGS) \
	    $(NSPR_CFLAGS) \
	    -DLOCALEDIR=\"$(localedir)\"

MAINTAINERCLEANFILES = Makefile.in

bin_PROGRAMS = gxine
if !WIN32
bin_PROGRAMS += gxine_client
endif

noinst_PROGRAMS = mktrans

gxine_SOURCES = \
	console_output.c \
	desktop_integration.c \
	drag_drop.c \
	engine.c \
	gtkflipbutton.c \
	gtkvideo.c \
	http.c \
	info_widgets.c \
	history.c \
	key_events.c \
	lirc.c \
	list_menus.c \
	log_window.c \
	main.c \
	mediamarks.c \
	menu.c \
	noskin_window.c \
	open_mrl.c \
	play_item.c \
	player.c \
	playlist.c \
	post.c \
	preferences.c \
	script_engine.c \
	server.c \
	settings.c \
	snapshot.c \
	stream_info.c \
	systray.c \
	ui.c \
	utils.c \
	vis.c \
	wizards.c \
	xml_widgets.c

gxine_LDADD = $(XINE_LIBS) $(GTK2_LIBS) $(GTK3_LIBS) $(GTHREAD2_LIBS) \
	      $(JS_LIBS) $(HAL_LIBS) $(UDEV_LIBS) $(DBUS_LIBS) $(LIRC_LIBS) \
	      $(X_LIBS) $(X_EXTRA_LIBS) $(XEXT_LIBS) $(XTEST_LIBS) \
	      $(XINERAMA_LIBS) $(XRANDR_LIBS) $(XCB_LIBS) -ldl -lm

gxine_client_SOURCES = client.c console_output.c

gxine_client_CFLAGS = $(AM_CFLAGS) -DGXINE_CLIENT

gxine_client_LDADD = $(LDADD) $(GLIB2_LIBS) $(NET_LIBS)

mktrans_SOURCES = xml_widgets.c

mktrans_CFLAGS = -DMAKE_TRANSLATION_SOURCE $(AM_CFLAGS)

mktrans_LDADD = $(XINE_LIBS) $(GLIB2_LIBS) $(INTLLIBS)

noinst_HEADERS = \
	console_output.h \
	defs.h \
	desktop_integration.h \
	drag_drop.h \
	engine.h \
	globals.h \
	gtkflipbutton.h \
	gtkvideo.h \
	history.h \
	http.h \
	info_widgets.h \
	key_events.h \
	lirc.h \
	list_menus.h \
	log_window.h \
	mediamarks.h \
	menu.h \
	noskin_window.h \
	open_mrl.h \
	play_item.h \
	player.h \
	playlist.h \
	post.h \
	preferences.h \
	script_engine.h \
	server.h \
	settings.h \
	snapshot.h \
	stream_info.h \
	systray.h \
	ui.h \
	utils.h \
	vis.h \
	watchdog.h \
	wizards.h \
	xml_widgets.h

debug: CFLAGS=$(DEBUG_CFLAGS) $(AM_CFLAGS)
debug: all

install-debug: debug
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

$(top_srcdir)/include/version.h:
	@$(MAKE) -C $(top_srcdir)/include version.h
