diff --git a/configure.ac b/configure.ac index e1cae45..1a2c339 100644 --- a/configure.ac +++ b/configure.ac @@ -162,6 +162,8 @@ AC_ARG_ENABLE(demo, [enable_demo=no] ) AM_CONDITIONAL(ENABLE_DEMO, test x"$enable_demo" = x"yes") +DEMO_APPS="libsmfm-demo-gtk$GTK_VERSION_MAJOR libsmfm-file-search-cli-demo-gtk$GTK_VERSION_MAJOR" +AC_SUBST(DEMO_APPS) GETTEXT_PACKAGE="libsmfm-gtk$GTK_VERSION_MAJOR" AC_SUBST(GETTEXT_PACKAGE) diff --git a/src/Makefile.am b/src/Makefile.am index 935a976..cbe190f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -184,46 +184,63 @@ libsmfm_pref_apps_LDADD = \ if ENABLE_DEMO -bin_PROGRAMS += libsmfm-demo libsmfm-file-search-cli-demo -libsmfm_demo_SOURCES = \ + +bin_PROGRAMS += @DEMO_APPS@ + +EXTRA_PROGRAMS += \ + libsmfm-demo-gtk2 \ + libsmfm-file-search-cli-demo-gtk2 \ + libsmfm-demo-gtk3 \ + libsmfm-file-search-cli-demo-gtk3 \ + $(NULL) + +libsmfm_demo_gtk2_SOURCES = \ $(gtk_compat_SOURCES) \ demo/libsmfm-demo.c \ demo/main-win.c demo/main-win.h \ $(NULL) +libsmfm_demo_gtk3_SOURCES = $(libsmfm_demo_gtk2_SOURCES) -libsmfm_demo_DEPENDENCIES = \ +libsmfm_demo_gtk2_DEPENDENCIES = \ @LIBSMFM_GTK_LTLIBRARIES@ \ $(NULL) +libsmfm_demo_gtk3_DEPENDENCIES = $(libsmfm_demo_gtk2_DEPENDENCIES) -libsmfm_demo_CFLAGS = \ +libsmfm_demo_gtk2_CFLAGS = \ $(LIBSMFM_CFLAGS) \ $(GTK_CFLAGS) \ -Werror-implicit-function-declaration \ $(NULL) +libsmfm_demo_gtk3_CFLAGS = $(libsmfm_demo_gtk2_CFLAGS) -libsmfm_demo_LDADD = \ +libsmfm_demo_gtk2_LDADD = \ $(LIBSMFM_LIBS) \ $(GTK_LIBS) \ $(INTLLIBS) \ @LIBSMFM_GTK_LTLIBRARIES@ \ $(NULL) +libsmfm_demo_gtk3_LDADD = $(libsmfm_demo_gtk2_LDADD) -libsmfm_file_search_cli_demo_SOURCES = \ +libsmfm_file_search_cli_demo_gtk2_SOURCES = \ demo/libsmfm-file-search-cli-demo.c \ $(NULL) +libsmfm_file_search_cli_demo_gtk3_SOURCES = $(libsmfm_file_search_cli_demo_gtk2_SOURCES) -libsmfm_file_search_cli_demo_CFLAGS = \ +libsmfm_file_search_cli_demo_gtk2_CFLAGS = \ $(LIBSMFM_CFLAGS) \ $(GTK_CFLAGS) \ -Werror-implicit-function-declaration \ $(NULL) +libsmfm_file_search_cli_demo_gtk3_CFLAGS = $(libsmfm_file_search_cli_demo_gtk2_CFLAGS) -libsmfm_file_search_cli_demo_LDADD = \ +libsmfm_file_search_cli_demo_gtk2_LDADD = \ $(LIBSMFM_LIBS) \ $(GTK_LIBS) \ $(INTLLIBS) \ - libsmfm-gtk2.la \ + @LIBSMFM_GTK_LTLIBRARIES@ \ $(NULL) +libsmfm_file_search_cli_demo_gtk3_LDADD = $(libsmfm_file_search_cli_demo_gtk2_LDADD) + endif