slog-enabled cbk use gsettings.
[psensor.git] / src / Makefile.am
index 9529e64..1dd2d52 100644 (file)
@@ -1,6 +1,7 @@
 SUBDIRS = lib glade
 
-AM_LDFLAGS = -Wl,--as-needed 
+# -export-dynamic is need for defining handlers in the glade file.
+AM_LDFLAGS = -Wl,--as-needed -export-dynamic
 
 if LIBMICROHTTPD
 if JSON
@@ -9,11 +10,12 @@ endif
 endif
 
 # -no-deprecated-declarations to avoid some glib deprecation warnings
-AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -Werror -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
+AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -Werror \
+       -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
+       -DDATADIR=\""$(datadir)"\"\
        -I$(top_srcdir)/src/lib \
        -I$(top_srcdir)/src/unity \
        $(GTK_CFLAGS)\
-       $(GCONF_CFLAGS)\
        $(SENSORS_CFLAGS)
 
 DEFS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@
@@ -21,14 +23,21 @@ DEFS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@
 LIBS = \
        lib/libpsensor.a \
        $(GTK_LIBS)\
-       $(GCONF_LIBS)\
        $(PTHREAD_LIBS)\
        $(SENSORS_LIBS)
 
+if GTK
+if X11
+if XEXT
 bin_PROGRAMS = psensor
+dist_man_MANS = psensor.1
+endif
+endif
+endif
+
 psensor_SOURCES = \
-       compat.h \
        cfg.h cfg.c \
+       notify_cmd.c notify_cmd.h \
        graph.h graph.c \
        main.c \
        ui.h ui.c \
@@ -38,7 +47,8 @@ psensor_SOURCES = \
        ui_pref.h ui_pref.c \
        ui_sensorlist.h ui_sensorlist.c \
        ui_sensorpref.h ui_sensorpref.c \
-       ui_status.h ui_status.c
+       ui_status.h ui_status.c \
+       pxdg.h pxdg.c
 
 if GTOP
 AM_CPPFLAGS += $(GTOP_CFLAGS)
@@ -58,9 +68,11 @@ AM_CPPFLAGS += $(APPINDICATOR_CFLAGS)
 endif
 
 if NVIDIA
+if X11
 AM_CPPFLAGS += $(NVIDIA_CFLAGS)
 LIBS +=  $(NVIDIA_LIBS)
 endif
+endif
 
 if LIBATIADL
 AM_CPPFLAGS += $(LIBATIADL_CFLAGS)
@@ -86,19 +98,13 @@ AM_CPPFLAGS += $(CURL_CFLAGS) $(JSON_CFLAGS)
 endif
 endif
 
-schemadir = $(GCONF_SCHEMA_FILE_DIR)
-schema_DATA = psensor.schemas
-
-dist_man_MANS = psensor.1
 EXTRA_DIST = description.txt psensor.schemas
 
-
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
-       GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_srcdir)/src/$(schema_DATA)
-endif
-
 psensor.1: main.c $(top_srcdir)/configure.ac
        $(MAKE) $(AM_MAKEFLAGS) psensor$(EXEEXT)
        help2man --include=description.txt -N --name="Temperature monitoring application" --output=psensor.1 ./psensor$(EXEEXT)
 
+gsettings_SCHEMAS=psensor.gschema.xml
+EXTRA_DIST=$(gsettings_SCHEMAS)
+
+@GSETTINGS_RULES@